| Summary: | NPE thrown if HTML model is busy / unavailable from JSDT outline provider | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Bradley Childs <childsb> | ||||
| Component: | General | Assignee: | Bradley Childs <childsb> | ||||
| Status: | RESOLVED WORKSFORME | QA Contact: | Phil Berkland <berkland> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | david_williams, hjzhang, thatnitind | ||||
| Version: | unspecified | Flags: | david_williams:
pmc_approved-
childsb: pmc_approved? (raghunathan.srinivasan) childsb: pmc_approved? (naci.dai) deboer: pmc_approved+ childsb: pmc_approved? (neil.hauge) childsb: pmc_approved? (kaloyan) childsb: review? (berkland) |
||||
| Target Milestone: | Future | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | PMC_deferred | ||||||
| Attachments: |
|
||||||
|
Description
Bradley Childs
Created attachment 101343 [details]
patch to catch any NPEs from null HTML model
fix to catch/ignore NPE. js content outline will be unavailable until html model is ready.
Also solves (includes solution for) bug 231878. Approved provided you remove the TODOs and commented out e.printStackTrace() and add proper tracing or a comment why it is not required in each case... or at least open a bug to do this in 3.0.1. I do hate to see code like this ...
catch(Exception e){
// do nothing
}
Why must this be so general as to catch any Exception?
And, if you are suggesting this is catching a NPE, then that doesn't seem quite right ... seems the fix should be "lower" in the code? Why would this not be possible?
david - unfortunately this is one of those "difficult to intentionally reproduce" bugs, and at the moment i can't get it to fail or i would give a more specific answer. so working from my memory... i believe the NPE is thrown from inside one of the SSE model manager methods. the only solution for JSDT is to catch it try to recover gracefully. ideally the sse wouldn't throw the NPE. the catch may be more appropriate deeper inside the javascript translation code, but i felt this was most safe/least impacting solution for now. to satisfy your concern and tim's as well, i can open a new bug targeted for 3.01 to both better handle and provide proper tracing for NPE's / other errors in this class. ok, if it's just "messages in the log", and not that easy to reproduce, I'd prefer to wait rather than put in a "band aid" fix which I think might mask something worse. Sounds like it wouldn't hurt that much to leave as is. Please correct me if I've misunderstood. I'd suggest moving this to 3.1 and reopening bug 231878, then. old/obsolete bug. |