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 642271 - crash in gst_caps_structure_intersect, encoder_match_media_type
crash in gst_caps_structure_intersect, encoder_match_media_type
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal critical
: 0.10.33
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-02-14 08:17 UTC by Gilles Dartiguelongue
Modified: 2011-03-08 08:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.31/2.32


Attachments
simple fix (828 bytes, patch)
2011-03-03 22:31 UTC, Jonathan Matthew
committed Details | Review
simple test for the bug (828 bytes, patch)
2011-03-07 21:15 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
Check media_type arg to gst_caps_new_simple (1.33 KB, patch)
2011-03-07 21:17 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review

Description Gilles Dartiguelongue 2011-02-14 08:17:45 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

Thread 1 (Thread 0x7f7ee555f900 (LWP 30829))

  • #0 __libc_waitpid
    at ../sysdeps/unix/sysv/linux/waitpid.c line 41
  • #1 g_spawn_sync
    at gspawn.c line 392
  • #2 g_spawn_command_line_sync
    at gspawn.c line 706
  • #3 run_bug_buddy
    at gnome-segvhanlder.c line 240
  • #4 bugbuddy_segv_handle
    at gnome-segvhanlder.c line 191
  • #5 <signal handler called>
  • #6 raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #7 abort
    at abort.c line 92
  • #8 g_assertion_message
  • #9 g_assertion_message_expr
    at gtestutils.c line 1369
  • #10 gst_caps_structure_intersect
    at gstcaps.c line 1260
  • #11 gst_caps_intersect
    at gstcaps.c line 1484
  • #12 encoder_match_media_type
    at rb-encoder-gst.c line 756
  • #13 get_profile_from_media_type
    at rb-encoder-gst.c line 903
  • #14 rb_encoder_gst_get_media_type
    at rb-encoder-gst.c line 1226
  • #15 rb_track_transfer_batch_check_media_types
    at rb-track-transfer-batch.c line 182
  • #16 start_next_batch
    at rb-track-transfer-queue.c line 353
  • #17 impl_paste
    at rb-removable-media-source.c line 438
  • #18 impl_receive_drag
    at rb-removable-media-source.c line 601
  • #19 g_closure_invoke
    at gclosure.c line 767
  • #20 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #21 g_signal_emit_valist
    at gsignal.c line 2983
  • #22 g_signal_emit
    at gsignal.c line 3040
  • #23 g_closure_invoke
    at gclosure.c line 767
  • #24 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #25 g_signal_emit_valist
    at gsignal.c line 2983
  • #26 g_signal_emit
    at gsignal.c line 3040
  • #27 rb_display_page_model_drag_data_received
    at rb-display-page-model.c line 137
  • #28 rb_tree_dnd_drag_data_received_cb
    at rb-tree-dnd.c line 859
  • #29 _gtk_marshal_VOID__OBJECT_INT_INT_BOXED_UINT_UINT
    at gtkmarshalers.c line 2235
  • #30 g_closure_invoke
    at gclosure.c line 767
  • #31 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #32 g_signal_emit_valist
    at gsignal.c line 2983
  • #33 g_signal_emit_by_name
    at gsignal.c line 3077
  • #34 gtk_drag_selection_received
    at gtkdnd.c line 1783
  • #35 g_closure_invoke
    at gclosure.c line 767
  • #36 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #37 g_signal_emit_valist
    at gsignal.c line 2983
  • #38 g_signal_emit_by_name
    at gsignal.c line 3077
  • #39 gtk_selection_retrieval_report
    at gtkselection.c line 2939
  • #40 IA__gtk_selection_convert
    at gtkselection.c line 1089
  • #41 rb_tree_dnd_drag_drop_cb
    at rb-tree-dnd.c line 823
  • #42 _gtk_marshal_BOOLEAN__OBJECT_INT_INT_UINT
    at gtkmarshalers.c line 413
  • #43 g_closure_invoke
    at gclosure.c line 767
  • #44 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #45 g_signal_emit_valist
    at gsignal.c line 2993
  • #46 g_signal_emit_by_name
    at gsignal.c line 3077
  • #47 gtk_drag_dest_drop
    at gtkdnd.c line 2295
  • #48 gtk_drag_find_widget
    at gtkdnd.c line 1865
  • #49 _gtk_drag_dest_handle_event
    at gtkdnd.c line 1622
  • #50 IA__gtk_main_do_event
    at gtkmain.c line 1696
  • #51 gdk_event_dispatch
    at gdkevents-x11.c line 2377
  • #52 g_main_dispatch
    at gmain.c line 2440
  • #53 g_main_context_dispatch
    at gmain.c line 3013
  • #54 g_main_context_iterate
    at gmain.c line 3091
  • #55 g_main_loop_run
    at gmain.c line 3299
  • #56 IA__gtk_main
    at gtkmain.c line 1244
  • #57 main
    at main.c line 336

	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.
--------------------------------------------------
Comment 1 Christophe Fergeau 2011-02-14 11:52:00 UTC
(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!
Comment 2 Gilles Dartiguelongue 2011-02-14 13:25:42 UTC
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.
Comment 3 Gilles Dartiguelongue 2011-02-14 17:51:27 UTC
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.
Comment 4 Christophe Fergeau 2011-02-14 18:22:31 UTC
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 ;)
Comment 5 Jonathan Matthew 2011-03-03 22:30:02 UTC
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.
Comment 6 Jonathan Matthew 2011-03-03 22:31:35 UTC
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.
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-07 20:53:14 UTC
Looks great, I'll push this together with a unit test.
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-07 21:15:58 UTC
Created attachment 182767 [details] [review]
simple test for the bug
Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-07 21:17:43 UTC
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.
Comment 10 Jonathan Matthew 2011-03-07 21:59:43 UTC
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 11 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-08 07:51:32 UTC
Comment on attachment 182767 [details] [review]
simple test for the bug

wrong file attached :/
Comment 12 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-08 08:10:01 UTC
(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 13 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-08 08:11:03 UTC
Comment on attachment 182412 [details] [review]
simple fix

Committed with small change.