GNOME Bugzilla – Bug 761202
Crash when leaving VNC connection
Last modified: 2016-09-20 08:15:55 UTC
* Open a VNC connection * Press the back button in the upper left Boxes crashes 100% for me. Check the See Also field for a full backtrace in the downstream bug.
maybe the signal lives longer than the display this avoids the crash for me: diff --git a/src/vnc-display.vala b/src/vnc-display.vala index 8cf5d42..e78c474 100644 --- a/src/vnc-display.vala +++ b/src/vnc-display.vala @@ -70,9 +70,7 @@ display.close (); }); - this.notify["config"].connect (() => { - config.sync_properties (display, sync_properties); - }); + this.config.sync_properties (display, sync_properties); } public VncDisplay (BoxConfig config, string host, int port) {
(In reply to Pavel Grunt from comment #1) > maybe the signal lives longer than the display Hmm.. that is very much possible. I'll see if we can use g_signal_connect_object() from vala. > this avoids the crash for me: Thanks for helping out with investigation. :)
Looking at the backtrace, i don't think that's the issue here but it's just that not connecting to the signal, means this code doesn't get called:
+ Trace 236088
There is still some issue of 'readonly' property of VNC display not getting loaded after it's changed via properties launched from overview but that would a separate bug. --- commit: 262cfe580c18cdbbbae5e3e8c6523ecf9f444b81 Date: Wed Mar 16 16:54:06 2016 +0000 box-config: SyncProperty -> SavedProperty SyncProperty is a silly and confusing name. commit: 498461a841545a20488f3a08bca4b79cd2185a83 Date: Wed Mar 16 15:37:14 2016 +0000 box-config: Don't access passed array after method returns Seems we can't rely on the passed array of structs to be around in a closure and get a crash. This patch fixes a crash when going back to overview from a VNC display. commit: fe4f075a1f4e3feb515c81b2c03c499c1317f32b Date: Wed Mar 16 16:03:27 2016 +0000 machine: Add a null check The 'window' is already gone when display is hidden as part of Boxes shutdown so accessing it only crashes Boxes on exit. commit: 031b7918dee1ff016d74a69515f9cdbabc4b6b31 Date: Wed Mar 16 16:28:40 2016 +0000 display: config property now protected It's only set by subclasses anyway. commit: 447d66dfbb6ea372b1fb48f545a5de675463f2c5 Date: Wed Mar 16 16:30:41 2016 +0000 spice,vnc: Simplify setting up syncing of properties Instead of hooking-up to 'config' property changes to set-up syncing of saved properties of display, let's just do that already after initializing 'config' property (which happens once anyway).
Filed bug#763772 for Read-only not getting saved/loaded.
*** Bug 767490 has been marked as a duplicate of this bug. ***