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 381857 - [id3v2mux] crashes trying to write empty frames
[id3v2mux] crashes trying to write empty frames
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal major
: 0.10.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 449827 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-12-03 12:17 UTC by Sam Morris
Modified: 2014-12-02 01:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Debug output from rhythmbox (8.97 KB, text/plain)
2006-12-03 12:18 UTC, Sam Morris
  Details
trivial patch (682 bytes, patch)
2006-12-04 23:47 UTC, Jonathan Matthew
committed Details | Review

Description Sam Morris 2006-12-03 12:17:19 UTC
Please describe the problem:
When trying to write tags for a particular album, I get the message "an internal Gstreamer error occured. File a bug". I can make some files from the album available if you want them.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Sam Morris 2006-12-03 12:18:12 UTC
Created attachment 77576 [details]
Debug output from rhythmbox

Here is the debug output from Rhythmbox that is generated when I view a file's properties, type the new tags in, and then close the property window.
Comment 2 Sam Morris 2006-12-03 12:22:33 UTC
It seems Rhythmbox has actually written corrupt tags to the files. I previously set tags for all files in the album together, which appeared to succeed. Rhythmbox itself seems able to display the new tags from the file, but eyeD3 throws an error:

01 - The Post War Dream.mp3     [ 3.46 MB ]
--------------------------------------------------------------------------------
Traceback (most recent call last):
  • File "/usr/bin/eyeD3", line 950 in ?
    retval = main();
  • File "/usr/bin/eyeD3", line 937 in main
    retval = app.handleFile(a);
  • File "/usr/bin/eyeD3", line 351 in handleFile
    audioFile = eyeD3.tag.Mp3AudioFile(f, self.opts.tagVersion);
  • File "/var/lib/python-support/python2.4/eyeD3/tag.py", line 1582 in __init__
    hasTag = tag.link(f, tagVersion);
  • File "/var/lib/python-support/python2.4/eyeD3/tag.py", line 472 in link
    padding = self.__loadV2Tag(f);
  • File "/var/lib/python-support/python2.4/eyeD3/tag.py", line 1308 in __loadV2Tag
    padding = self.frames.parse(fp, self.header);
  • File "/var/lib/python-support/python2.4/eyeD3/frames.py", line 1751 in parse
    self.addFrame(createFrame(frameHeader, data));
  • File "/var/lib/python-support/python2.4/eyeD3/frames.py", line 2085 in createFrame
    f = TextFrame(frameHeader, data = data);
  • File "/var/lib/python-support/python2.4/eyeD3/frames.py", line 699 in __init__
    self._set(data, frameHeader);
  • File "/var/lib/python-support/python2.4/eyeD3/frames.py", line 714 in _set
    self.encoding = data[0];
IndexError: string index out of range

and kid3 and tagtool both silently ignore the tags and behave as if there are no tags set.
Comment 3 Alex Lancaster 2006-12-03 12:42:36 UTC
This is probably a gstreamer problem, what versions of gstreamer and the gstreamer plugins are you using?
Comment 4 Sam Morris 2006-12-03 12:52:23 UTC
gstreamer-tools                   0.10.10-2            
gstreamer0.10-alsa                0.10.10-2            
gstreamer0.10-doc                 0.10.10-2            
gstreamer0.10-ffmpeg              0.10.1-2             
gstreamer0.10-gnomevfs            0.10.10-2            
gstreamer0.10-pitfdll             0.9.1.1+cvs20060515-1
gstreamer0.10-plugins-bad         0.10.3-3             
gstreamer0.10-plugins-base        0.10.10-2            
gstreamer0.10-plugins-base-apps   0.10.10-2            
gstreamer0.10-plugins-base-doc    0.10.10-2            
gstreamer0.10-plugins-good        0.10.4-3             
gstreamer0.10-plugins-good-doc    0.10.4-3             
gstreamer0.10-plugins-ugly        0.10.4-4             
gstreamer0.10-plugins-ugly-doc    0.10.4-4             
gstreamer0.10-tools               0.10.10-2            
gstreamer0.10-x                   0.10.10-2            
libgstreamer-plugins-base0.10-0   0.10.10-2            
libgstreamer-plugins-base0.10-dev 0.10.10-2            
libgstreamer0.10-0                0.10.10-2            
libgstreamer0.10-dev              0.10.10-2            
totem-gstreamer                   2.16.4-1             
Comment 5 Alex Lancaster 2006-12-03 16:00:40 UTC
Can you reliably reproduce the corruption and/or post a fragment of the file before and after the corruption?
Comment 6 Sam Morris 2006-12-03 17:51:56 UTC
I am copying the file as it was before and after I originally tagged it to <http://robots.org.uk/stuff/381857/>.
Comment 7 Jonathan Matthew 2006-12-03 20:58:26 UTC
rhythmbox writes id3v2 v2.4 tags, and libid3 (as used by kid3, tagtool, easytag, etc.) only supports id3v2 up to v2.3.  ex falso (using mutagen) and cowbell (using taglib) read the v2.4 tags correctly.  I'm not sure what's going on with eyed3.

The "internal GStreamer problem" message means that the metadata reader process crashed.  Might be related to bug 374036?

To get a stack trace from the metadata helper:

- run rhythmbox-metadata in gdb
- copy the dbus address it prints to stdout (unix:abstract=/tmp/dbus-...)
- elsewhere, export RB_DBUS_METADATA_ADDRESS=unix:abstract=/tmp/dbus-...
- run rhythmbox
- do whatever it is that crashes the metadata helper
Comment 8 Sam Morris 2006-12-04 14:27:03 UTC
Ok, so I don't need to be alarmed that other tagging programs fail to read the tags. :)

I ran eyeD3 in a debugger and noticed that there are _two_ TRCK frames. The second one is empty (well, full of 0x00 bytes). eyeD3 seems to discard all the null bytes, and it's left with an empty string. I'll forward this to the eyeD3 maintainer--but is it proper that Rhythmbox wrote out two TRCK frames in the first place?

00000000  49 44 33 04 00 00 00 00  0a 21 54 49 54 32 00 00  |ID3......!TIT2..|
00000010  00 28 00 00 03 54 68 65  20 46 69 6e 61 6c 20 43  |.(...The Final C|
00000020  75 74 20 2d 20 30 31 20  2d 20 54 68 65 20 50 6f  |ut - 01 - The Po|
00000030  73 74 20 57 61 72 20 44  72 65 61 6d 54 50 45 31  |st War DreamTPE1|
00000040  00 00 00 0b 00 00 03 50  69 6e 6b 20 46 6c 6f 79  |.......Pink Floy|
00000050  64 54 41 4c 42 00 00 00  0e 00 00 03 54 68 65 20  |dTALB.......The |
00000060  46 69 6e 61 6c 20 43 75  74 54 44 52 43 00 00 00  |Final CutTDRC...|
00000070  05 00 00 03 31 39 38 33  54 43 4f 4e 00 00 00 05  |....1983TCON....|
00000080  00 00 03 52 6f 63 6b 55  46 49 44 00 00 00 17 00  |...RockUFID.....|
00000090  00 68 74 74 70 3a 2f 2f  6d 75 73 69 63 62 72 61  |.http://musicbra|
000000a0  69 6e 7a 2e 6f 72 67 00  54 52 43 4b 00 00 00 02  |inz.org.TRCK....|
000000b0  00 00 03 30 54 50 4f 53  00 00 00 02 00 00 03 30  |...0TPOS.......0|
000000c0  54 52 43 4b 00 00 00 00  00 00 54 45 4e 43 00 00  |TRCK......TENC..|
000000d0  00 00 00 00 57 58 58 58  00 00 00 02 00 00 00 00  |....WXXX........|
000000e0  54 43 4f 50 00 00 00 00  00 00 54 4f 50 45 00 00  |TCOP......TOPE..|
000000f0  00 00 00 00 54 43 4f 4d  00 00 00 00 00 00 43 4f  |....TCOM......CO|
00000100  4d 4d 00 00 00 05 00 00  03 00 01 00 00 54 43 4f  |MM...........TCO|
00000110  4e 00 00 00 00 00 00 54  44 52 43 00 00 00 00 00  |N......TDRC.....|
00000120  00 54 41 4c 42 00 00 00  00 00 00 00 00 00 00 00  |.TALB...........|
00000130  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

I'll try to get a backtrace from the failing importer shortly.
Comment 9 Sam Morris 2006-12-04 14:37:27 UTC
Here's the backtrace from the metadata reading process:

(gdb) bt full
  • #0 TagLib::ID3v2::Frame::frameID
    from /usr/lib/libtag.so.1
  • #1 TagLib::ID3v2::Tag::addFrame
    from /usr/lib/libtag.so.1
  • #2 gst_id3v2_mux_plugin_init
    from /usr/lib/gstreamer-0.10/libgsttaglib.so
  • #3 gst_id3v2_mux_plugin_init
    from /usr/lib/gstreamer-0.10/libgsttaglib.so
  • #4 gst_tag_list_foreach
    from /usr/lib/libgstreamer-0.10.so.0
  • #5 gst_structure_foreach
    from /usr/lib/libgstreamer-0.10.so.0
  • #6 gst_tag_list_foreach
    from /usr/lib/libgstreamer-0.10.so.0
  • #7 gst_id3v2_mux_plugin_init
    from /usr/lib/gstreamer-0.10/libgsttaglib.so
  • #8 gst_tag_lib_mux_get_type
    from /usr/lib/gstreamer-0.10/libgsttaglib.so
  • #9 gst_pad_alloc_buffer
    from /usr/lib/libgstreamer-0.10.so.0
  • #10 gst_pad_push
    from /usr/lib/libgstreamer-0.10.so.0
  • #11 gst_id3demux_get_type
    from /usr/lib/gstreamer-0.10/libgstid3demux.so
  • #12 gst_pad_alloc_buffer
    from /usr/lib/libgstreamer-0.10.so.0
  • #13 gst_pad_push
    from /usr/lib/libgstreamer-0.10.so.0
  • #14 gst_base_src_get_type
    from /usr/lib/libgstbase-0.10.so.0
  • #15 gst_task_set_lock
    from /usr/lib/libgstreamer-0.10.so.0
  • #16 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #17 g_thread_create_proxy
    at gthread.c line 553
  • #18 pthread_start_thread
    at manager.c line 310
  • #19 pthread_start_thread_event
    at manager.c line 334
  • #20 clone
    from /usr/lib/debug/libc.so.6

I can rebuild libtag/rhythmbox/gstreamer with debugging symbols if you need more info.
Comment 10 Jonathan Matthew 2006-12-04 21:30:31 UTC
Debug symbols for gst-plugins-good and taglib would be helpful.
Comment 11 Sam Morris 2006-12-04 21:48:56 UTC


  • #0 TagLib::ID3v2::Frame::frameID
    at ../../../../taglib/mpeg/id3v2/id3v2frame.cpp line 86
  • #1 TagLib::ID3v2::Tag::addFrame
    at ../../../../taglib/mpeg/id3v2/id3v2tag.cpp line 308
  • #2 add_id3v2frame_tag
    at gstid3v2mux.cc line 384
  • #3 foreach_add_tag
    at gstid3v2mux.cc line 559
  • #4 structure_foreach_wrapper
    at gsttaglist.c line 823
  • #5 gst_structure_foreach
    at gststructure.c line 877
  • #6 gst_tag_list_foreach
    at gsttaglist.c line 848
  • #7 gst_id3v2_mux_render_tag
    at gstid3v2mux.cc line 582
  • #8 gst_tag_lib_mux_chain
    at gsttaglibmux.c line 163
  • #9 gst_pad_chain_unchecked
    at gstpad.c line 3344
  • #10 gst_pad_push
    at gstpad.c line 3510
  • #11 gst_id3demux_chain
    at gstid3demux.c line 537
  • #12 gst_pad_chain_unchecked
    at gstpad.c line 3344
  • #13 gst_pad_push
    at gstpad.c line 3510
  • #14 gst_base_src_loop
    at gstbasesrc.c line 1529
  • #15 gst_task_func
    at gsttask.c line 192
  • #16 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #17 g_thread_create_proxy
    at gthread.c line 553
  • #18 pthread_start_thread
    at manager.c line 310
  • #19 pthread_start_thread_event
    at manager.c line 334
  • #20 clone
    from /usr/lib/debug/libc.so.6

Comment 12 Sam Morris 2006-12-04 21:56:25 UTC
FYI, that's taglib 1.4, unpatched, if you want to look at the source.
Comment 13 Jonathan Matthew 2006-12-04 22:47:50 UTC
Looks like id3v2mux isn't checking for ID3v2::FrameFactory::createFrame() returning NULL.  I'll have to look at what data is being passed in to figure out why that's happening.
Comment 14 Jonathan Matthew 2006-12-04 23:46:21 UTC
Not sure why it has so many empty frames to write (8 of the 11 frames it tries to add through add_id3v2frame_tag are empty), but that's what's causing the problem.

Moving to gst-plugins-good, and a patch will be along shortly.
Comment 15 Jonathan Matthew 2006-12-04 23:47:31 UTC
Created attachment 77696 [details] [review]
trivial patch
Comment 16 Jan Schmidt 2006-12-06 13:36:27 UTC
Ta, committed:
        * ext/taglib/gstid3v2mux.cc:
        Don't attempt to write a NULL frame into the ID3 tag set when the
        createFrame method returned NULL.
        Fixes: #381857
        Patch by: Jonathan Matthew <jonathan at 0kaolin wh9 net >
Comment 17 André Klapper 2014-12-02 01:32:17 UTC
*** Bug 449827 has been marked as a duplicate of this bug. ***