| Summary: | [Help] Trying to open Workbench Help shows an "XPCOM Error" dialog | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Martin Oberhuber <mober.at+eclipse> | ||||||
| Component: | User Assistance | Assignee: | Chris Goldthorpe <cgold> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | cgold, ChrisAustin, martin.gutschelhofer | ||||||
| Version: | 3.7 | Flags: | cgold:
review+
ChrisAustin: review+ |
||||||
| Target Milestone: | 3.7.1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Martin Oberhuber
Created attachment 199656 [details]
Stacktrace logged when trying to show help
Attached stacktrace shows the failure. To me, it looks like
EmbeddedBrowserFactory.isAvailable()
should catch the XPCOM error and return "false" ... after all, this was just a test to see whether an embedded browser is available, and when the mere test results in an error then it's apparently not available. It would IMO be OK to log the exception (eg once per session) but downstream clients should just expect the embedded browser to not be available :
org.eclipse.swt.SWTError: XPCOM error -2147467259
at org.eclipse.swt.browser.Mozilla.error(Mozilla.java:2502)
at org.eclipse.swt.browser.Mozilla.initXULRunner(Mozilla.java:2464)
at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:672)
at org.eclipse.swt.browser.Browser.<init>(Browser.java:96)
at org.eclipse.help.ui.internal.browser.embedded.EmbeddedBrowserFactory.test(EmbeddedBrowserFactory.java:71)
at org.eclipse.help.ui.internal.browser.embedded.EmbeddedBrowserFactory.isAvailable(EmbeddedBrowserFactory.java:51)
at org.eclipse.help.internal.browser.BrowserManager.createBrowserDescriptors(BrowserManager.java:223)
Created attachment 199666 [details]
patch v1
The problem here is that the seemingly innocent act of logging the XPCOM Error triggers a host of log listeners and status handlers, which end up showing the SWT Error Dialog and recommending to exit workbench.
This is inappropriate here since we just probed the Browser and if it's not available for any reason, that error can not be considered fatal.
Attached patch logs the issue as warning instead of an error, and wraps the SWTError in a generic exception to stop status handlers from kicking in.
The fix looks safe, targeting 3.7.1. Hi Chris, is there any rough ETA when we could pick this up with an M-Build? Ping, could this go into 3.7.1 rc 1 ? I just got back from a 2 week vacation, I'll take a look. Yes, I can get this into 3.7.1 The patch has been committed to the 3.7 maintenance stream. The patch has also been committed to HEAD, Fixed. I do not have a Linux machine to test this on, but the patch looks ok. The fix is in M20110824-0800 - please verify the fix. |