Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 312266

Summary: Segfault when using vncserver and running Eclipse
Product: [Eclipse Project] Equinox Reporter: Chris Aniszczyk <caniszczyk>
Component: LauncherAssignee: Project Inbox <equinox.launcher-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: Andreas.Schallenberg, aniefer, eclipse.felipe, kazm, mnowak, mober.at+eclipse, overholt
Version: 3.5.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard: stalebug
Attachments:
Description Flags
New eclipse crash
none
Crash log file
none
Console output after crash none

Description Chris Aniszczyk CLA 2010-05-10 10:21:43 EDT
How to reproduce:

1. run vncserver
2. connect to the display
3. you are in GNOME env as a root
4. open terminal
5. create user
6. su - user
7. eclipse

You got a lot of gtk & gdk failed assertions and then Segmentation fault.

Any ideas?
Comment 1 Chris Aniszczyk CLA 2010-05-10 10:22:05 EDT
Here's the log from the segfault...

No protocol specified

(eclipse:4144): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(eclipse:4144): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion
`G_TYPE_CHECK_INSTANCE (instance)' failed

(eclipse:4144): Gtk-CRITICAL **: gtk_settings_get_for_screen: assertion
`GDK_IS_SCREEN (screen)' failed

(eclipse:4144): Gtk-WARNING **: Screen for GtkWindow not set; you must always
set
a screen for a GtkWindow before using the window

(eclipse:4144): Gtk-WARNING **: Screen for GtkWindow not set; you must always
set
a screen for a GtkWindow before using the window

(eclipse:4144): Gdk-CRITICAL **: gdk_screen_get_display: assertion
`GDK_IS_SCREEN (screen)' failed

(eclipse:4144): Gdk-CRITICAL **: gdk_display_get_pointer: assertion
`GDK_IS_DISPLAY (display)' failed

(eclipse:4144): Gtk-WARNING **: Screen for GtkWindow not set; you must always
set
a screen for a GtkWindow before using the window

(eclipse:4144): Gdk-CRITICAL **: gdk_screen_get_n_monitors: assertion
`GDK_IS_SCREEN (screen)' failed

(eclipse:4144): Gtk-WARNING **: Screen for GtkWindow not set; you must always
set
a screen for a GtkWindow before using the window

(eclipse:4144): Gdk-CRITICAL **: gdk_screen_get_monitor_geometry: assertion
`GDK_IS_SCREEN (screen)' failed

(eclipse:4144): Gdk-CRITICAL **: gdk_screen_get_default_colormap: assertion
`GDK_IS_SCREEN (screen)' failed

(eclipse:4144): Gdk-CRITICAL **: gdk_colormap_get_visual: assertion
`GDK_IS_COLORMAP (colormap)' failed

(eclipse:4144): Gdk-CRITICAL **: gdk_screen_get_default_colormap: assertion
`GDK_IS_SCREEN (screen)' failed

(eclipse:4144): Gdk-CRITICAL **: gdk_screen_get_root_window: assertion
`GDK_IS_SCREEN (screen)' failed

(eclipse:4144): Gdk-CRITICAL **: gdk_screen_get_root_window: assertion
`GDK_IS_SCREEN (screen)' failed

(eclipse:4144): Gdk-CRITICAL **: gdk_window_new: assertion `GDK_IS_WINDOW
(parent)' failed
/usr/bin/eclipse: line 6:  4144 Segmentation fault      (core dumped)
Comment 2 Felipe Heidrich CLA 2010-05-11 10:13:01 EDT
Do all other GTK application work fine in the same env ?
Comment 3 Michal Nowak CLA 2010-06-09 04:01:35 EDT
When I open `gcalctool` it ends with "cannot open display". When I run `xhost
+` as a root I successfully open both `gcalctool` and `eclipse`.
Comment 4 Michal Nowak CLA 2010-06-09 04:02:08 EDT
Created attachment 171494 [details]
New eclipse crash
Comment 5 Martin Oberhuber CLA 2010-10-04 10:29:41 EDT
CQ:WIND00234277

We've seen the same error messages, and the problem turned out to be a missing "xhost+" . Could the error message be improved in that case ?
Comment 6 Michal Nowak CLA 2010-10-05 04:41:24 EDT
Well, it's not just the error message what concerns me, I care more about the segmentation fault.
Comment 7 Andreas Schallenberg CLA 2010-11-09 07:46:01 EST
The same crash occurs when running eclipse via "sudo eclipse" on a openSUSE 11.1 distibution. So this crash is not necessarily depending on VNC.

As expected, other X apps also fail to start since they got no connection to the X server.

The crash is in the GTK lib itself which in turn is called by Java.
Comment 8 Andreas Schallenberg CLA 2010-11-09 07:46:39 EST
Created attachment 182704 [details]
Crash log file
Comment 9 Andreas Schallenberg CLA 2010-11-09 07:47:33 EST
Created attachment 182705 [details]
Console output after crash
Comment 10 Krzysztof Kazmierczyk CLA 2010-12-13 11:24:17 EST
The same with RTC build engine 2.0.0.2ifix4 (OSGI application based on Eclipse 3.4.2)
under Red Hat Enterprise Linux 5.3, x86-64

#4: GTK+lib version                 
[ksh 62] % rpm -qa | grep -i gtk    
gtk2-engines-2.8.0-3.el5.x86_64     
usermode-gtk-1.88-3.el5.2.x86_64    
authconfig-gtk-5.3.21-5.el5.x86_64  
gtk2-2.10.4-20.el5.i386             
pygtk2-libglade-2.10.1-12.el5.x86_64
gtk2-2.10.4-20.el5.x86_64           
pygtk2-2.10.1-12.el5.x86_64         

Felipe, Michal - do we know the root cause of the problem? Is it GTK issue? Do you have any idea how to resolve this issue?
Comment 11 Felipe Heidrich CLA 2010-12-13 11:39:56 EST
(In reply to comment #10)
> Felipe, Michal - do we know the root cause of the problem? Is it GTK issue? Do
> you have any idea how to resolve this issue?

I didn't try it but it seems to me this is setup problem, you are missing a call to xhost, see comments #3 and #5.
Comment 12 Felipe Heidrich CLA 2010-12-13 11:41:37 EST
I sending this over to Launcher, looking at the stack is seems the the code in the launcher is trying to make some x calls without first checking if x is there.
Comment 13 Eclipse Webmaster CLA 2019-09-06 15:37:42 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 14 Eclipse Genie CLA 2021-08-31 16:58:40 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.