After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 93479 - alsasink crashes when restarting
alsasink crashes when restarting
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal normal
: 0.4.0
Assigned To: Leif Johnson
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-09-17 11:12 UTC by Iain
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
simple mp3 player that demonstrates bug (1.91 KB, text/plain)
2002-09-17 11:13 UTC, Iain
  Details
Fixes the problem, but is it the right fix? (568 bytes, patch)
2002-09-17 12:31 UTC, Iain
none Details | Review
see above (692 bytes, patch)
2003-01-24 04:07 UTC, Benjamin Otte (Company)
none Details | Review

Description Iain 2002-09-17 11:12:50 UTC
In my playing with alsasink I came across this bug. When you set the
state from GST_STATE_PLAYING to GST_STATE_READY, and then back to
GST_STATE_PLAYING again, alsasink crashes. Test program attached
compiling should be easy :) run it with 
./program ~/some.mp3 alsasink

It'll play 10 seconds of the mp3, and then stop, wait ten seconds and
crash.
If you change alsasink to osssink and run again, it'll play 10 seconds,
wait 10 play 10 seconds, wait 10...etc until you stop it.

Another error with alsasink seems to be that if you disable the timeout,
it plays the whole song through without problems until near the end when
it starts dumping 
** (test-gst-alsa:3079): WARNING **: alsa: poll reports error.
 constantly.
Backtrace: (4 is the event type that the event got, I added this myself)
** (test-gst-alsa:4966): WARNING **: got an event on alsasink 4

Program received signal SIGSEGV, Segmentation fault.

Thread 1026 (LWP 4966)

  • #0 memcpy
    from /lib/libc.so.6
  • #1 ??
  • #2 gst_alsa_loop
    at gstalsa.c line 880
  • #3 gst_basic_scheduler_loopfunc_wrapper
    at gstbasicscheduler.c line 279
  • #4 cothread_stub
    at cothreads.c line 433
  • #5 cothread_switch
    at cothreads.c line 639
  • #6 gst_basic_scheduler_iterate
    at gstbasicscheduler.c line 1377
  • #7 gst_scheduler_iterate
    at gstscheduler.c line 609
  • #8 gst_bin_iterate_func
    at gstbin.c line 776
  • #9 gst_bin_iterate
    at gstbin.c line 818
  • #10 gst_thread_main_loop
    at gstthread.c line 701
  • #11 pthread_start_thread_event
    at manager.c line 274

Comment 1 Iain 2002-09-17 11:13:38 UTC
Created attachment 11131 [details]
simple mp3 player that demonstrates bug
Comment 2 Iain 2002-09-17 12:26:50 UTC
More info: It's crashing in gstalsa.c: 1026 because peeked is NULL.
Comment 3 Iain 2002-09-17 12:30:42 UTC
Attached patch fixes the problem, but I don't know if it's the right
way to fix it.
Comment 4 Iain 2002-09-17 12:31:20 UTC
Created attachment 11133 [details] [review]
Fixes the problem, but is it the right fix?
Comment 5 Ronald Bultje 2002-09-17 14:26:08 UTC
It works, but you'd basically miss the first few samples of your nice
audio stream, so it's not a very nice fix... I'd rather find out why
peeked is NULL.
Comment 6 Iain 2002-09-17 15:26:15 UTC
Actually, it seems to work in the test app, but in my actual app, it
then just crashes after a few more buffers have ben pulled. Same line,
memcpy(GST_ALSA_PAD(this->pads)->access_addr, peeked, len);

except this time access_addr is NULL, and peeked isn't.

ARGH.
Comment 7 Ronald Bultje 2002-09-17 17:26:10 UTC
Hm, how bitrotten is alsasink???

I don't know why it's NULL... maybe alsasink is just borked, maybe
it's just alsa (crappy)... Anyway, can we consider alsasink 'broken'? ;)
Comment 8 Christian Fredrik Kalager Schaller 2002-10-26 09:22:58 UTC
Wingo did update alsasink, but AFAIK there where still bugs in it and
there simply where
not enough time before he left to iron out the last bugs. We need a
new maintainer for this (and the jack plugins). Maybe Leif?
Comment 9 Christian Fredrik Kalager Schaller 2003-01-23 13:44:41 UTC
Re-assigning to Leif.
Comment 10 Benjamin Otte (Company) 2003-01-24 04:07:20 UTC
This error is with event handling.
After the restart a DISCONTINUOUS event is emitted.

GstAlsa nonetheless tries to process data it didn't get.
The attached patch fixes the problem.
Comment 11 Benjamin Otte (Company) 2003-01-24 04:07:49 UTC
Created attachment 13791 [details] [review]
see above
Comment 12 Iain 2003-01-24 13:11:04 UTC
yey, it works for me
Comment 13 Christian Fredrik Kalager Schaller 2003-01-26 15:12:32 UTC
patch commited to head. closing