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 719730 - UserWidget: replace vfunc_destroy override with a signal connection
UserWidget: replace vfunc_destroy override with a signal connection
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-12-02 22:53 UTC by Giovanni Campagna
Modified: 2013-12-02 23:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
UserWidget: replace vfunc_destroy override with a signal connection (1.92 KB, patch)
2013-12-02 22:53 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2013-12-02 22:53:28 UTC
The crash we were talking about in IRC today. I got a backtrace confirming
that it was a spontaneous GC in the main thread, and I got a JS trace
pointing to vfunc_destroy() called in an apparently impossible context.
Comment 1 Giovanni Campagna 2013-12-02 22:53:32 UTC
Created attachment 263349 [details] [review]
UserWidget: replace vfunc_destroy override with a signal connection

The destroy vfunc might be called during object finalization, and
we can't call any JS from a GC finalizer, so we use a signal
connection instead, as that is removed by GObject the first time
the object is disposed.
Comment 2 Colin Walters 2013-12-02 22:58:21 UTC
Review of attachment 263349 [details] [review]:

Ah, yes.  Probably gjs should outright ban connecting to GObject::destroy.
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-12-02 23:00:00 UTC
(In reply to comment #2)
> Ah, yes.  Probably gjs should outright ban connecting to GObject::destroy.

It's ClutterActor::destroy. We don't have a generic destroy signal/vfunc.
Comment 4 Colin Walters 2013-12-02 23:03:39 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Ah, yes.  Probably gjs should outright ban connecting to GObject::destroy.
> 
> It's ClutterActor::destroy. We don't have a generic destroy signal/vfunc.

Er, right, I was thinking of dispose.
Comment 5 Giovanni Campagna 2013-12-02 23:07:02 UTC
Pushed (git bz failed)