| Summary: | Error Log view doesn't update reliably | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Markus Keller <markus.kell.r> | ||||
| Component: | Framework | Assignee: | Thomas Watson <tjwatson> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | remy.suen, tjwatson | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | 3.7 M7 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Markus Keller
The problem could be that the NPE is logged in a background thread. I've seen this before but cannot reproduce reliably. Could be collateral damage from bug 292135. I'm not able to reproduce. I get an error in my log each startup !ENTRY org.eclipse.core.net 1 0 2011-02-11 16:20:58.559 !MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences Not sure why, but this error shows up in my log view each startup and the NPE from bug 336936 always shows up in the error log if I follow the steps to reproduce the NPE. Perhaps my environment is not correct because I get primed with the first error log entry each startup. I have been able to reproduce. The issue is that the listeners of extended log service are not sorted. The listener responsible for writing the eclipse log is being called after the listener for the LogView. If it is the first log entry being logged then the LogView will read the log from disk before the event has been processed by listener responsible for writing the eclips log has written the log. The solution is to keep the listeners sorted so we call them in the order they were added. The eclipse log writer will always be added first. Created attachment 191645 [details]
patch
This patch uses the internal class ArrayMap to ensure ordering. It also could help with performance when iterating over listeners since we don't have to use a heavy weight Map. But this could slow down add/remove listener if we have large numbers of listeners (something I really hope we don't have).
Patch released. |