Bug 566043 - Unreadable project names in import wizard
Summary: Unreadable project names in import wizard
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.17   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 4.17 M3   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-08-13 10:14 EDT by Fred Bricon CLA
Modified: 2020-09-07 03:57 EDT (History)
6 users (show)

See Also:


Attachments
Screenshot of import wizard in dark 2020-09-M2 (267.32 KB, image/png)
2020-08-13 10:14 EDT, Fred Bricon CLA
no flags Details
Screenshot of import wizard in light 2020-09-M2 (1.34 MB, image/png)
2020-08-13 11:24 EDT, Fred Bricon CLA
no flags Details
Screenshot of import wizard in dark in I2020819-0600 (764.09 KB, image/png)
2020-08-19 09:03 EDT, Sravan Kumar Lakkimsetti CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fred Bricon CLA 2020-08-13 10:14:48 EDT
Created attachment 283857 [details]
Screenshot of import wizard in dark 2020-09-M2

In Eclipse 2020-09 M2, with Dark Theme enabled, the Project Import wizard does not display projects names anymore, everything is dark gray on dark gray. See attached screenshot.
Comment 1 Fred Bricon CLA 2020-08-13 11:08:20 EDT
Looks like something's fubar at the platform level:

java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
	at org.eclipse.swt.widgets.TreeItem.getTextBounds(TreeItem.java:849)
	at org.eclipse.jface.viewers.TreeViewerRow.getTextBounds(TreeViewerRow.java:320)
	at org.eclipse.jface.viewers.ViewerCell.getTextBounds(ViewerCell.java:332)
	at org.eclipse.jface.viewers.StyledCellLabelProvider.paint(StyledCellLabelProvider.java:344)
	at org.eclipse.jface.viewers.OwnerDrawLabelProvider$OwnerDrawListener.handleEvent(OwnerDrawLabelProvider.java:62)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4385)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
	at org.eclipse.swt.widgets.Tree.drawInteriorWithFrame_inView(Tree.java:1273)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:6434)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:769)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5979)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
	at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:5259)
	at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5652)
	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
	at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:92)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3783)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
	at org.eclipse.jface.window.Window.open(Window.java:799)
	at org.eclipse.ui.internal.handlers.WizardHandler$Import.executeHandler(WizardHandler.java:151)
	at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:280)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
	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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:319)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:253)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
	at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:389)
	at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:142)
	at org.eclipse.ui.internal.actions.CommandAction.run(CommandAction.java:152)
	at org.eclipse.ui.actions.ImportResourcesAction.run(ImportResourcesAction.java:100)
	at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:171)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:579)
	at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:413)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4385)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3789)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:657)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:556)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:153)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	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:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Comment 2 Fred Bricon CLA 2020-08-13 11:24:02 EDT
Created attachment 283859 [details]
Screenshot of import wizard in light 2020-09-M2

This has nothing to do with the theme. Also, project viewer looks like crap too.
Comment 3 Fred Bricon CLA 2020-08-13 11:27:29 EDT
eclipse.buildId=4.17.0.I20200729-1800
java.version=11.0.8
java.vendor=AdoptOpenJDK
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_CA
Framework arguments:  -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -keyring /Users/fbricon/.eclipse_keyring
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -data file:/Users/fbricon/Dev/workspaces/jee-2020-09-M/ -product org.eclipse.epp.package.jee.product -keyring /Users/fbricon/.eclipse_keyring
Comment 4 Rolf Theunissen CLA 2020-08-13 14:08:05 EDT
This must be caused by the changes for Bug 300147.
Comment 5 Sravan Kumar Lakkimsetti CLA 2020-08-14 04:14:45 EDT
I don't see this problem in SDK product. Must be specific to Maven import wizard.
Comment 6 Sravan Kumar Lakkimsetti CLA 2020-08-14 05:00:10 EDT
I feel this is a problem in jface. Jface is tying to access an index it is out of bounds. 

Moving to platform ui for comment
Comment 7 Noopur Gupta CLA 2020-08-14 06:58:14 EDT
(In reply to Fred Bricon from comment #2)
> Created attachment 283859 [details]
> Screenshot of import wizard in light 2020-09-M2
> 
> This has nothing to do with the theme. Also, project viewer looks like crap
> too.
Screenshot looks similar to bug 564645.
Comment 8 Sravan Kumar Lakkimsetti CLA 2020-08-19 09:03:45 EDT
Created attachment 283908 [details]
Screenshot of import wizard in dark in I2020819-0600
Comment 9 Sravan Kumar Lakkimsetti CLA 2020-08-19 09:04:21 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #8)
> Created attachment 283908 [details]
> Screenshot of import wizard in dark in I2020819-0600

I don't see this problem in latest eclipse.
Comment 10 Fred Bricon CLA 2020-08-19 09:20:50 EDT
@Sravan try the maven import wizard.

Nothing in the stacktrace I posted previously points to a failure in the m2e stack. Everything happens in platform itself
Comment 11 Andrey Loskutov CLA 2020-08-19 09:50:11 EDT
(In reply to Fred Bricon from comment #1)
> Looks like something's fubar at the platform level:
> 
> java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
> 	at org.eclipse.swt.widgets.TreeItem.getTextBounds(TreeItem.java:849)
>

This part of stack was changed in bug 300147. If I read the code right, strings [index] might not be defined if the text was not set for the column. So the new code that accesses strings [index] unconditionally should probably first check if the index is in the range.
Comment 12 Lakshmi P Shanmugam CLA 2020-08-19 16:49:51 EDT
(In reply to Andrey Loskutov from comment #11)
Sorry, I'm on vacation, just had a quick look at this.

strings [index] is defined for all valid index and set to "" if no text is set. So, no check is required.

Looks like the problem is that 'index' is not valid in case of Tree with CHECK style as it gets modified at line 843 and strings[index] uses the modified index.

Moving the code in TreeItem.getTextBounds (lines 848-849) above line 842 should fix the problem.
Similar change may be needed for TableItem.getTextBounds().

@Sravan, can you please fix this?
Comment 13 Eclipse Genie CLA 2020-08-20 02:09:13 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/167984
Comment 15 Sravan Kumar Lakkimsetti CLA 2020-08-20 06:13:52 EDT
Verified in Eclipse SDK
Version: 2020-09 (4.17)
Build id: I20200820-0230
OS: Mac OS X, v.10.15.6, x86_64 / cocoa
Java version: 14.0.2