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 729751 - Example tag-reader from documentation crashes on .opus files
Example tag-reader from documentation crashes on .opus files
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: dont know
1.2.4
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-07 22:24 UTC by Epicanis
Modified: 2014-05-07 23:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
One of the several .opus files I tested and got the crash on. (The .flac and .ogg [vorbis] versions of the same file worked) (849.79 KB, audio/ogg)
2014-05-07 22:24 UTC, Epicanis
Details

Description Epicanis 2014-05-07 22:24:33 UTC
Created attachment 276108 [details]
One of the several .opus files I tested and got the crash on. (The .flac and .ogg [vorbis] versions of the same file worked)

I'm not skilled enough to tell if this is a bug in the example program at http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-metadata.html or in one of the gstreamer modules itself, so I'm not sure whether to classify this as a "documentation" bug or what.

After compiling the tag-reading example code at end of chapter 12 as described on that page ("gcc -o tags tags.c `pkg-config --cflags --libs gstreamer-1.0`", using gcc 4.9.0 if that matters) of the gstreamer documentation (link above), I find it extracts tags from ogg vorbis, flac, and webm files (at least, I haven't tried others) correctly, but dies upon trying to read tags from .opus files

"** (tags:8060): ERROR **: Got error
Trace/breakpoint trap (core dumped)"

with some guidance from IRC, I got the following output from gdb:

Starting program: /home/epicanis/temp/tags file:///home/epicanis/audio/Shtrafilclux/Fly/04-Berceusepourlesméchantsenfants.opus
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff4dba700 (LWP 8079)]
[New Thread 0x7fffefbea700 (LWP 8080)]

** (tags:8074): ERROR **: Got error

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff75cf993 in g_logv () from /usr/lib/libglib-2.0.so.0
(gdb)  thread apply all bt

Thread 3 (Thread 0x7fffefbea700 (LWP 8080))

  • #0 write
    from /usr/lib/libpthread.so.0
  • #1 gst_poll_write_control
    from /usr/lib/libgstreamer-1.0.so.0
  • #2 gst_bus_post
    from /usr/lib/libgstreamer-1.0.so.0
  • #3 ??
    from /usr/lib/libgstreamer-1.0.so.0
  • #4 ??
    from /usr/lib/libgstreamer-1.0.so.0
  • #5 ??
    from /usr/lib/libgstreamer-1.0.so.0
  • #6 ??
    from /usr/lib/libgstreamer-1.0.so.0
  • #7 gst_bus_post
    from /usr/lib/libgstreamer-1.0.so.0
  • #8 ??
    from /usr/lib/libgstreamer-1.0.so.0
  • #9 ??
    from /usr/lib/libgstreamer-1.0.so.0
  • #10 ??
    from /usr/lib/gstreamer-1.0/libgstplayback.so
  • #11 ??
    from /usr/lib/libgstreamer-1.0.so.0
  • #12 gst_bus_post
    from /usr/lib/libgstreamer-1.0.so.0
  • #13 ??
    from /usr/lib/libgstreamer-1.0.so.0
  • #14 gst_element_message_full
    from /usr/lib/libgstreamer-1.0.so.0
  • #15 ??
    from /usr/lib/gstreamer-1.0/libgstplayback.so
  • #16 ??
    from /usr/lib/gstreamer-1.0/libgstplayback.so
  • #17 ??
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #20 ??
    from /usr/lib/gstreamer-1.0/libgstogg.so
  • #21 ??
    from /usr/lib/gstreamer-1.0/libgstogg.so
  • #22 ??
    from /usr/lib/gstreamer-1.0/libgstogg.so
  • #23 ??
    from /usr/lib/libgstreamer-1.0.so.0
  • #24 ??
    from /usr/lib/libglib-2.0.so.0
  • #25 ??
    from /usr/lib/libglib-2.0.so.0
  • #26 start_thread
    from /usr/lib/libpthread.so.0
  • #27 clone
    from /usr/lib/libc.so.6

Comment 1 Tim-Philipp Müller 2014-05-07 22:53:25 UTC
Seems to work fine for me with 1.2.4 (well, 1.2 branch tip):

tpm@xps:~/gst/1.2/code$ ./read_tags file:///home/tpm/samples/misc/729751-04-Berceusepourlesméchantsenfants.opus 2>&1 
Got tags from element fakesink0:
	    container-format : Ogg

Got tags from element fakesink0:
	    application-name : opusenc from opus-tools 0.1.7-11-gae6e94b
	              artist : Shtrafilclux
	               album : Fly
	               title : Berceuse pour les m?chants enfants
	            datetime : 2007-04-26
	             contact : http://www.jamendo.com/list/a5346
	             license : http://creativecommons.org/licenses/by-nc-sa/3.0/
	               image : tag of type 'GstSample'
	        track-number : 4
	             encoder : libopus 1.1
	         audio-codec : Opus

It's also not a "crash", but it errors out after receiving a GST_MESSAGE_ERROR on the pipeline bus. It would be good to know what the error is. Either run the code with GST_DEBUG=*:INFO or modify it like this:

  if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
    GError *err = NULL;
    gchar *dbg = NULL;

    gst_message_parse_error (msg, &err, &dbg);
    g_printerr ("ERROR: %s\nDebug: %s\n", err->message, dbg);
    g_error_free (err);
    g_free (dbg);
    return 1;
  }

Maybe you just don't have some required plugin installed. Does  gst-inspect-1.0 opusdec  work (show stuff)?
Comment 2 Epicanis 2014-05-07 23:01:58 UTC
Thanks! I have determined the exact cause of this bug, and it appears to be "I am a friggin' moron".

I would have sworn I'd gotten all of the plugins installed, but gst-plugins-bad was missing.

I don't know if the bug is actually fixed (i.e. whether or not I have ceased to be a friggin' moron) but actually installing gst-plugins-bad like I thought I had in the first place appears to be a work-around...

tl;dr you're right, I was missing the plugin and didn't realize it.