Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: IOhannes m zmoelnig <zmoelnig@iem.at>
To: alsa-devel@alsa-project.org
Subject: crash with assertion (?)
Date: Tue, 07 Sep 2010 18:05:01 +0200	[thread overview]
Message-ID: <4C8662AD.1040607@iem.at> (raw)


[-- 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

             reply	other threads:[~2010-09-07 16:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-07 16:05 IOhannes m zmoelnig [this message]
2010-09-07 16:07 ` crash with assertion (?) 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C8662AD.1040607@iem.at \
    --to=zmoelnig@iem.at \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox