This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 436121 - [Trim] Luna RC1 crashes after splitting editor area
Summary: [Trim] Luna RC1 crashes after splitting editor area
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 7
: P3 critical (vote)
Target Milestone: 4.4 RC4   Edit
Assignee: Eric Moffatt CLA
QA Contact: Eric Moffatt CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-28 16:14 EDT by Sam Davis CLA
Modified: 2014-06-04 04:34 EDT (History)
4 users (show)

See Also:
bsd: review+
pwebster: review+
daniel_megert: review+
daniel.rolka: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Davis CLA 2014-05-28 16:14:24 EDT
* install the Luna RC1 Java package
* open an untitled text file using ctrl+3
* drag the editor out of the window to detach it
* drag it back in to split the editor area in 2 (one part will have the editor and the other will be blank)
* double click the editor tab to maximize it
* click the "shared area" icon in the trim 
* Eclipse freezes and never comes back
Comment 1 Sam Davis CLA 2014-05-28 16:17:24 EDT
Here's a thread dump caputured with jconsole. It seems to be stuck between lines 997 and 1005 of showStack and it's using all the CPU it can get. No other threads look seem to be involved.

Name: main
State: RUNNABLE
Total blocked: 15  Total waited: 11

Stack trace: 
org.eclipse.e4.ui.workbench.addons.minmax.TrimStack.showStack(TrimStack.java:1005)
org.eclipse.e4.ui.workbench.addons.minmax.TrimStack$9.widgetSelected(TrimStack.java:509)
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1152)
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1033)
org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:379)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:233)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Comment 2 Eric Moffatt CLA 2014-05-29 11:16:29 EDT
Interesting...this does require that there has been at least one editor opened due to a different bug; until the first editor opens the Marea's 'selectedElement' is *null* (even though it has the empty stack visible inside it...

Easier steps to reproduce:

Open an editor, close it
maximize a view stack
Open the Editor Area from the trim

The bug is that the loop that tried to find a part to activate is malformed. It checks for "curContainer.getSelectedElement() instanceof <xxx>" in order to update the loop parameters but of course if 'getSelectedElement()' returns null then none of the tests pass and we loop endlessly.

This is a recent regression I think that we might look at for RC4...

Here's the Gerrit patch:

  https://git.eclipse.org/r/27540
Comment 3 Dani Megert CLA 2014-05-30 03:47:43 EDT
+1 for RC4.
Comment 4 Paul Webster CLA 2014-05-30 10:46:03 EDT
+1 for RC4.

PW
Comment 6 Dani Megert CLA 2014-06-04 04:34:56 EDT
Verified in I20140603-2300.