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 499905 - im_context critical when unfreezing panes
im_context critical when unfreezing panes
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: GUI
git master
Other All
: Normal normal
: ---
Assigned To: Morten Welinder
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2007-11-27 07:07 UTC by sum1
Modified: 2007-11-27 16:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (499 bytes, patch)
2007-11-27 15:54 UTC, Morten Welinder
none Details | Review

Description sum1 2007-11-27 07:07:12 UTC
Version: r16207
OS: Ubuntu Gutsy

Steps to reproduce:
- Run Gnumeric from a terminal
- View > Freeze Panes
- View > Unfreeze Panes, and notice the following output:

(gnumeric:9354): Gtk-CRITICAL **: gtk_im_context_set_client_window: assertion `GTK_IS_IM_CONTEXT (context)' failed

(gnumeric:9354): Gtk-CRITICAL **: gtk_im_context_set_client_window: assertion `GTK_IS_IM_CONTEXT (context)' failed

(gnumeric:9354): Gtk-CRITICAL **: gtk_im_context_set_client_window: assertion `GTK_IS_IM_CONTEXT (context)' failed


Backtrace:
Breakpoint 1, 0xb7225a86 in g_logv () from /usr/lib/libglib-2.0.so.0
(gdb) bt
  • #0 g_logv
    from /usr/lib/libglib-2.0.so.0
  • #1 g_log
    from /usr/lib/libglib-2.0.so.0
  • #2 g_return_if_fail_warning
    from /usr/lib/libglib-2.0.so.0
  • #3 IA__gtk_im_context_set_client_window
    at /build/buildd/gtk+2.0-2.12.0/gtk/gtkimcontext.c line 228
  • #4 gnm_pane_unrealize
    at gnm-pane.c line 670
  • #5 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #6 ??
    from /usr/lib/libgobject-2.0.so.0
  • #7 ??
  • #8 ??

Comment 1 Morten Welinder 2007-11-27 14:49:32 UTC
I see this.  No valgrind events.
Comment 2 Jon Kåre Hellan 2007-11-27 15:06:02 UTC
Should we be doing something like this?

https://stage.maemo.org/svn/maemo/projects/haf/tags/gtkhtml/3.9.1-3osso5/upstream/patches/gtkhtml_030_unrealize_fix.diff

# During unrealize, we must feed NULL to gtk_im_context_set_client_window so as to
# dissociate it from a GdkWindow which is about to be destroyed anyway
diff -ru gtkhtml-3.13.91/src/gtkhtml.c gtkhtml-3.13.91.mod6/src/gtkhtml.c
--- gtkhtml-3.13.91/src/gtkhtml.c	2007-02-15 14:40:31.000000000 +0200
+++ gtkhtml-3.13.91.mod6/src/gtkhtml.c	2007-02-15 15:12:46.000000000 +0200
@@ -1119,7 +1119,7 @@
 
 	html_engine_unrealize (html->engine);
 
-	gtk_im_context_set_client_window (html->priv->im_context, widget->window);
+	gtk_im_context_set_client_window (html->priv->im_context, NULL);
 
 	html_image_factory_stop_animations (html->engine->image_factory);
 
Comment 3 Morten Welinder 2007-11-27 15:54:47 UTC
Created attachment 99725 [details] [review]
Patch
Comment 4 Morten Welinder 2007-11-27 15:56:03 UTC
Needs review.

We need to do that, but more importantly we need to null check the context.
Comment 5 Jon Kåre Hellan 2007-11-27 16:16:53 UTC
Go ahead. im_context got NULLed in gnm_pane_dispose
Comment 6 Morten Welinder 2007-11-27 16:18:59 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.