Bug 17247 - Invalid thread access in task list
Summary: Invalid thread access in task list
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 critical (vote)
Target Milestone: ---   Edit
Assignee: Chris McLaren CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 18293 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-05-23 09:37 EDT by Dani Megert CLA
Modified: 2002-05-30 15:01 EDT (History)
1 user (show)

See Also:


Attachments
.log (2.07 KB, text/plain)
2002-05-23 09:38 EDT, Dani Megert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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. ***