Community
Participate
Working Groups
When launching Workbench on a Linux host, I'm getting a lot of confusing errors when my DISPLAY variable is not correctly set. Steps to reproduce: 1. Set DISPLAY so that it points to an X server that does not exist 2. Launch Workbench, you will get errors. Acceptance criterion: An explicit error message should be displayed like: Unable to start (Application_Name), please check if DISPLAY is set correctly. Example session: [van-ruz] ~ > echo $DISPLAY accidentally.non.existing.host:0.0 [van-ruz] ~ > eclipse (:13113): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window (:13113): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window (:13113): Gdk-CRITICAL **: file gdkscreen-x11.c: line 122 (gdk_screen_get_display): assertion `GDK_IS_SCREEN (screen)' failed (:13113): Gdk-CRITICAL **: file gdkdisplay.c: line 478 (gdk_display_get_pointer): assertion `GDK_IS_DISPLAY (display)' failed (:13113): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window (:13113): Gdk-CRITICAL **: file gdkscreen-x11.c: line 339 (gdk_screen_get_n_monitors): assertion `GDK_IS_SCREEN (screen)' failed (:13113): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window (:13113): Gdk-CRITICAL **: file gdkscreen-x11.c: line 363 (gdk_screen_get_monitor_geometry): assertion `GDK_IS_SCREEN (screen)' failed (:13113): Gdk-CRITICAL **: file gdkscreen-x11.c: line 250 (gdk_screen_get_default_colormap): assertion `GDK_IS_SCREEN (screen)' failed (:13113): Gdk-CRITICAL **: file gdkcolor.c: line 72 (gdk_colormap_get_visual): assertion `GDK_IS_COLORMAP (colormap)' failed (:13113): Gdk-CRITICAL **: file gdkscreen-x11.c: line 250 (gdk_screen_get_default_colormap): assertion `GDK_IS_SCREEN (screen)' failed (:13113): Gdk-CRITICAL **: file gdkscreen-x11.c: line 232 (gdk_screen_get_root_window): assertion `GDK_IS_SCREEN (screen)' failed (:13113): Gdk-CRITICAL **: file gdkscreen-x11.c: line 232 (gdk_screen_get_root_window): assertion `GDK_IS_SCREEN (screen)' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 575 (gdk_window_new): assertion `GDK_IS_WINDOW (parent)' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 5451 (gdk_window_enable_synchronized_configure_libgtk_only): assertion `GDK_IS_WINDOW (window)' failed (:13113): Gdk-CRITICAL **: file gdkwindow.c: line 471 (gdk_window_set_user_data): assertion `window != NULL' failed (:13113): Gtk-CRITICAL **: file gtkstyle.c: line 841 (gtk_style_attach): assertion `window != NULL' failed (:13113): Gtk-CRITICAL **: file gtkstyle.c: line 1652 (gtk_style_set_background): assertion `GTK_IS_STYLE (style)' failed (:13113): Gtk-CRITICAL **: file gtkstyle.c: line 6090 (gtk_paint_flat_box): assertion `GTK_IS_STYLE (style)' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 4290 (gdk_window_set_decorations): assertion `window != NULL' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 1918 (gdk_window_set_type_hint): assertion `window != NULL' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 3395 (gdk_window_set_accept_focus): assertion `window != NULL' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 2013 (gdk_window_set_modal_hint): assertion `window != NULL' failed (:13113): Gtk-CRITICAL **: file gtkwindow.c: line 2529 (gtk_window_realize_icon): assertion `widget->window != NULL' failed (:13113): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window (:13113): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window (:13113): Gdk-CRITICAL **: file gdkscreen-x11.c: line 122 (gdk_screen_get_display): assertion `GDK_IS_SCREEN (screen)' failed (:13113): Gdk-CRITICAL **: file gdkdisplay.c: line 478 (gdk_display_get_pointer): assertion `GDK_IS_DISPLAY (display)' failed (:13113): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window (:13113): Gdk-CRITICAL **: file gdkscreen-x11.c: line 339 (gdk_screen_get_n_monitors): assertion `GDK_IS_SCREEN (screen)' failed (:13113): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window (:13113): Gdk-CRITICAL **: file gdkscreen-x11.c: line 363 (gdk_screen_get_monitor_geometry): assertion `GDK_IS_SCREEN (screen)' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 2138 (gdk_window_set_geometry_hints): assertion `window != NULL' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 1457 (gdk_window_move): assertion `window != NULL' failed (:13113): GLib-GObject-CRITICAL **: file gobject.c: line 1561 (g_object_ref): assertion `G_IS_OBJECT (object)' failed (:13113): Gtk-CRITICAL **: file gtkstyle.c: line 841 (gtk_style_attach): assertion `window != NULL' failed (:13113): GLib-GObject-CRITICAL **: file gobject.c: line 1561 (g_object_ref): assertion `G_IS_OBJECT (object)' failed (:13113): Gtk-CRITICAL **: file gtkstyle.c: line 841 (gtk_style_attach): assertion `window != NULL' failed (:13113): Gdk-CRITICAL **: file gdkscreen-x11.c: line 250 (gdk_screen_get_default_colormap): assertion `GDK_IS_SCREEN (screen)' failed (:13113): Gdk-CRITICAL **: file gdkcolor.c: line 72 (gdk_colormap_get_visual): assertion `GDK_IS_COLORMAP (colormap)' failed (:13113): Gdk-CRITICAL **: file gdkscreen-x11.c: line 250 (gdk_screen_get_default_colormap): assertion `GDK_IS_SCREEN (screen)' failed (:13113): Gdk-CRITICAL **: file gdkscreen-x11.c: line 232 (gdk_screen_get_root_window): assertion `GDK_IS_SCREEN (screen)' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 575 (gdk_window_new): assertion `GDK_IS_WINDOW (parent)' failed (:13113): Gdk-CRITICAL **: file gdkwindow.c: line 471 (gdk_window_set_user_data): assertion `window != NULL' failed (:13113): Gtk-CRITICAL **: file gtkstyle.c: line 841 (gtk_style_attach): assertion `window != NULL' failed (:13113): Gtk-CRITICAL **: file gtkstyle.c: line 1652 (gtk_style_set_background): assertion `GTK_IS_STYLE (style)' failed (:13113): GLib-GObject-CRITICAL **: file gobject.c: line 1561 (g_object_ref): assertion `G_IS_OBJECT (object)' failed (:13113): Gtk-CRITICAL **: file gtkstyle.c: line 841 (gtk_style_attach): assertion `window != NULL' failed (:13113): Gdk-CRITICAL **: file gdkwindow.c: line 2180 (gdk_window_invalidate_rect): assertion `window != NULL' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 1340 (gdk_window_show): assertion `GDK_IS_WINDOW (window)' failed (:13113): Gdk-CRITICAL **: file gdkwindow.c: line 2180 (gdk_window_invalidate_rect): assertion `window != NULL' failed (:13113): Gdk-CRITICAL **: file gdkwindow.c: line 2180 (gdk_window_invalidate_rect): assertion `window != NULL' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 3942 (gdk_window_unmaximize): assertion `GDK_IS_WINDOW (window)' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 3826 (gdk_window_unstick): assertion `GDK_IS_WINDOW (window)' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 3729 (gdk_window_deiconify): assertion `window != NULL' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 4016 (gdk_window_unfullscreen): assertion `GDK_IS_WINDOW (window)' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 4052 (gdk_window_set_keep_above): assertion `GDK_IS_WINDOW (window)' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 4093 (gdk_window_set_keep_below): assertion `GDK_IS_WINDOW (window)' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 1340 (gdk_window_show): assertion `GDK_IS_WINDOW (window)' failed (:13113): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 1360 (gdk_window_hide): assertion `window != NULL' failed (:13113): Gdk-CRITICAL **: file gdkwindow-x11.c: line 1360 (gdk_window_hide): assertion `window != NULL' failed (:13113): Gtk-CRITICAL **: file gtkstyle.c: line 910 (gtk_style_detach): assertion `GTK_IS_STYLE (style)' failed (:13113): GLib-GObject-CRITICAL **: file gobject.c: line 1579 (g_object_unref): assertion `G_IS_OBJECT (object)' failed (:13113): Gtk-CRITICAL **: file gtkstyle.c: line 910 (gtk_style_detach): assertion `GTK_IS_STYLE (style)' failed (:13113): Gdk-CRITICAL **: file gdkwindow.c: line 471 (gdk_window_set_user_data): assertion `window != NULL' failed (:13113): Gdk-CRITICAL **: file gdkwindow.c: line 325 (_gdk_window_destroy_hierarchy): assertion `window != NULL' failed (:13113): GLib-GObject-CRITICAL **: file gobject.c: line 1579 (g_object_unref): assertion `G_IS_OBJECT (object)' failed (:13113): Gtk-CRITICAL **: file gtkstyle.c: line 910 (gtk_style_detach): assertion `GTK_IS_STYLE (style)' failed (:13113): GLib-GObject-CRITICAL **: file gobject.c: line 1579 (g_object_unref): assertion `G_IS_OBJECT (object)' failed (:13113): Gtk-CRITICAL **: file gtkstyle.c: line 910 (gtk_style_detach): assertion `GTK_IS_STYLE (style)' failed (:13113): GLib-GObject-CRITICAL **: file gobject.c: line 1579 (g_object_unref): assertion `G_IS_OBJECT (object)' failed (:13113): Gtk-CRITICAL **: file gtkstyle.c: line 910 (gtk_style_detach): assertion `GTK_IS_STYLE (style)' failed (:13113): Gdk-CRITICAL **: file gdkwindow.c: line 471 (gdk_window_set_user_data): assertion `window != NULL' failed (:13113): Gdk-CRITICAL **: file gdkwindow.c: line 325 (_gdk_window_destroy_hierarchy): assertion `window != NULL' failed (:13113): GLib-GObject-CRITICAL **: file gobject.c: line 1579 (g_object_unref): assertion `G_IS_OBJECT (object)' failed (:13113): GLib-GObject-CRITICAL **: file gobject.c: line 1579 (g_object_unref): assertion `G_IS_OBJECT (object)' failed (:13113): GLib-GObject-CRITICAL **: file gobject.c: line 1579 (g_object_unref): assertion `G_IS_OBJECT (object)' failed (:13113): GLib-GObject-CRITICAL **: file gobject.c: line 1579 (g_object_unref): assertion `G_IS_OBJECT (object)' failed (:13113): GLib-GObject-CRITICAL **: file gobject.c: line 1579 (g_object_unref): assertion `G_IS_OBJECT (object)' failed (:13113): GLib-GObject-CRITICAL **: file gobject.c: line 1579 (g_object_unref): assertion `G_IS_OBJECT (object)' failed (eclipse-x86-linux2.gtk:13107): Gtk-CRITICAL **: file gtksettings.c: line 447 (gtk_settings_get_for_screen): assertion `GDK_IS_SCREEN (screen)' failed (eclipse-x86-linux2.gtk:13107): GLib-GObject-CRITICAL **: file gobject.c: line 1222 (g_object_get): assertion `G_IS_OBJECT (object)' failed (eclipse-x86-linux2.gtk:13107): GLib-GObject-WARNING **: value "TRUE" of type `gboolean' is invalid or out of range for property `visible' of type `gboolean' (eclipse-x86-linux2.gtk:13107): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window (eclipse-x86-linux2.gtk:13107): Gdk-CRITICAL **: file gdkpango-x11.c: line 49 (gdk_pango_context_get_for_screen): assertion `GDK_IS_SCREEN (screen)' failed (eclipse-x86-linux2.gtk:13107): Gdk-CRITICAL **: file gdkscreen-x11.c: line 250 (gdk_screen_get_default_colormap): assertion `GDK_IS_SCREEN (screen)' failed (eclipse-x86-linux2.gtk:13107): Gdk-CRITICAL **: file gdkpango.c: line 150 (gdk_pango_context_set_colormap): assertion `context != NULL' failed ** (eclipse-x86-linux2.gtk:13107): CRITICAL **: file pango-context.c: line 382 (pango_context_set_base_dir): assertion `context != NULL' failed ** (eclipse-x86-linux2.gtk:13107): CRITICAL **: file pango-context.c: line 308 (pango_context_set_font_description): assertion `context != NULL' failed ** (eclipse-x86-linux2.gtk:13107): CRITICAL **: file pango-context.c: line 343 (pango_context_set_language): assertion `context != NULL' failed ** (eclipse-x86-linux2.gtk:13107): CRITICAL **: file pango-layout.c: line 208 (pango_layout_new): assertion `context != NULL' failed ** (eclipse-x86-linux2.gtk:13107): CRITICAL **: file pango-layout.c: line 782 (pango_layout_set_text): assertion `layout != NULL' failed ** (eclipse-x86-linux2.gtk:13107): CRITICAL **: file pango-layout.c: line 441 (pango_layout_set_attributes): assertion `layout != NULL' failed ** (eclipse-x86-linux2.gtk:13107): CRITICAL **: file pango-layout.c: line 605 (pango_layout_set_alignment): assertion `layout != NULL' failed ** (eclipse-x86-linux2.gtk:13107): CRITICAL **: file pango-layout.c: line 293 (pango_layout_set_width): assertion `layout != NULL' failed ** (eclipse-x86-linux2.gtk:13107): CRITICAL **: file pango-layout.c: line 2126 (pango_layout_get_extents): assertion `layout != NULL' failed (eclipse-x86-linux2.gtk:13107): Gtk-CRITICAL **: file gtkicontheme.c: line 310 (gtk_icon_theme_get_for_screen): assertion `GDK_IS_SCREEN (screen)' failed (eclipse-x86-linux2.gtk:13107): Gtk-CRITICAL **: file gtksettings.c: line 447 (gtk_settings_get_for_screen): assertion `GDK_IS_SCREEN (screen)' failed (eclipse-x86-linux2.gtk:13107): Gtk-CRITICAL **: file gtkiconfactory.c: line 1098 (gtk_icon_size_lookup_for_settings): assertion `GTK_IS_SETTINGS (settings)' failed (eclipse-x86-linux2.gtk:13107): Gtk-WARNING **: Invalid icon size 6 (eclipse-x86-linux2.gtk:13107): Gtk-CRITICAL **: file gtkicontheme.c: line 1240 (gtk_icon_theme_load_icon): assertion `GTK_IS_ICON_THEME (icon_theme)' failed This is definitely too verbose and unclear.
CQ:WIND00108178
Just ran into this again. On a remote host through VNC, the shell is swamped with errors so badly that I cannot even kill Eclipse to fix the DISPLAY. Wouldn't it be possible to make some GTK Sanity check before trying to open a Window?
Do others GTK app perform this test for you ?
(In reply to comment #0) > When launching Workbench on a Linux host, I'm getting a lot of confusing errors > when my DISPLAY variable is not correctly set. Wow, this is ugly! I'm getting the same messages on my RHWS5 machine, which is pretty vanilla (no custom gtk or anything). Also, there seems to be a regression in 3.6.1, a segmentation violation at the end (wrong icon size or something)(2), compared to a 3.6 launch(1). This being a regression makes me wonder if we can at least restore the ugly but non-segfaulting behavior of 3.6 in 3.6.2, or at least in 3.7? TIA, Ciao, hh [1] = launch 3.6 # /tmp/helmuth//test_crash/3.6/eclipse -vm /opt/work/installs/jdk-1.6.0_21/bin/java Xlib: connection to ":0.0" refused by server Xlib: No protocol specified <a LOT of gtk warnings like this last one:> (Eclipse:18236): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed <end (no crash)> [2] = launch 3.6.1 # /tmp/helmuth//test_crash/3.6.1/eclipse -vm /opt/work/installs/jdk-1.6.0_21/bin/java Xlib: connection to ":0.0" refused by server Xlib: No protocol specified <a LOT of gtk warnings like this last one:> (Eclipse:18255): Gtk-CRITICAL **: gtk_icon_theme_load_icon: assertion `GTK_IS_ICON_THEME (icon_theme)' failed Segmentation fault
(In reply to comment #3) > Do others GTK app perform this test for you ? I remember seeing a gtk_init check that can be done to see if gtk is usable, Meng Xin, didn't we use that in our exe? TIA, Ciao, hh
I did some debugging to see which code causes the gtk error messages. I think SWT did well job to check the gtk environment. SWT calls the API 'gtk_init_check' to check whether gtk library could work on that environment, then throws SWTError if the checking is failed, such as no gtk library installed or no display is configured correctly. The problem is caused by eclipse launcher, which never does those similar checkings. 1. if the eclipse is launched without option '-noSplash', the native eclipse launch would try to show the splash screen. So users would see many gtk error messages mentioned in above comments 2. if the eclipse is launched to run some GUI application, the SWT would error due to the gtk environment is not ready. Anyways the application meets any exception, the equinox launcher would exit with error data. The native launcher of equinox would try to open a dialog to tell users to check the log files. So it also causes many gtk errors or even segmentation fault(since 3.6.1) if the gtk window can't be initialized. The correct component of this defect should be Equinox - Launcher.
Meng Xing - thanks for this investigation! Reassigning to Equinox / Launcher for comments.
I'm marking this MAJOR since it's relatively common in a networked environment to log in to a remote machine and forget setting the DISPLAY. Getting bombarded with an avalanche of obscure errors, followed by a segfault, is a particularly unfortunate dealing with this common case and doesn't help finding or fixing the underlying problem. This, to me, meets the definition of "major loss of functionality" since it can take long for lots of people to understand what's causing the problem.
*** Bug 168558 has been marked as a duplicate of this bug. ***
Fixed. If gtk_init_check returns false we then proceed the same as if the gtk libraries were not present on the machine. No splash screen will be displayed and the SWT will complain or a headless application which does not need the display will continue happily. When attempting to display an error message, in this case the launcher will print it to stdout.
Just checking ... is this something that could be backported to 3.7.2 ? It has repeatedly confused our users . Thanks, Martin