This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 433492 - IAE in ModelServiceImpl.findElementsRecursive(ModelServiceImpl.java:140)
Summary: IAE in ModelServiceImpl.findElementsRecursive(ModelServiceImpl.java:140)
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: PC Mac OS X
: P1 blocker (vote)
Target Milestone: 4.4 M7   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 380946
  Show dependency tree
 
Reported: 2014-04-25 04:51 EDT by Dani Megert CLA
Modified: 2014-04-28 05:05 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2014-04-25 04:51:58 EDT
N20140424-2000.

Doing anything useful on Mac, like opening an editor causes an IAE:

java.lang.IllegalArgumentException:
at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
at org.eclipse.core.runtime.Assert.isLegal(Assert.java:47)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.findElementsRecursive(ModelServiceImpl.java:140)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.findElements(ModelServiceImpl.java:315)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.findElements(ModelServiceImpl.java:301)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.addPart(PartServiceImpl.java:889)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.addPart(PartServiceImpl.java:1085)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1109)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3127)
at org.eclipse.ui.internal.WorkbenchPage.access$23(WorkbenchPage.java:3049)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:3031)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3026)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2990)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2971)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:603)
Comment 1 Dani Megert CLA 2014-04-25 04:52:44 EDT
No IAE on Linux or Windows 7.
Comment 2 Dani Megert CLA 2014-04-25 04:57:12 EDT
Might be caused by the fix for bug.
Comment 3 Markus Keller CLA 2014-04-25 05:17:05 EDT
Might be caused by the fix for bug 432847.
Comment 4 Louis-Michel Mathurin CLA 2014-04-25 08:40:07 EDT
To investigate we need to find why this line of code:
MUIElement area = modelService.find("org.eclipse.ui.editorss", container);
in the part service is returning "null" only on Mac
Comment 5 Lars Vogel CLA 2014-04-25 08:53:53 EDT
(In reply to Louis-Michel Mathurin from comment #4)
> To investigate we need to find why this line of code:
> MUIElement area = modelService.find("org.eclipse.ui.editorss", container);
> in the part service is returning "null" only on Mac

Brian, can you help here?
Comment 6 Paul Webster CLA 2014-04-25 09:15:55 EDT
(In reply to Lars Vogel from comment #5)
> (In reply to Louis-Michel Mathurin from comment #4)
> > To investigate we need to find why this line of code:
> > MUIElement area = modelService.find("org.eclipse.ui.editorss", container);
> > in the part service is returning "null" only on Mac
> 
> Brian, can you help here?

I'm going to revert the main change, add back the handler search, and then push the squashed changes up to a gerrit review.

PW
Comment 9 Paul Webster CLA 2014-04-26 20:04:10 EDT
I'll try and get some time on my mac at work tomorrow morning to look at this.

PW
Comment 10 Paul Webster CLA 2014-04-27 09:26:50 EDT
The problem was caused by this CCE.  It killed creation of the workbench window, which left it with no MArea to find.

Fixed with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=f60919665fc89b2cf09375530ce7394d90669a92


Caused by: java.lang.ClassCastException: org.eclipse.e4.ui.workbench.renderers.swt.cocoa.MinimizeWindowHandler cannot be cast to org.eclipse.core.commands.IHandler
	at org.eclipse.ui.internal.help.CommandHelpServiceImpl.getHelpContextId(CommandHelpServiceImpl.java:57)
	at org.eclipse.ui.internal.commands.CommandService.getHelpContextId(CommandService.java:203)
	at org.eclipse.ui.internal.commands.CommandService.getHelpContextId(CommandService.java:210)
	at org.eclipse.ui.internal.commands.SlaveCommandService.getHelpContextId(SlaveCommandService.java:250)
	at org.eclipse.ui.menus.CommandContributionItem.<init>(CommandContributionItem.java:228)
	at org.eclipse.ui.internal.ide.WorkbenchActionBuilder.makeActions(WorkbenchActionBuilder.java:1158)
	at org.eclipse.ui.application.ActionBarAdvisor.fillActionBars(ActionBarAdvisor.java:148)
	at org.eclipse.ui.internal.ide.WorkbenchActionBuilder.fillActionBars(WorkbenchActionBuilder.java:337)
	at org.eclipse.ui.internal.WorkbenchWindow.fillActionBars(WorkbenchWindow.java:2492)
	at org.eclipse.ui.internal.WorkbenchWindow.setup(WorkbenchWindow.java:652)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
Comment 11 Dani Megert CLA 2014-04-28 05:05:13 EDT
(In reply to Paul Webster from comment #10)
> The problem was caused by this CCE.  It killed creation of the workbench
> window, which left it with no MArea to find.
> 
> Fixed with
> http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/
> ?id=f60919665fc89b2cf09375530ce7394d90669a92

Verified in I20140427-2030.


> Caused by: java.lang.ClassCastException:
> org.eclipse.e4.ui.workbench.renderers.swt.cocoa.MinimizeWindowHandler cannot
> be cast to org.eclipse.core.commands.IHandler

Introduced with the fix for bug 380946.