Bug 17247

Summary: Invalid thread access in task list
Product: [Eclipse Project] Platform Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: Chris McLaren <csmclaren>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P1 CC: philippe_mulet
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
.log none

Description Dani Megert CLA 2002-05-23 09:37:51 EDT
Build F1
Sorry, not test case. Saw it when I checked the log (there was no dialog).
See attached .log
Comment 1 Dani Megert CLA 2002-05-23 09:38:13 EDT
Created attachment 990 [details]
.log
Comment 2 Nick Edgar CLA 2002-05-26 14:16:03 EDT
Since resource delta can come in on any thread, must call viewer in a 
Display.syncExec
Comment 3 Chris McLaren CLA 2002-05-27 11:04:14 EDT
i wasn't able to reproduce this problem. aside from the log message, are there 
any noticable ill effects of this bug? i have investigated instances where i've 
added code which invoked viewer methods not explicitely on the ui thread and i 
found only one method: TaskList.setMarkerLimitExceeded. i've replaced this 
method locally with the method below without any noticable problems. nick, you 
may choose to commit this change as a preventative measure.

void setMarkerLimitExceeded(boolean markerLimitExceeded) {
	this.markerLimitExceeded = markerLimitExceeded;
	
	if (markerLimitExceeded) {
		stackLayout.topControl = compositeMarkerLimitExceeded;

		viewer.getControl().getDisplay().syncExec(new Runnable() {	
	
			public void run() {
				viewer.setSelection(null);
			}
		});
	}
	else {
		stackLayout.topControl = table;
	}

	parent.layout();

	viewer.getControl().getDisplay().syncExec(new Runnable() {		
		public void run() {
			viewer.refresh();
		}
	});
}
Comment 4 Dani Megert CLA 2002-05-27 12:08:06 EDT
I think there was no effect in the UI (at least no dialog). However the log
shows that there is a potential problem.

Comment 5 Chris McLaren CLA 2002-05-27 16:26:51 EDT
this should be fixed with the latest changes i am providing nick edgar today.
Comment 6 Chris McLaren CLA 2002-05-28 09:36:00 EDT
fixed as per previous comment
Comment 7 Nick Edgar CLA 2002-05-30 15:01:41 EDT
*** Bug 18293 has been marked as a duplicate of this bug. ***