GNOME Bugzilla – Bug 727858
gnome-shell crashed
Last modified: 2014-04-10 18:40:43 UTC
Program terminated with signal 11, Segmentation fault.
+ Trace 233451
see also https://bugzilla.mozilla.org/show_bug.cgi?id=972725 https://bugzilla.redhat.com/show_bug.cgi?id=1034467 and https://bugzilla.redhat.com/show_bug.cgi?id=1028813
in particular, see this comment from the mozilla bug: > SpiderMonkey embeddings /must not/ call back into the API from a finalizer, > full stop. We do allow API usage, including running (almost) arbitrary script > code, during GC, but /only/ during the JSGCCallback when the phase is > JSGC_END. Gecko has the same need: it implements something called "delayed > finalization." The idea is that when finalizers need to interact with > SpiderMonkey they push the operation into a list, then run these operations in > order when they get the JSGC_END callback. I guess gnome-shell needs something > similar.
i have a patch in mind, but I haven't tested it yet. I'll attach it for comments.
Created attachment 274027 [details] [review] gi: don't finalize gobject until idle Right now gobjects get finalized as part of the GC process. Finalizing a gobject can lead to javascript code getting run. javascript code isn't allowed to be run while the GC is active. This commit introduces a ref to objects about to be finalized, that gets unrefed on idle to ensure the last reference is always dropped when the GC is inactive.
This is somehow a duplicate of bug 725024, which has a different fix (it just avoids calling into JS code, and expects apps to dispose stuff manually beforehand, which is ok for clutter and gtk)
*** This bug has been marked as a duplicate of bug 725024 ***