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 686016 - critical warning out of st-im-text.c
critical warning out of st-im-text.c
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-10-12 10:12 UTC by Matthias Clasen
Modified: 2012-10-12 12:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
st-im-text: Chain up to parent first in dispose() (1.04 KB, patch)
2012-10-12 10:36 UTC, Florian Müllner
committed Details | Review

Description Matthias Clasen 2012-10-12 10:12:25 UTC
Seen in my logs after unlocking the lock screen:

Window manager warning: Log level 8: gtk_im_context_reset: assertion `GTK_IS_IM_CONTEXT (context)' failed
Window manager warning: Log level 8: gtk_im_context_set_client_window: assertion `GTK_IS_IM_CONTEXT (context)' failed
Comment 1 Florian Müllner 2012-10-12 10:36:45 UTC
Created attachment 226318 [details] [review]
st-im-text: Chain up to parent first in dispose()

The actor's GtkIMContext is freed in dispose and reset in unrealize - as
ClutterActor's dispose will unrealize the actor if necessary, chaining
up to the parent after clearing the im context will result in warnings
if the actor is still realized, so chain up first.
Comment 2 Rui Matos 2012-10-12 11:35:12 UTC
Can't we just replace _dispose() here with _finalize() instead?
Comment 3 Florian Müllner 2012-10-12 12:16:12 UTC
Not really, references should be dropped in dispose. Alternatively we could guard against context == NULL in unrealize of course.
Comment 4 Jasper St. Pierre (not reading bugmail) 2012-10-12 12:20:11 UTC
Couldn't you just rely on the actor being unrealized and drop the dispose here, too?
Comment 5 Florian Müllner 2012-10-12 12:23:59 UTC
No, the context is created in init(), so we'll leak if the actor is never realized.
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-10-12 12:32:35 UTC
Ah, right.
Comment 7 Jasper St. Pierre (not reading bugmail) 2012-10-12 12:32:50 UTC
Review of attachment 226318 [details] [review]:

This is fine.
Comment 8 Florian Müllner 2012-10-12 12:56:58 UTC
Attachment 226318 [details] pushed as 4a92d7d - st-im-text: Chain up to parent first in dispose()