| Summary: | Wrong highlighting of changed variables / JDIVariable not threadsafe | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Soenke Broihan <soenke.broihan> | ||||||
| Component: | Debug | Assignee: | JDT-Debug-Inbox <jdt-debug-inbox> | ||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | ||||||||
| Version: | 4.3.1 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | stalebug | ||||||||
| Attachments: |
|
||||||||
Created attachment 239147 [details]
Partial highlighting of changed variable
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Created attachment 239146 [details] Not threadsafe - fValue supposed to be null but is not I'm not sure if it is the root cause of the wrong / missing variable highlighting but the JDIVariable class is not threadsafe even though it is constantly used by at least 2 different threads as far as I can see (from classes JavaVariableContentProvider and JavaVariableLabelProvider which are called from different jobs). Therefore you can get in the situation shown in the attachment where fValue gets assigned by another thread after the check for being null was performed which then overrides the actual value of fValue. So it's kind of likely that the comparison to the previous value is messed up. Even worse: The label provider uses JDIVariable.getValue() for each column and adopts the background of each cell according to JDIVariable.hasValueChanged(). Therefore you can get in the situation in which the columns get different background colors (highlighted and normal) because in between the value seems to have changed. And another problem (perhaps related to the above): If you have big arrays which get divided into index packages (more than 100 elements) highlighting does not work also the value is changed. Perhaps threading issues or is it related to class IndexedVariablePartition always yielding "false" on .hasValueChanged()? For me it is reproducible.