Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 378000

Summary: AIOOBE in new CTabFolder on startup
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: SWTAssignee: Silenio Quarti <Silenio_Quarti>
Status: VERIFIED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: daniel_megert, pwebster, Silenio_Quarti
Version: 3.8   
Target Milestone: 4.2.1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Markus Keller CLA 2012-04-28 09:57:15 EDT
I20120427-1000 (3.8), master of SWT (e1940a25dd494851997c8f01624f6accfe73fc93)

Startup of the runtime workbench fails with the exception below.

I know that bug 377994 put development of 3.8 into R3_8_maintenance, but this still looks like a breaking change (org.eclipse.swt is still at 3.8.0).

java.lang.ArrayIndexOutOfBoundsException: 1
	at org.eclipse.swt.custom.CTabFolder.setButtonBounds(CTabFolder.java:2463)
	at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3639)
	at org.eclipse.swt.custom.CTabFolder.updateItems(CTabFolder.java:3574)
	at org.eclipse.swt.custom.CTabFolder.setMinimizeVisible(CTabFolder.java:2826)
	at org.eclipse.ui.internal.presentations.PaneFolder.setMinimizeVisible(PaneFolder.java:821)
	at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.<init>(DefaultTabFolder.java:110)
	at org.eclipse.ui.presentations.WorkbenchPresentationFactory.createEditorPresentation(WorkbenchPresentationFactory.java:53)
	at org.eclipse.ui.internal.presentations.PresentationFactoryUtil.createPresentation(PresentationFactoryUtil.java:42)
	at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:567)
	at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568)
	at org.eclipse.ui.internal.EditorSashContainer.createControl(EditorSashContainer.java:531)
	at org.eclipse.ui.internal.EditorAreaHelper.<init>(EditorAreaHelper.java:41)
	at org.eclipse.ui.internal.WorkbenchPage.init(WorkbenchPage.java:2511)
	at org.eclipse.ui.internal.WorkbenchPage.<init>(WorkbenchPage.java:637)
	at org.eclipse.ui.internal.tweaklets.Workbench3xImplementation.createWorkbenchPage(Workbench3xImplementation.java:39)
	at org.eclipse.ui.internal.WorkbenchWindow.busyOpenPage(WorkbenchWindow.java:796)
	at org.eclipse.ui.internal.Workbench$23.runWithException(Workbench.java:1229)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
Comment 1 Paul Webster CLA 2012-04-30 08:42:32 EDT
I'm running 3.8 I20120429-2000 and I see the CTabFolder from R3_8_maintenance.

My 3.8 starts up correctly.

PW
Comment 2 Markus Keller CLA 2012-04-30 08:52:08 EDT
(In reply to comment #1)
> I'm running 3.8 I20120429-2000 and I see the CTabFolder from R3_8_maintenance.

Yes, but that's not the scenario of this bug.
Comment 3 Paul Webster CLA 2012-04-30 09:10:04 EDT
Oh, is it that you swapped SWT from master into 3.8?  if so, I understand.

PW
Comment 4 Bogdan Gheorghe CLA 2012-04-30 17:10:00 EDT
We do not intend to support this setup - thus, we have incremented the SWT version to 3.100 to indicate behavioral changes.

In this case, the PaneFolder is trying to wrap the top  right control - something that the new CTabFolder does for you. Commenting out the resize handler in PaneFolder will allow you to come up. (But there would be more things to refactor to get it working properly - anything that deals with the top right control layout would have to revisited).

Closing as WONTFIX.
Comment 5 Silenio Quarti CLA 2012-08-16 10:44:22 EDT
Reopening
Comment 6 Silenio Quarti CLA 2012-08-16 10:45:16 EDT
Released a fix for this problem in master

http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=c727147cfc912981c3a3385133f2828fe1d74e9b
Comment 7 Markus Keller CLA 2012-08-16 14:52:15 EDT
(In reply to comment #6)
> Released a fix for this problem in master
> 
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=c727147cfc912981c3a3385133f2828fe1d74e9b

Wow, that one-line move in CTabFolder really seems to be all it takes to make 3.8.0 work with SWT from 4.2.

I think this should be released to R4_2_maintenance as well.
Comment 9 Markus Keller CLA 2012-09-05 12:24:33 EDT
Verified that M20120829-1000 starts fine with SWT from R4_2_maintenance.

The only difference I see is the gap in the border in the top-right corner (bug 377113). Maybe that's due to bug 382248.