GNOME Bugzilla – Bug 694142
Crash on media pass on commandline
Last modified: 2016-03-31 13:22:07 UTC
There seems to have been a regression introduce lately that causes a crash if you pass a media to boxes on commandline: Program received signal SIGSEGV, Segmentation fault. 0x000000000042a178 in _____lambda198_ (_data4_=0x1e965a0) at /extra-data/checkout/gnome/gnome-boxes/src/app.vala:271 271 call_when_ready (() => { Missing separate debuginfos, use: debuginfo-install celt051-0.5.1.3-5.fc18.x86_64 gsm-1.0.13-7.fc18.x86_64 gtk-vnc2-0.5.1-5.fc18.x86_64 gvnc-0.5.1-5.fc18.x86_64 json-c-0.10-2.fc18.x86_64 libgudev1-197-1.fc18.2.x86_64 libnl3-3.2.21-1.fc18.x86_64 libpng-1.5.13-1.fc18.x86_64 libunistring-0.9.3-6.fc18.x86_64 libusbx-1.0.14-1.fc18.x86_64 libwayland-client-1.0.3-1.fc18.x86_64 libwayland-server-1.0.3-1.fc18.x86_64 systemd-libs-197-1.fc18.2.x86_64 tracker-0.14.4-1.fc18.x86_64 xz-libs-5.1.2-2alpha.fc18.x86_64 (gdb) bt
+ Trace 231535
Need to fix this before releasing tomorrow.
Created attachment 236730 [details] [review] Fix crash when passing media on command line We need the call_when_ready delegate to be "owned" or we don't get a ref to the continuation (so it'll be freed when we later call it).
Review of attachment 236730 [details] [review]: Thanks for debugging this! ::: src/app.vala @@ +195,3 @@ if (is_ready) func (); ready.connect (() => { Should vala ref the delegate and the continuation when we use it in a callback?
There is no way to "ref" an unowned delegate, its just a function pointer. The only way to handle this is to use function pointer + destroy notify in a _full() style callback. This is what an owned delegate means in vala.
Attachment 236730 [details] pushed as 6d3253a - Fix crash when passing media on command line