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

Bug 332049

Summary: Invalid thread access comparing to HEAD
Product: [Eclipse Project] Platform Reporter: Michael Rennie <Michael_Rennie>
Component: TeamAssignee: Tomasz Zarna <tomasz.zarna>
Status: RESOLVED FIXED QA Contact:
Severity: trivial    
Priority: P3 CC: remy.suen
Version: 3.7   
Target Milestone: 3.7 M5   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Fix v01 none

Description Michael Rennie CLA 2010-12-07 11:50:07 EST
eclipse.buildId=I20101205-2000
java.version=1.6.0_22
java.vendor=Apple Inc.

After restarting Eclipse I noticed two entries in the error log with the following exception:

org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4091)
at org.eclipse.swt.SWT.error(SWT.java:4006)
at org.eclipse.swt.SWT.error(SWT.java:3977)
at org.eclipse.swt.widgets.Display.error(Display.java:1040)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:807)
at org.eclipse.swt.widgets.Display.create(Display.java:790)
at org.eclipse.swt.graphics.Device.<init>(Device.java:130)
at org.eclipse.swt.widgets.Display.<init>(Display.java:681)
at org.eclipse.swt.widgets.Display.<init>(Display.java:672)
at org.eclipse.swt.widgets.Display.getDefault(Display.java:1329)
at org.eclipse.team.internal.ui.TeamUIPlugin.getStandardDisplay(TeamUIPlugin.java:410)
at org.eclipse.team.internal.ui.mapping.DiffTreeChangesSection.handleEmptyViewer(DiffTreeChangesSection.java:492)
at org.eclipse.team.internal.ui.mapping.DiffTreeChangesSection.calculateDescription(DiffTreeChangesSection.java:514)
at org.eclipse.team.internal.ui.mapping.DiffTreeChangesSection$1.done(DiffTreeChangesSection.java:79)
at org.eclipse.core.internal.jobs.JobListeners$3.notify(JobListeners.java:39)
at org.eclipse.core.internal.jobs.JobListeners.doNotify(JobListeners.java:96)
at org.eclipse.core.internal.jobs.JobListeners.done(JobListeners.java:152)
at org.eclipse.core.internal.jobs.JobManager.endJob(JobManager.java:647)
at org.eclipse.core.internal.jobs.WorkerPool.endJob(WorkerPool.java:105)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:71)

Last I remember I was syncing the API tools bundles with HEAD, prior to the restart of Eclipse.
Comment 1 Remy Suen CLA 2010-12-08 21:56:15 EST
getStandardDisplay() should return PlatformUI.getWorkbench().getDisplay() instead. The current pattern is hazardous.
Comment 2 Tomasz Zarna CLA 2010-12-13 12:10:51 EST
Created attachment 185079 [details]
Fix v01
Comment 3 Tomasz Zarna CLA 2010-12-14 05:33:23 EST
Fixed in HEAD, available in builds >=I20101214-0800. Thanks Remy.