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 334167 - Rhythmbox crashes on startup, or while loading my music library.
Rhythmbox crashes on startup, or while loading my music library.
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: Importing
unspecified
Other other
: High critical
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
: 332623 334753 337226 394833 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-03-10 21:42 UTC by Michael R Head
Modified: 2007-01-10 01:44 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
totally untested patch (2.97 KB, patch)
2006-03-14 11:06 UTC, Jonathan Matthew
none Details | Review
totally untested patch for 0.9.3.1 (3.34 KB, patch)
2006-03-14 13:25 UTC, Jonathan Matthew
none Details | Review
ignore invalid utf-8 tag data (1.14 KB, patch)
2006-03-17 11:19 UTC, Jonathan Matthew
committed Details | Review
check musicbrainz strings (438 bytes, patch)
2006-04-01 03:40 UTC, James "Doc" Livingston
committed Details | Review

Description Michael R Head 2006-03-10 21:42:03 UTC
Distribution: Ubuntu 6.04 (dapper)
Package: rhythmbox
Severity: critical
Version: GNOME2.13.92 unspecified
Gnome-Distributor: Ubuntu
Synopsis: Rhythmbox crashes on startup, or while loading my music library.
Bugzilla-Product: rhythmbox
Bugzilla-Component: Importing
Bugzilla-Version: unspecified
BugBuddy-GnomeVersion: 2.0 (2.13.90)
Description:
Description of the crash:
I have been unable to use rhythmbox for quite some time now due to the
fact that it crashes whenever it hits some file in my music library. I
can't figure out which file it is, and it would be nice if instead of
segfaulting, it simply told me what I was doing wrong.

I hope this trace is useful in debugging the crash. I'm using ubuntu
dapper and have built rhythmbox myself (from the 0.9.3.1 tarballs).


Steps to reproduce the crash:
1. 
2. 
3. 

Expected Results:


How often does this happen?


Additional Information:



Debugging Information:

Backtrace was generated from '/usr/bin/rhythmbox'

(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 1993963200 (LWP 12684)]
[New Thread 1975765936 (LWP 12687)]
[New Thread 1984158640 (LWP 12686)]
0xffffe410 in __kernel_vsyscall ()

Thread 1 (Thread 1993963200 (LWP 12684))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/tls/i686/cmov/libpthread.so.0
  • #2 libgnomeui_segv_handle
    at gnome-ui-init.c line 792
  • #3 <signal handler called>
  • #4 IA__gtk_widget_show
    at gtkwidget.c line 2044
  • #5 rb_shell_append_source
  • #6 ??
  • #0 __kernel_vsyscall




------- Bug created by bug-buddy at 2006-03-10 21:42 -------

Comment 1 Michael R Head 2006-03-10 21:50:32 UTC
Bah. I guess it got the debugging symbols from the wrong executable. I'll remove my ubuntu rhythmbox package and run through gdb. Trace is forthcoming...
Comment 2 Michael R Head 2006-03-10 21:51:45 UTC
burner@firefighter:/tmp/rb-g/bin$ gdb ./rhythmbox
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) run
Starting program: /tmp/rb-g/bin/rhythmbox
[Thread debugging using libthread_db enabled]
[New Thread 1993791168 (LWP 29193)]
[New Thread 1983986608 (LWP 29198)]
[New Thread 1975593904 (LWP 29199)]

(rhythmbox:29193): Rhythmbox-WARNING **: /apps/rhythmbox/state/play_order gconf key not found!

(rhythmbox:29193): Rhythmbox-WARNING **: /apps/rhythmbox/state/play_order gconf key not found!
[New Thread 1975188400 (LWP 29206)]
[New Thread 1966795696 (LWP 29207)]
[Thread 1975188400 (LWP 29206) exited]
[Thread 1966795696 (LWP 29207) exited]
[New Thread 1966795696 (LWP 29209)]

(rhythmbox:29193): Rhythmbox-WARNING **: error: Failed to register the shell: (null)
This probably means that you installed Rhythmbox in a different prefix than bonobo-activation; this warning is harmless, but IPC will not work.
[Thread 1966795696 (LWP 29209) exited]
[New Thread 1966795696 (LWP 29211)]
[New Thread 1975188400 (LWP 29212)]
[New Thread 1956641712 (LWP 29213)]
[Thread 1975188400 (LWP 29212) exited]
[Thread 1956641712 (LWP 29213) exited]
[Thread 1966795696 (LWP 29211) exited]
[New Thread 1966795696 (LWP 29215)]
[Thread 1966795696 (LWP 29215) exited]
[New Thread 1966795696 (LWP 29216)]
[Thread 1966795696 (LWP 29216) exited]
[New Thread 1966795696 (LWP 29217)]
[New Thread 1956641712 (LWP 29218)]
[New Thread 1975188400 (LWP 29219)]
[New Thread 1943010224 (LWP 29221)]
[Thread 1943010224 (LWP 29221) exited]
[New Thread 1943010224 (LWP 29224)]
[Thread 1975188400 (LWP 29219) exited]
[Thread 1956641712 (LWP 29218) exited]
[Thread 1943010224 (LWP 29224) exited]
[Thread 1966795696 (LWP 29217) exited]
[New Thread 1943010224 (LWP 29225)]
[New Thread 1956641712 (LWP 29226)]
[New Thread 1966795696 (LWP 29227)]

Program received signal SIGSEGV, Segmentation fault.

Thread 1983986608 (LWP 29198)

  • #0 mp3_type_find
    at gsttypefindfunctions.c line 590
  • #1 gst_type_find_factory_call_function
    at gsttypefindfactory.c line 243
  • #2 gst_type_find_helper
    at gsttypefindhelper.c line 168
  • #3 gst_type_find_element_activate
    at gsttypefindelement.c line 863
  • #4 gst_pad_set_active
    at gstpad.c line 637
  • #5 activate_pads
    at gstelement.c line 2248
  • #6 gst_iterator_fold
    at gstiterator.c line 503
  • #7 iterator_fold_with_resync
    at gstelement.c line 2266
  • #8 gst_element_pads_activate
    at gstelement.c line 2315
  • #9 gst_element_change_state_func
    at gstelement.c line 2352
  • #10 gst_type_find_element_change_state
    at gsttypefindelement.c line 908
  • #11 gst_element_change_state
    at gstelement.c line 2171
  • #12 gst_element_set_state_func
    at gstelement.c line 2133
  • #13 gst_element_set_state
    at gstelement.c line 2043
  • #14 gst_bin_change_state_func
    at gstbin.c line 1710
  • #15 gst_decode_bin_change_state
    at gstdecodebin.c line 1329
  • #16 gst_element_change_state
    at gstelement.c line 2171
  • #17 gst_element_set_state_func
    at gstelement.c line 2133
  • #18 gst_element_set_state
    at gstelement.c line 2043
  • #19 gst_bin_change_state_func
    at gstbin.c line 1710
  • #20 gst_pipeline_change_state
    at gstpipeline.c line 375
  • #21 gst_element_change_state
    at gstelement.c line 2171
  • #22 gst_element_change_state
    at gstelement.c line 2204
  • #23 gst_element_set_state_func
    at gstelement.c line 2133
  • #24 gst_element_set_state
    at gstelement.c line 2043
  • #25 rb_metadata_load
    at rb-metadata-gst.c line 833
  • #26 rhythmdb_execute_stat
    at rhythmdb.c line 1898
  • #27 action_thread_main
    at rhythmdb.c line 2019
  • #28 g_thread_create_proxy
    at gthread.c line 582
  • #29 start_thread
    from /lib/tls/i686/cmov/libpthread.so.0
  • #30 clone
    from /lib/tls/i686/cmov/libc.so.6

Comment 3 Michael R Head 2006-03-10 21:55:09 UTC
Here's another backtrace acquired after simply rerunning "gdb ./rhythmbox"

burner@firefighter:/tmp/rb-g/bin$ gdb ./rhythmbox
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) run
Starting program: /tmp/rb-g/bin/rhythmbox
[Thread debugging using libthread_db enabled]
[New Thread 1993967296 (LWP 29319)]
[New Thread 1984162736 (LWP 29323)]
[New Thread 1975770032 (LWP 29324)]

(rhythmbox:29319): Rhythmbox-WARNING **: /apps/rhythmbox/state/play_order gconf key not found!

(rhythmbox:29319): Rhythmbox-WARNING **: /apps/rhythmbox/state/play_order gconf key not found!
[New Thread 1975364528 (LWP 29331)]
[Thread 1975364528 (LWP 29331) exited]
[New Thread 1975364528 (LWP 29332)]
[Thread 1975364528 (LWP 29332) exited]
[New Thread 1975364528 (LWP 29334)]

(rhythmbox:29319): Rhythmbox-WARNING **: error: Failed to register the shell: (null)
This probably means that you installed Rhythmbox in a different prefix than bonobo-activation; this warning is harmless, but IPC will not work.
[Thread 1975364528 (LWP 29334) exited]
[New Thread 1975364528 (LWP 29336)]
[New Thread 1965030320 (LWP 29337)]
[New Thread 1956637616 (LWP 29338)]
[Thread 1965030320 (LWP 29337) exited]
[Thread 1975364528 (LWP 29336) exited]
[Thread 1956637616 (LWP 29338) exited]
[New Thread 1975364528 (LWP 29340)]
[Thread 1975364528 (LWP 29340) exited]
[New Thread 1975364528 (LWP 29341)]
[New Thread 1965030320 (LWP 29342)]
[New Thread 1956637616 (LWP 29343)]
[New Thread 1946155952 (LWP 29344)]
[Thread 1965030320 (LWP 29342) exited]
[Thread 1975364528 (LWP 29341) exited]
[New Thread 1965030320 (LWP 29345)]
[New Thread 1975364528 (LWP 29346)]
[New Thread 1933573040 (LWP 29347)]
[Thread 1933573040 (LWP 29347) exited]
[Thread 1965030320 (LWP 29345) exited]
[Thread 1975364528 (LWP 29346) exited]
[Thread 1956637616 (LWP 29343) exited]
[Thread 1946155952 (LWP 29344) exited]
[New Thread 1946155952 (LWP 29355)]
[New Thread 1975364528 (LWP 29356)]
[New Thread 1956637616 (LWP 29357)]
[New Thread 1965030320 (LWP 29358)]
[Thread 1965030320 (LWP 29358) exited]
[New Thread 1965030320 (LWP 29360)]

RhythmDB-ERROR **: file rhythmdb.c: line 2416 (rhythmdb_entry_set_internal): assertion failed: (g_utf8_validate (g_value_get_string (value), -1, NULL))
aborting...

Program received signal SIGABRT, Aborted.

Thread 1993967296 (LWP 29319)

  • #0 __kernel_vsyscall
  • #1 raise
    from /lib/tls/i686/cmov/libc.so.6
  • #2 abort
    from /lib/tls/i686/cmov/libc.so.6
  • #3 IA__g_logv
  • #4 IA__g_log
    at gmessages.c line 517
  • #5 IA__g_assert_warning
  • #6 rhythmdb_entry_set_internal
    at rhythmdb.c line 2424
  • #7 set_metadata_string_default_unknown
    at rhythmdb.c line 1216
  • #8 rhythmdb_process_metadata_load
    at rhythmdb.c line 1322
  • #9 rhythmdb_idle_poll_events
    at rhythmdb.c line 1679
  • #10 g_timeout_dispatch
    at gmain.c line 3292
  • #11 IA__g_main_context_dispatch
    at gmain.c line 1916
  • #12 g_main_context_iterate
    at gmain.c line 2547
  • #13 IA__g_main_loop_run
    at gmain.c line 2751
  • #14 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #15 main
    at main.c line 398

Comment 4 Jonathan Matthew 2006-03-10 22:45:29 UTC
CVS HEAD built with the --with-metadata-helper option (which will shortly become the default) won't crash when the GStreamer pipeline does.

In general, if you catch the crash in gdb, you can find out which file caused it with 'ls -l /proc/`pidof rhythmbox`/fd'.  The file name sometimes appears in the stack trace, too:

  • #26 rhythmdb_execute_stat
    at rhythmdb.c line 1898

This case may well be a duplicate of bug 332964, which is fixed in the latest gst-plugins-base release.  Does it happen every time for this file, or is it more or less random?

The stack trace in comment #3 shows a file with an invalid artist tag.  We shouldn't abort when that happens.  I'm not sure what we should do instead, but crashing like that never helps.

Comment 5 Michael R Head 2006-03-10 23:01:36 UTC
I moved that ogg out of the Albums directory, and I still get a backtrace.


RE: looking in /proc, here's what I get:

burner@firefighter:~/back$ ps ax |grep rhythm
15036 pts/0    S+     0:03 gdb ./rhythmbox
15037 pts/0    Tl     0:38 /tmp/rb-g/bin/rhythmbox
15108 pts/1    R+     0:00 grep rhythm
burner@firefighter:~/back$ ls -l /proc/15037/fd/
total 30
lrwx------ 1 burner burner 64 2006-03-10 17:59 0 -> /dev/pts/0
lrwx------ 1 burner burner 64 2006-03-10 17:59 1 -> /dev/pts/0
l-wx------ 1 burner burner 64 2006-03-10 17:59 10 -> pipe:[2611133]
lr-x------ 1 burner burner 64 2006-03-10 17:59 11 -> pipe:[2611134]
l-wx------ 1 burner burner 64 2006-03-10 17:59 12 -> pipe:[2611134]
lrwx------ 1 burner burner 64 2006-03-10 17:59 13 -> socket:[2611135]
lrwx------ 1 burner burner 64 2006-03-10 17:59 14 -> socket:[2611137]
lrwx------ 1 burner burner 64 2006-03-10 17:59 15 -> socket:[2611140]
lrwx------ 1 burner burner 64 2006-03-10 17:59 16 -> socket:[2611152]
lrwx------ 1 burner burner 64 2006-03-10 17:59 17 -> socket:[2611162]
lrwx------ 1 burner burner 64 2006-03-10 17:59 18 -> socket:[2611159]
lrwx------ 1 burner burner 64 2006-03-10 17:59 19 -> socket:[2611163]
lrwx------ 1 burner burner 64 2006-03-10 17:59 2 -> /dev/pts/0
lr-x------ 1 burner burner 64 2006-03-10 17:59 20 -> pipe:[2611173]
l-wx------ 1 burner burner 64 2006-03-10 17:59 21 -> pipe:[2611173]
lr-x------ 1 burner burner 64 2006-03-10 17:59 22 -> pipe:[2611174]
l-wx------ 1 burner burner 64 2006-03-10 17:59 23 -> pipe:[2611174]
lrwx------ 1 burner burner 64 2006-03-10 17:59 24 -> socket:[2611204]
lrwx------ 1 burner burner 64 2006-03-10 17:59 25 -> socket:[2611207]
lrwx------ 1 burner burner 64 2006-03-10 17:59 26 -> socket:[2611218]
lrwx------ 1 burner burner 64 2006-03-10 17:59 27 -> socket:[2611222]
lr-x------ 1 burner burner 64 2006-03-10 17:59 29 -> inotify
lr-x------ 1 burner burner 64 2006-03-10 17:59 3 -> pipe:[2611083]
lrwx------ 1 burner burner 64 2006-03-10 17:59 30 -> socket:[2611238]
l-wx------ 1 burner burner 64 2006-03-10 17:59 4 -> pipe:[2611083]
lr-x------ 1 burner burner 64 2006-03-10 17:59 5 -> /tmp/rb-g/bin/rhythmbox
lrwx------ 1 burner burner 64 2006-03-10 17:59 6 -> socket:[2611150]
lr-x------ 1 burner burner 64 2006-03-10 17:59 7 -> pipe:[2611132]
l-wx------ 1 burner burner 64 2006-03-10 17:59 8 -> pipe:[2611132]
lr-x------ 1 burner burner 64 2006-03-10 17:59 9 -> pipe:[2611133]


And here's my new trace (looks like the trace in comment #3, I think)

burner@firefighter:/tmp/rb-g/bin$ gdb ./rhythmbox
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) run
Starting program: /tmp/rb-g/bin/rhythmbox
[Thread debugging using libthread_db enabled]
[New Thread 1993483968 (LWP 15037)]
[New Thread 1983679408 (LWP 15041)]
[New Thread 1975286704 (LWP 15042)]

(rhythmbox:15037): Rhythmbox-WARNING **: /apps/rhythmbox/state/play_order gconf key not found!

(rhythmbox:15037): Rhythmbox-WARNING **: /apps/rhythmbox/state/play_order gconf key not found!
[New Thread 1974881200 (LWP 15049)]
[Thread 1974881200 (LWP 15049) exited]
[New Thread 1974881200 (LWP 15050)]
[Thread 1974881200 (LWP 15050) exited]
[New Thread 1974881200 (LWP 15052)]

(rhythmbox:15037): Rhythmbox-WARNING **: error: Failed to register the shell: (null)
This probably means that you installed Rhythmbox in a different prefix than bonobo-activation; this warning is harmless, but IPC will not work.
[New Thread 1962933168 (LWP 15054)]
[Thread 1974881200 (LWP 15052) exited]
[New Thread 1974881200 (LWP 15055)]
[New Thread 1950350256 (LWP 15056)]
[Thread 1962933168 (LWP 15054) exited]
[New Thread 1962933168 (LWP 15057)]
[Thread 1950350256 (LWP 15056) exited]
[Thread 1962933168 (LWP 15057) exited]
[Thread 1974881200 (LWP 15055) exited]
[New Thread 1974881200 (LWP 15059)]
[Thread 1974881200 (LWP 15059) exited]
[New Thread 1974881200 (LWP 15060)]
[Thread 1974881200 (LWP 15060) exited]
[New Thread 1974881200 (LWP 15061)]
[Thread 1974881200 (LWP 15061) exited]
[New Thread 1974881200 (LWP 15062)]
[New Thread 1962933168 (LWP 15063)]
[New Thread 1950350256 (LWP 15064)]
[New Thread 1939864496 (LWP 15065)]
[Thread 1939864496 (LWP 15065) exited]
[New Thread 1939864496 (LWP 15066)]
[New Thread 1927281584 (LWP 15067)]
[Thread 1927281584 (LWP 15067) exited]

RhythmDB-ERROR **: file rhythmdb.c: line 2416 (rhythmdb_entry_set_internal): assertion failed: (g_utf8_validate (g_value_get_string (value), -1, NULL))
aborting...

Program received signal SIGABRT, Aborted.

Thread 1993483968 (LWP 15037)

  • #0 __kernel_vsyscall
  • #1 raise
    from /lib/tls/i686/cmov/libc.so.6
  • #2 abort
    from /lib/tls/i686/cmov/libc.so.6
  • #3 IA__g_logv
  • #4 IA__g_log
    at gmessages.c line 517
  • #5 IA__g_assert_warning
  • #6 rhythmdb_entry_set_internal
    at rhythmdb.c line 2424
  • #7 set_metadata_string_default_unknown
    at rhythmdb.c line 1216
  • #8 rhythmdb_process_metadata_load
    at rhythmdb.c line 1322
  • #9 rhythmdb_idle_poll_events
    at rhythmdb.c line 1679
  • #10 g_timeout_dispatch
    at gmain.c line 3292
  • #11 IA__g_main_context_dispatch
    at gmain.c line 1916
  • #12 g_main_context_iterate
    at gmain.c line 2547
  • #13 IA__g_main_loop_run
    at gmain.c line 2751
  • #14 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #15 main
    at main.c line 398

Comment 6 Michael R Head 2006-03-10 23:04:07 UTC
BTW: I also have trouble with banshee (and muine, but muine doesn't use bug-buddy). Reported as bug #334174
Comment 7 Jonathan Matthew 2006-03-11 02:18:54 UTC
I guess the only way to find out what file is causing that problem is running 'rhythmbox -d 2>&1 | grep RHYTHMDB_ACTION_LOAD'.  The file causing the problem will be the last one listed in the debug output.

I can think of two reasonable options for how to handle invalid UTF-8 in tags: truncate the string at the end of the valid data, setting it to 'unknown' if it's empty, or report an import error for the file.
Comment 8 Christophe Fergeau 2006-03-11 12:14:11 UTC
I don't think we should get tags containing invalid UTF-8 at all, gstreamer should make sure this doesn't happen (whether it's actually the case or not, I dunno, but this is what I'd expect it to do). And we obviously should make sure not to corrupt valid UTF-8 tags when writing them to rhythmdb.xml ;)
Comment 9 Michael R Head 2006-03-11 16:03:12 UTC
Finally found the one track that was killing rhythmbox. I'm not sure I should share it in the gnome bugzilla because I don't own the copyright on it, but email me at my bugzilla email address and I can provide it.

BTW:  the 'rhythmbox -d 2>&1 | grep RHYTHMDB_ACTION_LOAD' trick didn't work so well because the thread that was crashing was no the thread that was reading the files (or so I believe), so the last songs printed out didn't contain the offending song. What I eventually did was to have rhythmbox import (and watch) a folder and slowly added my songs to that folder using a shell for loop with an 8 second sleep. When rb eventually crashed, I was able to see which song had last been copied in and removed it from my library.

mike
Comment 10 Guillaume Desmottes 2006-03-11 17:43:38 UTC
This bug was also reported here: https://launchpad.net/distros/ubuntu/+source/rhythmbox/+bug/33680
Comment 11 Jonathan Matthew 2006-03-14 10:11:51 UTC
*** Bug 332623 has been marked as a duplicate of this bug. ***
Comment 12 Jonathan Matthew 2006-03-14 11:06:15 UTC
Created attachment 61220 [details] [review]
totally untested patch

I don't have any broken files to test with, but this should convert invalid utf8 characters to question marks, rather than aborting when one is encountered.
If anyone experiencing this problem could test this patch, it would be much appreciated.
Comment 13 Michael R Head 2006-03-14 12:26:13 UTC
Hmm.. I tried the patch against RB 0.9.3.1 and some hunks failed. Which version is the patch against?

burner@phoenix:~/Desktop/rhythmbox-0.9.3.1$ cat ../rb.patch | patch
can't find file to patch at input line 3
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|--- old-argh/lib/rb-util.h     2006-03-14 21:04:18.000000000 +1000
|+++ new-argh/lib/rb-util.h     2006-03-14 21:04:18.000000000 +1000
--------------------------
File to patch: lib/rb-util.h
patching file lib/rb-util.h
Hunk #1 succeeded at 52 with fuzz 2 (offset -7 lines).
can't find file to patch at input line 15
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|
|--- old-argh/lib/rb-util.c     2006-03-14 21:04:18.000000000 +1000
|+++ new-argh/lib/rb-util.c     2006-03-14 21:04:18.000000000 +1000
--------------------------
File to patch: lib/rb-util.c
patching file lib/rb-util.c
Hunk #1 FAILED at 667.
1 out of 1 hunk FAILED -- saving rejects to file lib/rb-util.c.rej
can't find file to patch at input line 60
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|
|--- old-argh/rhythmdb/rhythmdb.c       2006-03-14 21:04:18.000000000 +1000
|+++ new-argh/rhythmdb/rhythmdb.c       2006-03-14 21:04:18.000000000 +1000
--------------------------
File to patch: rhythmdb/rhythmdb.c
patching file rhythmdb/rhythmdb.c
Hunk #1 FAILED at 2456.
Hunk #2 succeeded at 2580 (offset -56 lines).
1 out of 2 hunks FAILED -- saving rejects to file rhythmdb/rhythmdb.c.rej
Comment 14 Jonathan Matthew 2006-03-14 13:25:38 UTC
Created attachment 61223 [details] [review]
totally untested patch for 0.9.3.1

The previous patch is against CVS HEAD.  This should apply to 0.9.3.1 cleanly.  I haven't even run the resulting binary, though.
Comment 15 Christophe Fergeau 2006-03-14 13:48:51 UTC
Is that normal that we end up with non-UTF-8 data in rhythmdb_entry_set_internal in the first place? 
Comment 16 Christophe Fergeau 2006-03-16 10:37:41 UTC
Ok, I tested the file Michael is having issues with, with the dapper packages, it crashes, with gstreamer/gst-plugins and rhythmbox from CVS, it doesn't crash. 
Comment 17 Christophe Fergeau 2006-03-16 10:39:59 UTC
GStreamer from dapper:
$ gst-launch-0.10 -t playbin uri=file:///home/teuf/media-test/Jeru\ The\ Damaja-\ Verses\ Of\ Doom.mp3
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
TAG DECOUVERT   : decouvert par l'element "id3demux0".
        artiste: ���䨀攀爀甀 吀栀攀 䐀愀洀愀樀愀
          album: Tony Hawk Pro Skater 4 Soundtrack
    commentaire: brought by WmC-PL
numéro de piste: 0

GStreamer CVS:
$  gst-launch-0.10 -t playbin uri=file:///home/teuf/media-test/Jeru\ The\ Damaja-\ Verses\ Of\ Doom.mp3
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
TAG DECOUVERT   : decouvert par l'element "id3demux0".
        artiste: Jeru The Damaja
          album: Tony Hawk Pro Skater 4 Soundtrack
    commentaire: brought by WmC-PL
numéro de piste: 0

GStreamer was giving us a non-UTF-8 title. Jonathan, should we close that bug, or do you want to do somethign in case rhythmdb_entry_set_internal gets a non-UTF-8 string?
Comment 18 Jonathan Matthew 2006-03-16 11:37:13 UTC
If this condition always means that GStreamer has returned junk data, then there's no point trying to convert it to something valid.  We should either ignore the string, or make the file import fail and report an error to the user.  I think it's better to ignore the string, since we can probably still play the file OK.

We should probably leave the assert as it is, and add a check in the metadata reader, and anything else that takes external data to insert into the database (daap, musicbrainz, whatever else).

Adding invalid utf-8 to rhythmdb.xml causes libxml2 to ignore the whole file, so we don't have to worry about that.
Comment 19 Jonathan Matthew 2006-03-17 11:19:12 UTC
Created attachment 61430 [details] [review]
ignore invalid utf-8 tag data

Perhaps replacing the invalid string with '<invalid unicode>' or similar would be a good idea.  I'm not sure whether musicbrainz already does utf8 validation, or where the check would go if it doesn't, so I haven't done anything about it for this patch.
Comment 20 Jonathan Matthew 2006-03-18 03:13:22 UTC
*** Bug 334753 has been marked as a duplicate of this bug. ***
Comment 21 Tim-Philipp Müller 2006-03-21 18:44:00 UTC
FWIW, I've added a check to GStreamer now that makes sure that strings in taglists are always valid UTF-8. The crash in mp3_type_find() looks like bug #332964 and should be fixed since the gst-plugins-base 0.10.4 release.
Comment 22 James "Doc" Livingston 2006-03-27 06:44:21 UTC
The patch looks good to commit, unless you wanted to make it replace the string with '<invalid unicode>'.
Comment 23 Jonathan Matthew 2006-03-27 11:58:20 UTC
I've committed the patch as is.  Since we still need to check data returned by musicbrainz, I'm leaving the bug open.
Comment 24 James "Doc" Livingston 2006-04-01 03:40:39 UTC
Created attachment 62508 [details] [review]
check musicbrainz strings

Makes the audio cd source check all strings before using them, replacing invlid ones with "<invalid unicode>"
Comment 25 Bruno Santos 2006-04-04 17:05:03 UTC
*** Bug 337226 has been marked as a duplicate of this bug. ***
Comment 26 James "Doc" Livingston 2006-04-09 05:16:46 UTC
I've committed the patch to cvs, so that should fix the last part of this bug.
Comment 27 Alex Lancaster 2007-01-10 01:44:58 UTC
*** Bug 394833 has been marked as a duplicate of this bug. ***