Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled event loop exception #309

Closed
spirentitestdevter opened this issue Jun 4, 2019 · 4 comments
Closed

Unhandled event loop exception #309

spirentitestdevter opened this issue Jun 4, 2019 · 4 comments
Assignees
Labels
Milestone

Comments

@spirentitestdevter
Copy link

Hi,

I'm developing a target platform base on eclipse 4.11, I included RED v0.8.11 using target file and used maven to build a product. I always get error when open a robot file source tab. I can not do every thing because this issue. Could you take a look on it ?

Thanks,
Nghia

Here is error log:
*eclipse.buildId=unknown
java.version=11.0.3
java.vendor=AdoptOpenJDK
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86_64

org.eclipse.ui
Error
Tue Jun 04 09:39:28 ICT 2019
Unhandled event loop exception

java.lang.ClassCastException: class org.eclipse.jface.action.SubContributionItem cannot be cast to class org.eclipse.ui.texteditor.StatusLineContributionItem (org.eclipse.jface.action.SubContributionItem is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @587c5c1; org.eclipse.ui.texteditor.StatusLineContributionItem is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @1447bef2)
at org.robotframework.ide.eclipse.main.plugin.tableeditor.source.SuiteSourceEditor.updateLineLocationStatusBar(SuiteSourceEditor.java:207)
at org.robotframework.ide.eclipse.main.plugin.tableeditor.source.SuiteSourceEditor.lambda$2(SuiteSourceEditor.java:195)
at org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:101)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1064)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:778)
at org.eclipse.swt.custom.StyledText.setCaretOffset(StyledText.java:8795)
at org.eclipse.swt.custom.StyledText.doMouseLocationChange(StyledText.java:2853)
at org.eclipse.swt.custom.StyledText.handleMouseDown(StyledText.java:6162)
at org.eclipse.swt.custom.StyledText.lambda$1(StyledText.java:5789)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3944)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3547)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:566)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at com.fnfr.svt.rcp.Application.runWorkbench(Application.java:231)
at com.fnfr.svt.rcp.Application.start(Application.java:190)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:661)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
at org.eclipse.equinox.launcher.Main.run(Main.java:1476)

@michalanglart
Copy link
Collaborator

Hi,

I'm unable to reproduce your issue. How is your target platform configured? What features does it include?

Are you aware of any plugins which somehow would contribute to action bar? In the definition of editor:

contributorClass="org.robotframework.ide.eclipse.main.plugin.tableeditor.RobotFormEditorActionBarContributor"
we add action bars contributor which itself is defined here: https://github.com/nokia/RED/blob/master/src/Eclipse-IDE/org.robotframework.ide.eclipse.main.plugin/src/org/robotframework/ide/eclipse/main/plugin/tableeditor/RobotFormEditorActionBarContributor.java

As you can see in the source this contributor adds StatusLineContributionItem under ITextEditorActionConstants.STATUS_CATEGORY_INPUT_POSITION category.

Then SuiteSourceEditor attaches a listener on a caret position and here:

final StatusLineContributionItem find = (StatusLineContributionItem) getEditorSite().getActionBars()
it looks for the item in order to update position. It expects to be of type StatusLineContributionItem since the contributor registered this item under the same category.

Overall this mechanism is responsible for displaying and updating the element marked with red on screenshot:
source_position

Do you have other plugins possibly somehow altering the items contributed to status line when Robot editor is open?

@michalanglart
Copy link
Collaborator

Closing due to no answers from reporter + no one else run into this issue. RED 0.9.0 is based on eclipse 4.13 instead of 4.9, so maybe this is also fixed (if this was RED issue)

@spirentitestdevter
Copy link
Author

Sorry for my late response. We imported RED source codes to my project and added workaround for RED v0.8.11. Now We upgrade the Eclipse and upgrade RED and get error again, we could have to add source codes again. We hope that you can fix it in next release to avoid our effort. I'm very appreciate your help.

@michalanglart michalanglart added this to the 0.9.5 milestone Jul 3, 2020
@michalanglart michalanglart self-assigned this Jul 3, 2020
red-common-CI pushed a commit that referenced this issue Jul 24, 2020
This exception could occur when installed in some customized
eclipse-based products

Change-Id: Ifbf16f02d4daffd42970a99910e2f0af06bd0882
@michalanglart
Copy link
Collaborator

Fixed this exception in 0.9.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants