GNOME Bugzilla – Bug 750100
Now playing crashes on click
Last modified: 2020-03-17 09:50:55 UTC
Clicking on Now playing crashes Banshee. This is likely something related to the video stuff because when removing all calls to the Gdk video window at least the music view is shown correctly. Stacktrace below: Stacktrace: at <unknown> <0xffffffff> at (wrapper managed-to-native) Gdk.Window.gdk_window_reparent (intptr,intptr,int,int) <IL 0x0002e, 0xffffffff> at Gdk.Window.Reparent (Gdk.Window,int,int) [0x0001f] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/gtk-sharp-2.99.3.99/gdk/generated/Gdk/Window.cs:1163 at Banshee.NowPlaying.XOverlayVideoDisplay.OnRealized () [0x0002d] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/XOverlayVideoDisplay.cs:55 at Gtk.Widget.Realized_cb (intptr) [0x00010] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/gtk-sharp-2.99.3.99/gtk/generated/Gtk/Widget.cs:1731 at (wrapper native-to-managed) Gtk.Widget.Realized_cb (intptr) <IL 0x00029, 0xffffffff> at <unknown> <0xffffffff> at (wrapper managed-to-native) object.wrapper_native_0x263ff60 (intptr) <IL 0x0002b, 0xffffffff> at (wrapper native-to-managed) object.wrapper_native_0x263ff60 (intptr) <IL 0x00029, 0xffffffff> at <unknown> <0xffffffff> at (wrapper managed-to-native) object.wrapper_native_0x263ff60 (intptr) <IL 0x0002b, 0xffffffff> at (wrapper native-to-managed) object.wrapper_native_0x263ff60 (intptr) <IL 0x00029, 0xffffffff> at <unknown> <0xffffffff> at (wrapper managed-to-native) object.wrapper_native_0x263ff60 (intptr) <IL 0x0002b, 0xffffffff> at (wrapper native-to-managed) object.wrapper_native_0x263ff60 (intptr) <IL 0x00029, 0xffffffff> at <unknown> <0xffffffff> at (wrapper managed-to-native) Gtk.Widget.gtk_widget_show (intptr) <IL 0x0002b, 0xffffffff> at Gtk.Widget.Show () [0x00007] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/gtk-sharp-2.99.3.99/gtk/generated/Gtk/Widget.cs:6541 at Nereid.PlayerInterface.UpdateSourceContents (Banshee.Sources.Source) [0x00078] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Clients/Nereid/Nereid/PlayerInterface.cs:522 at Nereid.PlayerInterface/<OnSourcePropertyChanged>c__AnonStorey2.<>m__0 () [0x00012] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Clients/Nereid/Nereid/PlayerInterface.cs:483 at Hyena.ThreadAssist.ProxyToMain (Hyena.InvokeHandler) [0x0001f] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Hyena/Hyena/Hyena/ThreadAssist.cs:103 at Nereid.PlayerInterface.OnSourcePropertyChanged (object,Hyena.Data.PropertyChangeEventArgs) [0x0005c] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Clients/Nereid/Nereid/PlayerInterface.cs:482 at (wrapper delegate-invoke) <Module>.invoke_void_object_PropertyChangeEventArgs (object,Hyena.Data.PropertyChangeEventArgs) <IL 0x00061, 0xffffffff> at Hyena.Data.PropertyStore.OnPropertyChanged (string,bool,bool,object,object) [0x0001f] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Hyena/Hyena/Hyena.Data/PropertyStore.cs:91 at Hyena.Data.PropertyStore.Set<T> (string,T) [0x000d9] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Hyena/Hyena/Hyena.Data/PropertyStore.cs:152 at Banshee.NowPlaying.NowPlayingSource.Activate () [0x00029] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/NowPlayingSource.cs:140 at Banshee.Sources.SourceManager.SetActiveSource (Banshee.Sources.Source,bool) [0x0009c] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Core/Banshee.Services/Banshee.Sources/SourceManager.cs:418 at Banshee.Sources.SourceManager.SetActiveSource (Banshee.Sources.Source) [0x00004] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Core/Banshee.Services/Banshee.Sources/SourceManager.cs:387 at Banshee.Sources.Gui.SourceView.OnButtonPressEvent (Gdk.EventButton) [0x0018b] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs:327 at Gtk.Widget.ButtonPressEvent_cb (intptr,intptr) [0x00016] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/gtk-sharp-2.99.3.99/gtk/generated/Gtk/Widget.cs:2831 at (wrapper native-to-managed) Gtk.Widget.ButtonPressEvent_cb (intptr,intptr) <IL 0x0002c, 0xffffffff> at <unknown> <0xffffffff> at (wrapper managed-to-native) Gtk.Application.gtk_main () <IL 0x0002a, 0xffffffff> at Gtk.Application.Run () [0x00001] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/gtk-sharp-2.99.3.99/gtk/Application.cs:133 at Banshee.Gui.GtkBaseClient.Run () [0x0001e] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs:226 at Banshee.Gui.GtkBaseClient.Startup () [0x00010] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs:79 at Hyena.Gui.CleanRoomStartup.Startup (Hyena.Gui.CleanRoomStartup/StartupInvocationHandler) [0x00050] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Hyena/Hyena.Gui/Hyena.Gui/CleanRoomStartup.cs:54 at Banshee.Gui.GtkBaseClient.Startup<T> () [0x00049] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs:74 at Banshee.Gui.GtkBaseClient.Startup<T> (string[]) [0x00021] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs:64 at Nereid.Client.Main (string[]) [0x00002] in /Users/Stephan/Sourcecode/bockbuild/profiles/banshee/build-root/banshee-2.99/src/Clients/Nereid/Nereid/Client.cs:54 at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00060, 0xffffffff> Native stacktrace: Debug info from gdb: (lldb) command source -s 1 '/tmp/mono-gdb-commands.ell7Fv' ================================================================= Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. ================================================================= Process 42005 detached (lldb)
Which gtk version? (In reply to Stephan Sundermann from comment #0) > ... when removing all calls to the Gdk video window at > least the music view is shown correctly. Can you clarify this? What's the "calls to the Gdk video window" and what's the "music view"?
Gtk 3.16 With music view I refer to the cover art and that kind of stuff. When completly removing the video window from the Now Playing extension, it doesn't crash anymore and displays the music information.
(In reply to Stephan Sundermann from comment #2) > Gtk 3.16 Ok, can you check if this happens with Gtk 3.10 please?
3.10 crashes with the same stacktrace.
Created attachment 305577 [details] [review] Partially working patch It seems that gdk's quartz backend has problem with reparenting windows and calling reparent crashes the application for child windows. Banshee uses such a window to draw the video on. As a workaround a GtkDrawingArea can be used which creates the GdkWindow itself. This is also what the gstreamer samples found at http://cgit.freedesktop.org/~slomo/gst-sdk-tutorials/tree/gst-sdk/tutorials/basic-tutorial-5.c do. The next problem is that gdk by default may create non native windows. This is the case for the quartz backend. When creating a new gdk window, gdk will not create a new NSView but will draw the window inside of the default NSView for the whole application. The gdk window bounds are then just calculated inside of the toplevel NSView. This behaviour can be disabled by calling gdk_window_ensure_native which will return a boolean indicating whether the backend did actually create the native window. The quartz backend supports native windows. Another problem now is that native child windows cannot be resized on osx. Thus the video window will not resize when the application is resized. Another problem with my patch is that when switching between the views the video display will not show up again. This is probably because the underlying NSView is destroyed when the view is switched.
Good work! A shame that it's still not perfect! BTW now that you're talking about reparenting, maybe this is related to the HACK that we had for OSX with GTKv2? See: https://github.com/BansheeMediaPlayer/bockbuild/commit/c1e76ad7717975523448442ae15ca23cfa835f3d#diff-e9d3b80ec503cd7e89cfe21e42d8461a , which now lives here: https://github.com/BansheeMediaPlayer/bockbuild/blob/stable-2.6/packages/patches/gtk-sharp/0001-gdk_window_quartz_reparent-crashes-banshee.patch
Interesting, I'll try if this workaround does still work with gtk3. But I doubt it will fix gdk window resizing.
Cool. After testing that workaround you could also test the patches proposed in https://bugzilla.gnome.org/show_bug.cgi?id=658722, which I'm guessing were not committed yet (bug 682889 was marked as a duplicate of this bug).
It seems that Dynalon's patches were done against Gtk.Widget' reparent. But I'm experiencing these issues with Gdk.Window's reparent. The patch cannot be applied in a similar manner, since Gdk.Window doesn't have method's for remove and add. I'll test the gtk drag and drop fixes and go through the gtk bugzilla for osx if there are any patches which might fix the problems.
(In reply to Stephan Sundermann from comment #9) > It seems that Dynalon's patches were done against Gtk.Widget' reparent. But > I'm experiencing these issues with Gdk.Window's reparent. The patch cannot > be applied in a similar manner, since Gdk.Window doesn't have method's for > remove and add. Ok, but anyway take in account that I forgot to mention that his patch needs to be applied also in conjunction with this patch: https://github.com/BansheeMediaPlayer/bockbuild/blob/stable-2.6/packages/banshee.py#L8 > I'll test the gtk drag and drop fixes and go through the gtk bugzilla for > osx if there are any patches which might fix the problems. Sounds good!
(In reply to Andrés G. Aragoneses (IRC: knocte) from comment #10) > (In reply to Stephan Sundermann from comment #9) > > It seems that Dynalon's patches were done against Gtk.Widget' reparent. But > > I'm experiencing these issues with Gdk.Window's reparent. The patch cannot > > be applied in a similar manner, since Gdk.Window doesn't have method's for > > remove and add. > > Ok, but anyway take in account that I forgot to mention that his patch needs > to be applied also in conjunction with this patch: > https://github.com/BansheeMediaPlayer/bockbuild/blob/stable-2.6/packages/ > banshee.py#L8 It fixes the crashes for the Now Playing extension but trying to play a video will still crash the application. The downside of this patch is that only a grey window will be displayed the first time the Now Playing extension is shown. The Now Playing display will be shown correctly when switching to it a second time though. > > > > I'll test the gtk drag and drop fixes and go through the gtk bugzilla for > > osx if there are any patches which might fix the problems. > Actually, I couldn't find a difference with and without applying the drag and drop fixes.
Banshee is not under active development anymore and had its last code changes more than three years ago. Its codebase has been archived. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is being shut down) if anyone takes the responsibility for active development again. See https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/264 for more info.