Ticket #35 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

SIGFPE in alsa driver

Reported by: erikd Assigned to: erikd
Priority: normal Milestone:
Component: sweep Version:
Severity: normal Keywords:
Cc:

Description

Get the following floating point exception:

sweep: alsa_setup: audio interface could not be configured with specified parameters Floating point exception

Back trace in gdb:

(gdb) run sweep.wav Starting program: /home/erikd/Local/bin/sweep sweep.wav [Thread debugging using libthread_db enabled] [New Thread -1221769536 (LWP 7114)] [New Thread -1231217776 (LWP 7117)] [Thread -1231217776 (LWP 7117) exited] [New Thread -1240208496 (LWP 7118)] sweep: alsa_setup: audio interface could not be configured with specified parameters

Program received signal SIGFPE, Arithmetic exception. [Switching to Thread -1240208496 (LWP 7118)] 0x0805d35c in alsa_device_write (handle=0x8388de8, buf=0x0, count=0, offset=-1)

at driver_alsa.c:364

364 uframes = count / handle->driver_channels; (gdb) print handle->driver_channels $1 = 0

Hmmm, driver_channels == 0 is really bad.

I initially tried this with a mono file even though my sound card only handles stereo. Also tried this with a stereo file, but that also results in a SIGFPE.

Finally noticed that the sound file I was trying to play has a sample rate of 96kHz. That would explain why ALSA failed to initialize the output device.

Obviously, if the ALSA device failed to initialize, alsa_device_write should exit out early.

Change History

03/08/07 18:04:17 changed by erikd

  • status changed from new to closed.
  • resolution set to fixed.

Have commited a fix (changeset 485) so that it no longer segfaults.