GNOME Bugzilla – Bug 642271
crash in gst_caps_structure_intersect, encoder_match_media_type
Last modified: 2011-03-08 08:11:03 UTC
Version: 0.13.3 What were you doing when the application crashed? Copy a track to media player (with transcode) I tried to copy a track to an external devices that would trigger a transcode from flac to mp3 or aac and it crashed. The track is located on a nfs share and the media player is a nokia 5200. It is not officially in the media-player-info package as far as I know but I copied info from 5300 which mostly is the same device (only difference I know is that it gets a better remote to get the XpressMusic tag). Distribution: Gentoo Base System release 2.0.1-r1 Gnome Release: 2.32.1 2010-12-06 (Gentoo) BugBuddy Version: 2.32.0 System: Linux 2.6.37-gentoo #1 SMP Mon Jan 24 09:20:26 CET 2011 x86_64 X Vendor: The X.Org Foundation X Vendor Release: 10903901 Selinux: No Accessibility: Disabled GTK+ Theme: Shiki-Dust Icon Theme: gnome GTK+ Modules: canberra-gtk-module, gnomesegvhandler, globalmenu-plugin Memory status: size: 858361856 vsize: 858361856 resident: 84312064 share: 33337344 rss: 84312064 rss_rlim: 18446744073709551615 CPU usage: start_time: 1297671092 rtime: 2187 utime: 2026 stime: 161 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 100 Backtrace was generated from '/usr/bin/rhythmbox' [Thread debugging using libthread_db enabled] [New Thread 0x7f7eb9050700 (LWP 30846)] [New Thread 0x7f7ed3d92700 (LWP 30830)] 0x00007f7ee31cb08d in __libc_waitpid (pid=<value optimized out>, stat_loc=<value optimized out>, options=<value optimized out>) at ../sysdeps/unix/sysv/linux/waitpid.c:41 in ../sysdeps/unix/sysv/linux/waitpid.c
+ Trace 225958
Thread 1 (Thread 0x7f7ee555f900 (LWP 30829))
Inferior 1 [process 30829] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] ---- Critical and fatal warnings logged during execution ---- ** GLib-GObject **: g_object_unref: assertion `G_IS_OBJECT (object)' failed ** GLib-GObject **: g_type_class_add_private: assertion `private_size > 0' failed ** GLib-GObject **: g_object_unref: assertion `G_IS_OBJECT (object)' failed ** Gtk **: IA__gtk_progress_set_percentage: assertion `percentage >= 0 && percentage <= 1.0' failed ** GLib-GObject **: g_object_unref: assertion `G_IS_OBJECT (object)' failed ** GLib **: g_str_has_suffix: assertion `str != NULL' failed ** GLib-GObject **: g_object_unref: assertion `G_IS_OBJECT (object)' failed ----------- .xsession-errors (139 sec old) --------------------- RhythmDB:ERROR:rhythmdb-property-model.c:611:rhythmdb_property_model_prop_changed_cb: assertion failed: (g_hash_table_remove (propmodel->priv->entries, entry)) (nautilus:2610): GLib-GObject-CRITICAL **: g_object_ref: assertion `object->ref_count > 0' failed (nautilus:2610): Nautilus-GDU-WARNING **: unable to query info: L'emplacement indiqué n'est pas pris en charge (nautilus:2610): Nautilus-GDU-WARNING **: unable to query info: L'emplacement indiqué n'est pas pris en charge (nautilus:2610): GLib-GObject-CRITICAL **: g_object_ref: assertion `object->ref_count > 0' failed (nautilus:2610): GLib-GObject-CRITICAL **: g_object_ref: assertion `object->ref_count > 0' failed Avertissement du gestionnaire de fenêtres : Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x6000046 (Lecteur de) Avertissement du gestionnaire de fenêtres : meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed. --------------------------------------------------
(In reply to comment #0) > the media player is a nokia 5200. It is > not officially in the media-player-info package as far as I know but I copied > info from 5300 which mostly is the same device (only difference I know is that > it gets a better remote to get the XpressMusic tag). > Could you report this to media-player-info bugzilla (on bugs.freedesktop.org) so that it can get added in future releases? Thanks!
sure, I've only refrained from doing it because my phone usb stack seems to have problems and I don't know how widespread this problem is.
Ok, I actually double checked this bug on a 0.12.8 and got an idea, there was a .is_media_player on the memory card which had a output_formats list separated by ; instead of ,. It was invalid and it seems rhythmbox logically trips up on it. Fixing the file made the feature work seamlessly. I'll remove it as soon as I whip up a little patch to media-player-info. Thanks guys and sorry for wasting your time.
If you can get rhythmbox to crash by putting an invalid .is_audio_player file on an usb key, that's bad and needs to be fixed so this bug wouldn't be a waste of time ;)
I think this is actually a GStreamer bug - calling gst_caps_new_simple (media_type, NULL) with a bad media type results in a broken caps instance that will cause gst_caps_* functions to crash.
Created attachment 182412 [details] [review] simple fix When gst_structure_new_valist returns NULL, don't insert that into the caps instance, just leave it empty.
Looks great, I'll push this together with a unit test.
Created attachment 182767 [details] [review] simple test for the bug
Created attachment 182768 [details] [review] Check media_type arg to gst_caps_new_simple I'd prefer this over attachment #182412 [details] as returning empty caps is probably not expected either and might just conceal the error.
The problem I'm trying to fix is when when gst_structure_validate_name (media_type) returns FALSE, not just when media_type is NULL.
Comment on attachment 182767 [details] [review] simple test for the bug wrong file attached :/
(In reply to comment #10) > The problem I'm trying to fix is when when gst_structure_validate_name > (media_type) returns FALSE, not just when media_type is NULL. True, I pushed you patch with a small modification. I'll push my test later today from home. commit 2bbfa3304ce183a1ef936023b4959c4134161c46 Author: Jonathan Matthew <jonathan@d14n.org> Date: Fri Mar 4 08:28:25 2011 +1000 caps: don't create broken caps for invalid media types Check if structure has been created before appending it to the caps. Free the caps in the case of an error to not conceal it be returning empty caps. Fixes #642271
Comment on attachment 182412 [details] [review] simple fix Committed with small change.