Bug 507896 - UI breaks with Stackoverflow
Summary: UI breaks with Stackoverflow
Status: CLOSED DUPLICATE of bug 497705
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.7   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2016-11-21 11:05 EST by Steve Green CLA
Modified: 2016-11-22 19:52 EST (History)
2 users (show)

See Also:


Attachments
Showing missing controls (52.23 KB, image/png)
2016-11-21 11:05 EST, Steve Green CLA
no flags Details
Short movie: see the wait cursor and no icons painted (28.32 KB, video/x-matroska)
2016-11-21 20:21 EST, Patrik Suzzi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Green CLA 2016-11-21 11:05:27 EST
Created attachment 265485 [details]
Showing missing controls

Ubuntu 16.10
java version "1.8.0_111"
Eclipse Version: Neon.1a Release (4.6.1)
Build id: 20161007-1200

1.  Launch Eclipse with fresh workspace
2.  UI looks normal.
3.  Restart Eclipse.
4.  UI is missing many controls and stack overflow is thrown
5.  Removing .metadata restores the controls, but only until the next restart.

java.lang.StackOverflowError
        at org.eclipse.swt.events.ControlEvent.<init>(ControlEvent.java:35)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:225)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5219)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1340)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1366)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1345)
        at org.eclipse.swt.widgets.Control.setBounds(Control.java:1100)
        at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1524)
        at org.eclipse.swt.widgets.ToolBar.setBounds(ToolBar.java:589)
        at org.eclipse.swt.widgets.Control.setLocation(Control.java:1187)
        at org.eclipse.e4.ui.widgets.ImageBasedFrame.setFramedControlLocation(ImageBasedFrame.java:124)
        at org.eclipse.e4.ui.widgets.ImageBasedFrame.access$0(ImageBasedFrame.java:120)
        at org.eclipse.e4.ui.widgets.ImageBasedFrame$4.controlMoved(ImageBasedFrame.java:109)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:225)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5219)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1340)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1366)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1345)
        at org.eclipse.swt.widgets.Control.setBounds(Control.java:1100)
        at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1524)
        at org.eclipse.swt.widgets.ToolBar.setBounds(ToolBar.java:589)
        at org.eclipse.swt.widgets.Control.setLocation(Control.java:1187)
        at org.eclipse.e4.ui.widgets.ImageBasedFrame.setFramedControlLocation(ImageBasedFrame.java:124)
        at org.eclipse.e4.ui.widgets.ImageBasedFrame.access$0(ImageBasedFrame.java:120)
        at org.eclipse.e4.ui.widgets.ImageBasedFrame$4.controlMoved(ImageBasedFrame.java:109)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:225)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5219)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1340)
...
...
...
Comment 1 Patrik Suzzi CLA 2016-11-21 20:21:35 EST
Created attachment 265501 [details]
Short movie: see the wait cursor and no icons painted

I also had an issue which I think is related: 

At first launch of Eclipse, the wait cursor started spinning, and no icon was painted on the toolbar.

(Ctrl+3 > Copy Build Id..) details are below: 
Eclipse SDK
Version: Oxygen (4.7)
Build id: I20161120-2000
OS: Linux, v.4.4.0-45-generic, x86_64 / gtk 3.18.9

$java -version
java version "1.8.0_101"

Note: I launched Eclipse Normally, using system provided GTK and Webkit. 

I suggest doing tests also with GTK2:

export SWT_WEBKIT2=1
export SWT_GTK3=0
eclipse/eclipse

and with GTK3: 

export SWT_WEBKIT2=1
export SWT_GTK3=1
eclipse/eclipse
Comment 2 Patrik Suzzi CLA 2016-11-21 20:38:38 EST
(In reply to Steve Green from comment #0)

I would like to understand better what is happening.

Could you please test again both with GTK2 and GTK3?

While you're testing, it'll be great if you could get the details via Ctrl+3 > Copy build Id Information. Then, in case of exception, it'll be great getting the Exception log.
Comment 3 Patrik Suzzi CLA 2016-11-22 07:52:34 EST
This is actually a very bad bug. 

I think the Eclipse UI is blocking at startup waiting because of a file lock, and the StackOverflow is the result of this lock plus performing actions on the UI.

On my Ubuntu system, these are the effects:
Immediately after I start Eclipse, the wait cursor starts spinning; Eclipse takes 100% of the CPU and the Processor Fan start spinning.
After a wait of some minutes, Eclipse does not respond anymore, and the only way to get back control is to kill the process.
Comment 4 Andrey Loskutov CLA 2016-11-22 07:57:43 EST
(In reply to Patrik Suzzi from comment #3)
> This is actually a very bad bug. 
> 
> I think the Eclipse UI is blocking at startup waiting because of a file
> lock, and the StackOverflow is the result of this lock plus performing
> actions on the UI.

Patrik, which lock do you mean? I think this is known SWT issue on newer Ubuntu, moving to SWT to confirm this.
Comment 5 Steve Green CLA 2016-11-22 09:16:01 EST
We might be discussing 2 different issues here.  I don't experience any problem with locks or timeouts.

With regard to your suggestion, SWT_GTK3=0 resolves the issue.  Not only that, the layout of the controls looks more consistent with Eclipse on other operating systems.
Comment 6 Andrey Loskutov CLA 2016-11-22 10:46:09 EST

*** This bug has been marked as a duplicate of bug 497705 ***
Comment 7 Patrik Suzzi CLA 2016-11-22 19:52:38 EST
(In reply to Steve Green from comment #5)
>
> We might be discussing 2 different issues here.  I don't experience any
> problem with locks or timeouts.

Yes, you're right!

(In reply to Andrey Loskutov from comment #4)
> 
> Patrik, which lock do you mean? I think this is known SWT issue on newer
> Ubuntu, moving to SWT to confirm this.

I spotted a different bug. Investigating with Bug 508007