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

Bug 341227

Summary: [Compatibility] Invalid thread access thrown when running JDT Debug's ProjectCreationDecorator test
Product: [Eclipse Project] e4 Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3    
Version: 1.0   
Target Milestone: 4.1 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
WorkbenchWindow patch v1 none

Description Remy Suen CLA 2011-03-29 09:37:28 EDT
org.eclipse.swt.SWTException: Invalid thread access
	at org.eclipse.swt.SWT.error(SWT.java:4277)
	at org.eclipse.swt.SWT.error(SWT.java:4192)
	at org.eclipse.swt.SWT.error(SWT.java:4163)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:359)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:760)
	at org.eclipse.ui.internal.WorkbenchWindow.showHeapStatus(WorkbenchWindow.java:1847)
	at org.eclipse.jdt.debug.tests.ProjectCreationDecorator.testSetPreferences(ProjectCreationDecorator.java:367)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:618)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at org.eclipse.jdt.debug.tests.AbstractDebugTest.runBare(AbstractDebugTest.java:1763)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at org.eclipse.jdt.debug.tests.ManualSuite$1.run(ManualSuite.java:72)
	at java.lang.Thread.run(Thread.java:811)
Comment 1 Remy Suen CLA 2011-03-29 09:50:25 EDT
Created attachment 192089 [details]
WorkbenchWindow patch v1

I don't know why they're calling UI code in a non-UI thread but I've added a workaround to get it to pass by not forcing a layout unless the heap status has actually changed its visibility state.
Comment 2 Remy Suen CLA 2011-03-29 09:51:10 EDT
(In reply to comment #1)
> Created attachment 192089 [details]
> WorkbenchWindow patch v1

Patch released to CVS HEAD.
Comment 3 Remy Suen CLA 2011-04-26 10:42:00 EDT
This test appears to have passed with the I20110426-0200 build on the build machines