Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342366 - [Compatibility] IAE thrown when trying to open a part in an asyncExec
Summary: [Compatibility] IAE thrown when trying to open a part in an asyncExec
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-10 09:00 EDT by Remy Suen CLA
Modified: 2019-11-27 07:07 EST (History)
4 users (show)

See Also:


Attachments
StackRenderer patch v1 (2.32 KB, patch)
2011-06-06 11:09 EDT, Remy Suen CLA
no flags Details | Diff
Stacktrace snapshot (27.40 KB, image/png)
2011-06-12 11:34 EDT, Thomas Kratz CLA
no flags Details
CompatibilityView patch v1 (1.05 KB, patch)
2011-06-13 06:14 EDT, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2011-04-10 09:00:01 EDT
!MESSAGE Ausnahme bei der Übergabe von Ereignis org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/ElementContainer/children/ADD] an den Handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@77481345
!STACK 0
java.lang.IllegalArgumentException: Index out of bounds
at org.eclipse.swt.SWT.error(SWT.java:4258)
at org.eclipse.swt.SWT.error(SWT.java:4192)
at org.eclipse.swt.SWT.error(SWT.java:4163)
at org.eclipse.e4.ui.widgets.CTabFolder.createItem(CTabFolder.java:451)
at org.eclipse.e4.ui.widgets.CTabItem.<init>(CTabItem.java:119)
at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.createTab(StackRenderer.java:352)
at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.childRendered(StackRenderer.java:391)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.handleEvent(PartRenderingEngine.java:246)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:179)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4668)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:172)
at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:81)
at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380)
at org.eclipse.emf.ecore.util.EcoreEList.dispatchNotification(EcoreEList.java:255)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:300)
at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:307)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.addPart(PartServiceImpl.java:702)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.addPart(PartServiceImpl.java:845)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:867)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2660)
at org.eclipse.ui.internal.WorkbenchPage.access$18(WorkbenchPage.java:2609)
at org.eclipse.ui.internal.WorkbenchPage$7.run(WorkbenchPage.java:2591)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2587)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2567)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2550)
at de.eiswind.paris.client.core.ui.editorhelper.EntityEditorManager$1$1.run(EntityEditorManager.java:119)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4125)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3742)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:852)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:768)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:87)
at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:542)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:524)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at de.eiswind.paris.client.core.Application.start(Application.java:45)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Comment 1 Remy Suen CLA 2011-04-10 09:00:45 EDT
Hi Thomas, when this happens, do you have any other parts in the same stack as the editor that is going to be opened in?
Comment 2 Remy Suen CLA 2011-04-10 09:02:25 EDT
Also, do you remember if you have been seeing this for some time or did you only started seeing it after we added code to let you open views in the shared area?
Comment 3 Thomas Kratz CLA 2011-04-10 09:32:31 EDT
Hi Remy, I have seen it happen when I open the first part in the shared area. At most I remeber it after application startup. Don't know exactly if it relates to the views in the shared area, I am watching this for quite a while. As it happens only sometimes, I took a heart today and reported it.
Comment 4 Remy Suen CLA 2011-04-11 09:04:00 EDT
(In reply to comment #3)
> Hi Remy, I have seen it happen when I open the first part in the shared area.
> At most I remeber it after application startup.

Very interesting. So you mean there were actually no rendered parts in the shared area when this happens?
Comment 5 Thomas Kratz CLA 2011-04-11 09:11:24 EDT
Today I won't tell for sure what happened yesterday :( But I also remember seeing it happen twice when the part gets created at startup by an elementFactory
Comment 6 Remy Suen CLA 2011-04-11 11:01:16 EDT
Do you call setVisible(boolean) on (Eclipse 4) model elements anywhere in your code? That's the only reason I can think of why the index calculation could be off at the moment. I have released some fixes for this problem (bug 342439) to HEAD. One possible case of this bug has been fixed though I can't say for sure if this is the problem you're seeing.

One "guaranteed" workaround for this problem would be to just check the index before we actually try to create the tab item. This would prevent the IAE but could potentially leave the model in a strange state farther down the road as it implies the widgets and the model is not in sync.
Comment 7 Thomas Kratz CLA 2011-04-11 11:07:19 EDT
No I don't do any changes on the e4 model by now. It's just my 3.x code.
And you think it's not related to the NPE with the missing context I see happen before this one?
Comment 8 Remy Suen CLA 2011-04-11 11:12:25 EDT
(In reply to comment #7)
> No I don't do any changes on the e4 model by now. It's just my 3.x code.
> And you think it's not related to the NPE with the missing context I see happen
> before this one?

That error comes after this SWT problem though. The context is null because the part could not be rendered. The part could not be rendered because the tab item couldn't even get constructed.
Comment 9 Thomas Kratz CLA 2011-04-11 11:15:12 EDT
do you think we could place any traces in the code so that we get a better understanding if i see it happen again ?
Comment 10 Remy Suen CLA 2011-04-11 11:18:34 EDT
(In reply to comment #9)
> do you think we could place any traces in the code so that we get a better
> understanding if i see it happen again ?

Right now are you using deltas to restore the model or do you have it save the EMF model to disk?
Comment 11 Thomas Kratz CLA 2011-04-11 11:22:12 EDT
Hi Remy, I'm quite stupid when it comes to e4 :) Unfortunately I don't even know how to answer your question. I just took my 3.x bundles to e4 and threw the LegacyIDE.xml in. Have no clue how the model get's stored, sorry. But I would be glad if I could learn something.
Comment 12 Remy Suen CLA 2011-04-11 13:21:16 EDT
(In reply to comment #11)
> Have no clue how the model get's stored, sorry. But I
> would be glad if I could learn something.

I guess you have the default behaviour right now then.

If you add '-deltaRestore false' as arguments to your RCP application then it will save the EMF model to disk when it shuts down. After the problem occurs, shutdown Eclipse and then look for this file (.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi) and then attach it to this bug.
Comment 13 Thomas Schindl CLA 2011-04-11 14:02:42 EDT
(In reply to comment #12)
> (In reply to comment #11)
> > Have no clue how the model get's stored, sorry. But I
> > would be glad if I could learn something.
> 
> I guess you have the default behaviour right now then.
> 
> If you add '-deltaRestore false' as arguments to your RCP application then it
> will save the EMF model to disk when it shuts down. After the problem occurs,
> shutdown Eclipse and then look for this file
> (.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi) and then attach it
> to this bug.

It's even easier to the the current e4xmi. Simply open the Live-Modeltooling switch to the XMI-Tab and copy the content from there. You need the last I-Builds so that C&P works there IIRC. If that is not working I'm going to fix it ASAP.
Comment 14 Thomas Schindl CLA 2011-04-11 14:06:12 EDT
> 
> It's even easier to the the current e4xmi. Simply open the Live-Modeltooling
> switch to the XMI-Tab and copy the content from there. You need the last
> I-Builds so that C&P works there IIRC. If that is not working I'm going to fix
> it ASAP.

Just tried and it even works in M6 already!
Comment 15 Thomas Kratz CLA 2011-04-12 02:57:52 EDT
I'll give this a try. Can take a while 'til it happens again.
Thanks as ever.
Comment 16 Thomas Kratz CLA 2011-06-02 13:41:42 EDT
I have seen this today again. sadly it was in a  presentation so that I couldn't get the xmi. But after restart I had an empty editor with the respective couldn't find... message in it in the shared area. If this is of help, I do not know.
Comment 17 Remy Suen CLA 2011-06-02 14:08:37 EDT
(In reply to comment #16)
> I have seen this today again. sadly it was in a  presentation so that I
> couldn't get the xmi.

I am sorry to hear that Thomas, I hope the presentation still went okay. :/

Eric, according to Thomas, this problem prevents editors ever from opening again [1] so I think we should add a point fix to the StackRenderer to workaround this problem. What do you think?

[1] - http://dev.eclipse.org/mhonarc/lists/e4-dev/msg05053.html
Comment 18 Thomas Kratz CLA 2011-06-02 14:21:18 EDT
Hi I promised that it was a beta problem ...
Comment 19 Remy Suen CLA 2011-06-02 14:24:58 EDT
Thomas, what was your shared area like? I know you wanted to add views in there so I know you have both views and editors inside. Do you have multiple stacks or only one single tab folder? Did you ever try minimizing the shared area or removing parts from the workbench window into a detached window?
Comment 20 Thomas Kratz CLA 2011-06-02 14:30:56 EDT
HI Remy, I'm working with the xmi from the platform plugin, so I only can guess I have a single tab folder there. minimizing and moving works fine but I only tried this now, normally I do not show this feature.
Comment 21 Eric Moffatt CLA 2011-06-03 14:46:22 EDT
Thomas, I just finished talking with Remy about this defect. My advice was to not try to address this until 4.1 goes out, mostly because we really don't understand the basic issue in the code flow (yet).

...but...once 4.1 goes out we should get together on an e4 call and go over this specific issue. I'm very interested since a proper solution to this may make the whole rendering engine much more robust in multi-threaded envs...
Comment 22 Thomas Kratz CLA 2011-06-05 10:05:43 EDT
Today I have seen the following: 

org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
	at org.eclipse.swt.SWT.error(SWT.java:4277)
	at org.eclipse.swt.SWT.error(SWT.java:4192)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4138)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3755)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:890)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:806)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:87)
	at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:542)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:522)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at de.eiswind.paris.client.core.Application.start(Application.java:45)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: java.lang.NullPointerException
	at org.eclipse.e4.ui.internal.workbench.PartActivationHistory.activate(PartActivationHistory.java:52)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:518)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:477)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:466)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:899)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2675)
	at org.eclipse.ui.internal.WorkbenchPage.access$19(WorkbenchPage.java:2624)
	at org.eclipse.ui.internal.WorkbenchPage$7.run(WorkbenchPage.java:2606)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2602)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2582)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2565)
	at de.eiswind.mango.client.workflow.handlers.FindTasksHandler$2$1.run(FindTasksHandler.java:61)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	... 24 more
java.lang.NullPointerException
	at org.eclipse.e4.ui.widgets.CTabItem.getFont(CTabItem.java:195)
	at org.eclipse.e4.ui.css.swt.helpers.CSSSWTFontHelper.getFont(CSSSWTFontHelper.java:401)
	at org.eclipse.e4.ui.css.swt.helpers.CSSSWTFontHelper.getCSS2FontProperties(CSSSWTFontHelper.java:73)
	at org.eclipse.e4.ui.css.swt.properties.css2.CSSPropertyFontSWTHandler.applyCSSProperty(CSSPropertyFontSWTHandler.java:65)
	at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyCSSProperty(AbstractCSSEngine.java:720)
	at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyleDeclaration(AbstractCSSEngine.java:485)
	at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:402)
	at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:342)
	at org.eclipse.e4.ui.css.swt.engine.CSSSWTApplyStylesListener$1.handleEvent(CSSSWTApplyStylesListener.java:31)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4337)
	at org.eclipse.swt.widgets.Display.runSkin(Display.java:4246)
	at org.eclipse.swt.widgets.Composite.computeSize(Composite.java:227)
	at org.eclipse.jface.window.Window.getInitialSize(Window.java:594)
	at org.eclipse.jface.dialogs.Dialog.getInitialSize(Dialog.java:1196)
	at org.eclipse.jface.window.Window.initializeBounds(Window.java:764)
	at org.eclipse.jface.dialogs.Dialog.initializeBounds(Dialog.java:714)
	at org.eclipse.jface.window.Window.create(Window.java:435)
	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
	at org.eclipse.jface.window.Window.open(Window.java:790)
	at org.eclipse.jface.dialogs.ErrorDialog.open(ErrorDialog.java:360)
	at org.eclipse.e4.ui.internal.workbench.swt.WorkbenchStatusReporter.openDialog(WorkbenchStatusReporter.java:97)
	at org.eclipse.e4.ui.internal.workbench.swt.WorkbenchStatusReporter.report(WorkbenchStatusReporter.java:54)
	at org.eclipse.e4.core.services.statusreporter.StatusReporter.show(StatusReporter.java:132)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.safeHandle(PartRenderingEngine.java:927)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.handle(PartRenderingEngine.java:911)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:899)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:806)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:87)
	at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:542)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:522)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at de.eiswind.paris.client.core.Application.start(Application.java:45)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
java.lang.NullPointerException
	at org.eclipse.e4.ui.widgets.CTabItem.getFont(CTabItem.java:195)
	at org.eclipse.e4.ui.css.swt.helpers.CSSSWTFontHelper.getFont(CSSSWTFontHelper.java:401)
	at org.eclipse.e4.ui.css.swt.helpers.CSSSWTFontHelper.getCSS2FontProperties(CSSSWTFontHelper.java:73)
	at org.eclipse.e4.ui.css.swt.properties.css2.CSSPropertyFontSWTHandler.applyCSSProperty(CSSPropertyFontSWTHandler.java:65)
	at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyCSSProperty(AbstractCSSEngine.java:720)
	at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyleDeclaration(AbstractCSSEngine.java:485)
	at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:402)
	at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.applyStyles(AbstractCSSEngine.java:342)
	at org.eclipse.e4.ui.css.swt.engine.CSSSWTApplyStylesListener$1.handleEvent(CSSSWTApplyStylesListener.java:31)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4337)
	at org.eclipse.swt.widgets.Display.runSkin(Display.java:4246)
	at org.eclipse.swt.widgets.Composite.computeSize(Composite.java:227)
	at org.eclipse.jface.window.Window.getInitialSize(Window.java:594)
	at org.eclipse.jface.dialogs.Dialog.getInitialSize(Dialog.java:1196)
	at org.eclipse.jface.window.Window.initializeBounds(Window.java:764)
	at org.eclipse.jface.dialogs.Dialog.initializeBounds(Dialog.java:714)
	at org.eclipse.jface.window.Window.create(Window.java:435)
	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
	at org.eclipse.jface.window.Window.open(Window.java:790)
	at org.eclipse.jface.dialogs.ErrorDialog.open(ErrorDialog.java:360)
	at org.eclipse.e4.ui.internal.workbench.swt.WorkbenchStatusReporter.openDialog(WorkbenchStatusReporter.java:97)
	at org.eclipse.e4.ui.internal.workbench.swt.WorkbenchStatusReporter.report(WorkbenchStatusReporter.java:54)
	at org.eclipse.e4.core.services.statusreporter.StatusReporter.show(StatusReporter.java:132)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.safeHandle(PartRenderingEngine.java:927)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.handle(PartRenderingEngine.java:911)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:899)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:806)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:87)
	at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:542)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:522)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at de.eiswind.paris.client.core.Application.start(Application.java:45)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Comment 23 Thomas Kratz CLA 2011-06-06 04:08:01 EDT
Can you give me any advice how I could prevent this exception ? It's a showstopper for building a new release, I won't present this to my customers at this stage.
Comment 24 Remy Suen CLA 2011-06-06 06:25:34 EDT
(In reply to comment #23)
> Can you give me any advice how I could prevent this exception ?

You are talking about the exception in comment 22, correct?
Comment 25 Thomas Kratz CLA 2011-06-06 06:59:59 EDT
I'd love to prevent this NPE with the font as well as the IAE when opening the editor from my Jobs.
Comment 26 Remy Suen CLA 2011-06-06 08:15:48 EDT
Are the newer exceptions consistently reproducible or do they also happen at random?
Comment 27 Thomas Kratz CLA 2011-06-06 08:17:56 EDT
I still cannot reproduce them, they seem to happen randomly, especially when a customer is watching my demonstrations :( maybe I should invite a customer to stay at my side to reproduce them :(
Comment 28 Remy Suen CLA 2011-06-06 08:24:52 EDT
(In reply to comment #27)
> I still cannot reproduce them, they seem to happen randomly

Do you open all your editors with jobs? If not, are the ones that are not opened with jobs safe?

(In reply to comment #22)
> Caused by: java.lang.NullPointerException
>     at
> org.eclipse.e4.ui.internal.workbench.PartActivationHistory.activate(PartActivationHistory.java:52)
>     at
> org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:518)
>     at
> org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:477)
>     at
> org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:466)
>     at
> org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:899)
>     at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2675)
>     at org.eclipse.ui.internal.WorkbenchPage.access$19(WorkbenchPage.java:2624)
>     at org.eclipse.ui.internal.WorkbenchPage$7.run(WorkbenchPage.java:2606)
>     at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
>     at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2602)
>     at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2582)
>     at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2565)
>     at
> de.eiswind.mango.client.workflow.handlers.FindTasksHandler$2$1.run(FindTasksHandler.java:61)
>     at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
>     at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
>     ... 24 more

For this exception, is there no other information before it? In the original problem we see there is an IAE problem creating the tab but this new one seems to be when it's trying to skin the tab items after the errors have been logged.
Comment 29 Thomas Kratz CLA 2011-06-06 08:30:17 EDT
Indeed it's a single extensible Job that's responsible for opening  all kinds of editors, as creating the input is expensive (database roundtrip) and I wanted to have at least some ui feedback.

I provided the whole stacktrace I've seen on the weekend. Thats it :(
Comment 30 Remy Suen CLA 2011-06-06 11:09:48 EDT
Created attachment 197408 [details]
StackRenderer patch v1

Hi Thomas, this patch should prevent the original problem you reported to us (the IAE problem).

If we detect the index is off, we will reset it and make it so that the tab appears at the end. We will also attempt to log which part(s) have been found that should be rendered on screen but don't actually appear to be there (that is, we can't find its representing tab item).
Comment 31 Thomas Kratz CLA 2011-06-07 07:29:01 EDT
Thanks Remy, I'll go into this on the weekend.
Comment 32 Thomas Kratz CLA 2011-06-07 13:12:58 EDT
I finally can reproduce it. But deltastore false doesn't have any effect, and I fail to install the tooling on my M7 platform because of unsatisfied emf dependencies. I might go crazy.

Thats what I do:  Open View in shared area, Open Editor A, Close View, Open Editor B (must be a different editor) boom.
Comment 33 Remy Suen CLA 2011-06-07 13:17:57 EDT
(In reply to comment #32)
> Thats what I do:  Open View in shared area, Open Editor A, Close View, Open
> Editor B (must be a different editor) boom.

Is editor A up and opened at this time or is the job still talking to the database?
Comment 34 Thomas Kratz CLA 2011-06-08 06:27:39 EDT
Editor a is open at this time. I can open different instances of A without hassle, it only fails if I open Editor B after closing the view.
Comment 35 Remy Suen CLA 2011-06-08 06:45:09 EDT
(In reply to comment #34)
> Editor a is open at this time. I can open different instances of A without
> hassle, it only fails if I open Editor B after closing the view.

This is very, very odd.

When you close the view, please check that PartServiceImpl's hidePart(MPart, boolean) method is called and that setToBeRendered(false) is called.

When you open editor B, please check the StackRenderer's calcIndexFor(*) method and note every single model element that makes the index increment. Record the ids of the model elements that makes the value go up and check if their 'widget' is 'null' or not. 'null' values are bad.
Comment 36 Thomas Kratz CLA 2011-06-12 11:34:41 EDT
Created attachment 197856 [details]
Stacktrace snapshot

Hi Remy, I applied your patch today. Now I see the following: I close the view, its gone. I close another Editor, the view (magic) is back. I put a breakpoint in setToBeRendered and attach the stacktrace from where the viewPart is magically reactivated. Let me know if I can do further investigations.
Comment 37 Thomas Kratz CLA 2011-06-12 11:39:41 EDT
PS after closing the view, when I open another editor in the otherwise empty shared area I see now your log msg

!MESSAGE An element should have a tab but it could not be found: org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl@637a91a (elementId: org.eclipse.e4.ui.compatibility.editor, tags: [Editor], contributorURI: null) (widget: null, renderer: null, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (contributionURI: platform:/plugin/org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor, object: null, context: null, variables: null, label: null, iconURI: null, tooltip: null, dirty: false, closeable: true, description: null)

Can it be that the view is taken to be an editorpart?
Comment 38 Remy Suen CLA 2011-06-12 17:40:00 EDT
(In reply to comment #36)
> Created attachment 197856 [details]
> Stacktrace snapshot
> 
> Hi Remy, I applied your patch today. Now I see the following: I close the view,
> its gone. I close another Editor, the view (magic) is back.

This is very odd because in my test when I call getPart(true) I already have a part so it doesn't try to instantiate it.

> Let me know if I can do further investigations.

I also don't understand why closing an editor would send out a notification of a view being closed. Could you please use the context menu on the thread and copy the whole stack trace, Thomas? Thank you.
Comment 39 Thomas Kratz CLA 2011-06-13 03:56:33 EDT
Hi Remy,

I found the following: If the view is the only part in the shared area, everything seems to be fine. If I open an Editor before I open the view and then close the view, setToBeRendered is invoked two times, at first from hidePart with false and then immediately with true from the event with the following stacktrace. The view ist still invisible then, but I think this makes the calcIndex go wrong. An if I then close the editor it gets rendered again.


Thread [main] (Suspended (breakpoint at line 290 in UIElementImpl))	
	PartImpl(UIElementImpl).setToBeRendered(boolean) line: 290	
	PartServiceImpl.showPart(MPart, EPartService$PartState) line: 905	
	ViewReference(WorkbenchPartReference).getPart(boolean) line: 482	
	LockPartListener.getEntity(IWorkbenchPartReference) line: 50	
	LockPartListener.partClosed(IWorkbenchPartReference) line: 31	
	WorkbenchPage$17.run() line: 3845	
	SafeRunner.run(ISafeRunnable) line: 42	
	WorkbenchPage.firePartClosed(CompatibilityPart) line: 3843	
	CompatibilityPart$1.handleEvent(Event) line: 94	
	UIEventHandler$1.run() line: 41	
	UISynchronizer(Synchronizer).syncExec(Runnable) line: 180	
	UISynchronizer.syncExec(Runnable) line: 150	
	Display.syncExec(Runnable) line: 4681	
	E4Application$1.syncExec(Runnable) line: 182	
	UIEventHandler.handleEvent(Event) line: 38	
	EventHandlerWrapper.handleEvent(Event, Permission) line: 197	
	EventHandlerTracker.dispatchEvent(EventHandlerWrapper, Permission, int, Event) line: 197	
	EventHandlerTracker.dispatchEvent(Object, Object, int, Object) line: 1	
	EventManager.dispatchEvent(Set, EventDispatcher, int, Object) line: 230	
	ListenerQueue.dispatchEventSynchronous(int, Object) line: 148	
	EventAdminImpl.dispatchEvent(Event, boolean) line: 135	
	EventAdminImpl.sendEvent(Event) line: 78	
	EventComponent.sendEvent(Event) line: 39	
	EventBroker.send(String, Object) line: 81	
	UIEventPublisher.notifyChanged(Notification) line: 58	
	PartImpl(BasicNotifierImpl).eNotify(Notification) line: 380	
	PartImpl(UIElementImpl).setWidget(Object) line: 250	
	ContributedPartRenderer(SWTPartRenderer).unbindWidget(MUIElement) line: 114	
	ContributedPartRenderer(SWTPartRenderer).disposeWidget(MUIElement) line: 135	
	ContributedPartRenderer.disposeWidget(MUIElement) line: 270	
	PartRenderingEngine.safeRemoveGui(MUIElement) line: 730	
	PartRenderingEngine.access$2(PartRenderingEngine, MUIElement) line: 674	
	PartRenderingEngine$6.run() line: 669	
	SafeRunner.run(ISafeRunnable) line: 42	
	PartRenderingEngine.removeGui(MUIElement) line: 654	
	ElementReferenceRenderer.disposeWidget(MUIElement) line: 108	
	PartRenderingEngine.safeRemoveGui(MUIElement) line: 730	
	PartRenderingEngine.access$2(PartRenderingEngine, MUIElement) line: 674	
	PartRenderingEngine$6.run() line: 669	
	SafeRunner.run(ISafeRunnable) line: 42	
	PartRenderingEngine.removeGui(MUIElement) line: 654	
	PartRenderingEngine$1.handleEvent(Event) line: 137	
	UIEventHandler$1.run() line: 41	
	UISynchronizer(Synchronizer).syncExec(Runnable) line: 180	
	UISynchronizer.syncExec(Runnable) line: 150	
	Display.syncExec(Runnable) line: 4681	
	E4Application$1.syncExec(Runnable) line: 182	
	UIEventHandler.handleEvent(Event) line: 38	
	EventHandlerWrapper.handleEvent(Event, Permission) line: 197	
	EventHandlerTracker.dispatchEvent(EventHandlerWrapper, Permission, int, Event) line: 197	
	EventHandlerTracker.dispatchEvent(Object, Object, int, Object) line: 1	
	EventManager.dispatchEvent(Set, EventDispatcher, int, Object) line: 230	
	ListenerQueue.dispatchEventSynchronous(int, Object) line: 148	
	EventAdminImpl.dispatchEvent(Event, boolean) line: 135	
	EventAdminImpl.sendEvent(Event) line: 78	
	EventComponent.sendEvent(Event) line: 39	
	EventBroker.send(String, Object) line: 81	
	UIEventPublisher.notifyChanged(Notification) line: 58	
	PlaceholderImpl(BasicNotifierImpl).eNotify(Notification) line: 380	
	PlaceholderImpl(UIElementImpl).setToBeRendered(boolean) line: 292	
	PartServiceImpl.hidePart(MPart, boolean) line: 1005	
	PartServiceImpl.hidePart(MPart) line: 944	
	StackRenderer.closePart(Widget) line: 555	
	StackRenderer.access$6(StackRenderer, Widget) line: 540	
	StackRenderer$5.close(CTabFolderEvent) line: 523	
	CTabFolder.onMouse(Event) line: 1787	
	CTabFolder$1.handleEvent(Event) line: 275	
	EventTable.sendEvent(Event) line: 84	
	CTabFolder(Widget).sendEvent(Event) line: 1053	
	Display.runDeferredEvents() line: 4163	
	Display.readAndDispatch() line: 3752	
	PartRenderingEngine$7.run() line: 890	
	Realm.runWithDefault(Realm, Runnable) line: 332	
	PartRenderingEngine.run(MApplicationElement, IEclipseContext) line: 806	
	E4Workbench.createAndRunUI(MApplicationElement) line: 87	
	Workbench$3.run() line: 542	
	Realm.runWithDefault(Realm, Runnable) line: 332	
	Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 522	
	PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149	
	Application.start(IApplicationContext) line: 45	
	EclipseAppHandle.run(Object) line: 196	
	EclipseAppLauncher.runApplication(Object) line: 110	
	EclipseAppLauncher.start(Object) line: 79	
	EclipseStarter.run(Object) line: 344	
	EclipseStarter.run(String[], Runnable) line: 179	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25	
	Method.invoke(Object, Object...) line: 597	
	Main.invokeFramework(String[], URL[]) line: 622	
	Main.basicRun(String[]) line: 577	
	Main.run(String[]) line: 1410	
	Main.main(String[]) line: 1386
Comment 40 Remy Suen CLA 2011-06-13 05:56:32 EDT
(In reply to comment #39)
> I found the following: If the view is the only part in the shared area,
> everything seems to be fine. If I open an Editor before I open the view and
> then close the view, setToBeRendered is invoked two times, at first from
> hidePart with false and then immediately with true from the event with the
> following stacktrace. The view ist still invisible then, but I think this makes
> the calcIndex go wrong. An if I then close the editor it gets rendered again.

Hm, this is very weird indeed. Unfortunately, I still cannot reproduce the problem, Thomas. :/ Is your a view a multi-instance view (like the 'Console' view or 'Properties' view) or is there only one of them at a time? Could you please put a breakpoint in WorkbenchPartReference's invalidate() method? I want to see who is calling the method and making 'legacyPart' be set to 'null' (and causing your view to be instantiated again). Thank you.
Comment 41 Thomas Kratz CLA 2011-06-13 06:04:57 EDT
this is my view
<view
            class="de.eiswind.paris.client.core.ui.valuelist.ValueListView2"
            id="de.eiswind.paris.client.core.ui.valuelist.ValueListView2"
            name="%valueLists">
</view>
it's single instance. the inavalidate looks unsuspicious to me


Thread [main] (Suspended (breakpoint at line 669 in WorkbenchPartReference))	
	ViewReference(WorkbenchPartReference).invalidate() line: 669	
	CompatibilityView(CompatibilityPart).invalidate() line: 168	
	CompatibilityView(CompatibilityPart).destroy() line: 318	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25	
	Method.invoke(Object, Object...) line: 597	
	MethodRequestor.execute() line: 56	
	InjectorImpl.processAnnotated(Class<Annotation>, Object, Class<?>, PrimaryObjectSupplier, PrimaryObjectSupplier, ArrayList<Class<?>>) line: 828	
	InjectorImpl.processAnnotated(Class<Annotation>, Object, Class<?>, PrimaryObjectSupplier, PrimaryObjectSupplier, ArrayList<Class<?>>) line: 808	
	InjectorImpl.uninject(Object, PrimaryObjectSupplier) line: 167	
	FieldRequestor(Requestor).uninject(Object, PrimaryObjectSupplier) line: 122	
	ContextObjectSupplier$ContextInjectionListener.update(IEclipseContext, int, Object[]) line: 69	
	TrackableComputationExt.update(ContextChangeEvent) line: 88	
	EclipseContext.removeListenersTo(Object) line: 439	
	ContextInjectionFactory.uninject(Object, IEclipseContext) line: 135	
	PartRenderingEngine.safeRemoveGui(MUIElement) line: 739	
	PartRenderingEngine.access$2(PartRenderingEngine, MUIElement) line: 674	
	PartRenderingEngine$6.run() line: 669	
	SafeRunner.run(ISafeRunnable) line: 42	
	PartRenderingEngine.removeGui(MUIElement) line: 654	
	ElementReferenceRenderer.disposeWidget(MUIElement) line: 108	
	PartRenderingEngine.safeRemoveGui(MUIElement) line: 730	
	PartRenderingEngine.access$2(PartRenderingEngine, MUIElement) line: 674	
	PartRenderingEngine$6.run() line: 669	
	SafeRunner.run(ISafeRunnable) line: 42	
	PartRenderingEngine.removeGui(MUIElement) line: 654	
	PartRenderingEngine$1.handleEvent(Event) line: 137	
	UIEventHandler$1.run() line: 41	
	UISynchronizer(Synchronizer).syncExec(Runnable) line: 180	
	UISynchronizer.syncExec(Runnable) line: 150	
	Display.syncExec(Runnable) line: 4681	
	E4Application$1.syncExec(Runnable) line: 182	
	UIEventHandler.handleEvent(Event) line: 38	
	EventHandlerWrapper.handleEvent(Event, Permission) line: 197	
	EventHandlerTracker.dispatchEvent(EventHandlerWrapper, Permission, int, Event) line: 197	
	EventHandlerTracker.dispatchEvent(Object, Object, int, Object) line: 1	
	EventManager.dispatchEvent(Set, EventDispatcher, int, Object) line: 230	
	ListenerQueue.dispatchEventSynchronous(int, Object) line: 148	
	EventAdminImpl.dispatchEvent(Event, boolean) line: 135	
	EventAdminImpl.sendEvent(Event) line: 78	
	EventComponent.sendEvent(Event) line: 39	
	EventBroker.send(String, Object) line: 81	
	UIEventPublisher.notifyChanged(Notification) line: 58	
	PlaceholderImpl(BasicNotifierImpl).eNotify(Notification) line: 380	
	PlaceholderImpl(UIElementImpl).setToBeRendered(boolean) line: 292	
	PartServiceImpl.hidePart(MPart, boolean) line: 1005	
	PartServiceImpl.hidePart(MPart) line: 944	
	StackRenderer.closePart(Widget) line: 555	
	StackRenderer.access$6(StackRenderer, Widget) line: 540	
	StackRenderer$5.close(CTabFolderEvent) line: 523	
	CTabFolder.onMouse(Event) line: 1787	
	CTabFolder$1.handleEvent(Event) line: 275	
	EventTable.sendEvent(Event) line: 84	
	CTabFolder(Widget).sendEvent(Event) line: 1053	
	Display.runDeferredEvents() line: 4163	
	Display.readAndDispatch() line: 3752	
	PartRenderingEngine$7.run() line: 890	
	Realm.runWithDefault(Realm, Runnable) line: 332	
	PartRenderingEngine.run(MApplicationElement, IEclipseContext) line: 806	
	E4Workbench.createAndRunUI(MApplicationElement) line: 87	
	Workbench$3.run() line: 542	
	Realm.runWithDefault(Realm, Runnable) line: 332	
	Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 522	
	PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149	
	Application.start(IApplicationContext) line: 45	
	EclipseAppHandle.run(Object) line: 196	
	EclipseAppLauncher.runApplication(Object) line: 110	
	EclipseAppLauncher.start(Object) line: 79	
	EclipseStarter.run(Object) line: 344	
	EclipseStarter.run(String[], Runnable) line: 179	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25	
	Method.invoke(Object, Object...) line: 597	
	Main.invokeFramework(String[], URL[]) line: 622	
	Main.basicRun(String[]) line: 577	
	Main.run(String[]) line: 1410	
	Main.main(String[]) line: 1386
Comment 42 Remy Suen CLA 2011-06-13 06:14:03 EDT
Created attachment 197878 [details]
CompatibilityView patch v1

Thomas, can you try this patch and tell me how it goes? Thanks.
Comment 43 Thomas Kratz CLA 2011-06-13 06:30:24 EDT
Hi Remy, it works now! At least the view closes and I don't see any log messages anymore when opening editors. Thanks for your great support!

So now it's up to make buckminster do what I need to get a release.
Comment 44 Remy Suen CLA 2011-06-13 07:44:16 EDT
(In reply to comment #43)
> Hi Remy, it works now! At least the view closes and I don't see any log
> messages anymore when opening editors.

Great to hear. The problem is that in the SDK getPart(boolean) is called a lot and that field gets set by other listeners. In your case, it seems that it is not called as frequently so it is possible that a part reference will never have its field set correctly. If you have an IPartListener2 that listens to the partOpened(*) method then I think you might not have to change the workbench internals.

public void partOpened(IWorkbenchPartReference partRef) {
  // force the field to get set
  partRef.getPart(false);
}

> Thanks for your great support!

As always, thanks for testing Eclipse 4.1!
Comment 45 Remy Suen CLA 2011-06-28 13:34:24 EDT
I delivered attachment 198568 [details] to HEAD. It's a spot fix and the issue needs to be resolved more correctly later.
Comment 46 Lars Vogel CLA 2019-11-27 07:07:13 EST
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.

If the bug is still relevant, please remove the stalebug whiteboard tag.