| Summary: | [event] bad EventHandler with LogEntry topic can cause endless event dispatching | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Thomas Watson <tjwatson> | ||||||||
| Component: | Compendium | Assignee: | Thomas Watson <tjwatson> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | ||||||||||
| Version: | 3.7 | ||||||||||
| Target Milestone: | 3.7 M5 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Thomas Watson
Created attachment 186317 [details]
possible fix
This fix will detect a possible endless LogEntry event posting by wrapping the EventHanders exception in a special exception when the event topic starts with "org/osgi/service/log/LogEntry". This way we can detect a second exception from a handler if the log call causes another exception from an EventHandler.
Created attachment 186319 [details]
possible fix
The previous patch prevented endless events but had a bug. It tried to cast the event property "exception" to Class which would cause a cast exception. The property "exception" is not a Class but the actual exception. This patch fixes that.
Created attachment 186321 [details]
proposed fix
OK, lets try this again. Same idea but with a simple instanceof check.
patch released. |