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 480543 - [spc] crashes when not given any input data
[spc] crashes when not given any input data
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
0.10.9
Other Linux
: Normal critical
: 0.10.10
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-09-26 11:04 UTC by Sebastien Bacher
Modified: 2008-11-25 18:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
obvious patch (833 bytes, patch)
2008-11-11 12:37 UTC, Jonathan Matthew
none Details | Review

Description Sebastien Bacher 2007-09-26 11:04:52 UTC
The bug has been opened on https://bugs.launchpad.net/bugs/144254

"Binary package hint: rhythmbox

This happened when exiting the program.
...
Package: rhythmbox 0.11.2-0ubuntu3
...
  • #0 gst_spc_dec_sink_event
    at gstspc.c line 252
  • #1 gst_pad_send_event
    at gstpad.c line 4206
  • #2 gst_pad_push_event
    at gstpad.c line 4062
  • #3 gst_pad_event_default
    at gstpad.c line 2930
  • #4 gst_tag_demux_sink_event
    at gsttagdemux.c line 706
  • #5 gst_pad_send_event
    at gstpad.c line 4206
  • #6 gst_pad_push_event
    at gstpad.c line 4062
  • #7 gst_pad_event_default
    at gstpad.c line 2930
  • #8 gst_type_find_element_handle_event
    at gsttypefindelement.c line 506
  • #9 gst_pad_send_event
    at gstpad.c line 4206
  • #10 gst_pad_push_event
    at gstpad.c line 4062
  • #11 gst_proxy_pad_do_event
    at gstghostpad.c line 140
  • #12 gst_pad_send_event
    at gstpad.c line 4206
  • #13 gst_pad_push_event
    at gstpad.c line 4062
  • #14 gst_base_src_loop
    at gstbasesrc.c line 1830
  • #15 gst_task_func
    at gsttask.c line 192
  • #16 g_thread_pool_thread_proxy
    at /build/buildd/glib2.0-2.14.1/glib/gthreadpool.c line 265
  • #17 g_thread_create_proxy
    at /build/buildd/glib2.0-2.14.1/glib/gthread.c line 635
  • #18 start_thread
    from /lib/tls/i686/cmov/libpthread.so.0
  • #19 clone
    from /lib/tls/i686/cmov/libc.so.6

Comment 1 Jonathan Matthew 2007-09-26 12:33:16 UTC
Looks like a bug in the GStreamer SPC decoder element.  It might help if the original submitter could find and upload the file that caused the crash.
Comment 2 Jonathan Matthew 2008-11-11 12:23:19 UTC
Line 252 of the version of gstspc.c that the user would have been using is:

  guchar *data = GST_BUFFER_DATA (spc->buf);

It seems like it could get in there without a buffer if the file was 0 bytes long, or if the entire file looked like tag data (there's a tag demuxer there of some kind).

$ touch emptyfile
$ gst-launch-0.10 filesrc location=emptyfile ! spcdec ! fakesink

crashes in the same way.
Comment 3 Jonathan Matthew 2008-11-11 12:37:24 UTC
Created attachment 122416 [details] [review]
obvious patch

This fixes the crash, but instead 'filesrc location=emptyfile ! spcdec ! fakesink' hangs.
Comment 4 Wim Taymans 2008-11-25 18:28:46 UTC
Something like this should properly error and EOS:

        Patch by: Jonathan Matthew <notverysmart at gmail dot com>

        * ext/spc/gstspc.c: (gst_spc_dec_sink_event), (spc_setup):
        Post an error and push EOS when we can't start playback for some reason.
        also avoid a crash when fed an empty file. Fixes #480543.