All of lore.kernel.org
 help / color / mirror / Atom feed
* crash with assertion (?)
@ 2010-09-07 16:05 IOhannes m zmoelnig
  2010-09-07 16:07 ` IOhannes m zmoelnig
  2010-09-07 17:06 ` Clemens Ladisch
  0 siblings, 2 replies; 10+ messages in thread
From: IOhannes m zmoelnig @ 2010-09-07 16:05 UTC (permalink / raw)
  To: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 1411 bytes --]

hi all,

(just in case: sorry for double posting, i first sent from a
non-subscribed address)

this might have been discussed already ages ago, but i didn't find much
on the web, and i'm a bit confused why it happens, so:

i'm developing/bugfixing an application using (well, obviously) alsa,
and i get crashes with assertions.

my setup:
- nvidia CK804 onboard soundcard (this soundcard seems to only be able
to run at 48kHz)
- debian squeeze/sid (libasound2 1.0.23-1)

what i'm trying to do:
i'm requesting my "plughw" device with 44100Hz
the request is done with something like:
 rate=44100;
 err = snd_pcm_hw_params_set_rate_min(handle, params, &rate, 0);
[...]
 err = snd_pcm_hw_params(handle, params);

what happens:
in the snd_pcm_hw_params(), my program exits with:
"interval_inline.h:52: snd_interval_single: Assertion
`!snd_interval_empty(i)' failed."

sidenotes:
if i use the "hw" device, i get away with the wrong samplerate (no
crash, though the requested samplerate does not take effect)


now i understand, that my soundcard does not accept 44100Hz.
what i don't understand is, that alsa-lib crashes with an assertion error.
i expect snd_pcm_hw_params() return an error!=0 if it fails to do what
it is asked to do.
imho, a library should _never ever_ crash the application.



is this a bug?
in alsa-lib? in the debian-packages?

fgmasdr
IOhannes


[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3636 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-09-10 23:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-07 16:05 crash with assertion (?) IOhannes m zmoelnig
2010-09-07 16:07 ` IOhannes m zmoelnig
2010-09-07 16:32   ` IOhannes m zmoelnig
2010-09-07 17:06 ` Clemens Ladisch
2010-09-08  8:41   ` IOhannes m zmoelnig
2010-09-09  1:30     ` Raymond Yau
2010-09-09  9:43       ` IOhannes m zmoelnig
2010-09-10  1:53         ` Raymond Yau
2010-09-10  7:06           ` Clemens Ladisch
2010-09-10 23:20             ` Raymond Yau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.