Community
Participate
Working Groups
I'm finding a very odd occurrence that I haven't been able to solve. When I start the workbench with my view in a clean workspace the browser works, and I'm able to collect some data from the browser and save that to a file. When I close the workspace and open it again, (w/o cleaning the workspace) and open the file I saved, I get the following error and the browser doesn't render. If I create a new clean workspace and copy my saved file in there and open it, the browser works. How do I go about fixing this? Any help is appreciated - I'm not sure if this is a bug or if there is a workaround.... I searched for "org.eclipse.swt.browser.Browser.<init>(Browser.java:194)" on google and got one entry reporting the same issue but no followup/responses. org.eclipse.swt.SWTError: No more handles at org.eclipse.swt.SWT.error(SWT.java:3400) at org.eclipse.swt.SWT.error(SWT.java:3297) at org.eclipse.swt.SWT.error(SWT.java:3268) at org.eclipse.swt.browser.Browser.<init>(Browser.java:194)
I did some more tracing and found something that maybe you can shed light on. It seems to be with the OLE stuff. The SWT Exception gets fired because OleControlSite:99 returns a bad result code: int result = COM.OleCreate(appClsid, COM.IIDIUnknown, COM.OLERENDER_DRAW, null, 0, tempStorage.getAddress(), address); if (result != COM.S_OK) OLE.error(OLE.ERROR_CANNOT_CREATE_OBJECT, result); In my debugger, COM.OleCreate returns -2147221164 which causes the OLE.error command on line OleControlSite:101 to fire. This triggers all the SWT exceptions up the stack. Any thoughts?
I've never heard of a problem like this before. Questions: - what is the value of String progId that is passed to the OleControlSite constructor where the error occurs? - is this reproducable on other's machines? Are you able to send the file that makes this happen so that I can try to reproduce it? - if you run regedit on your machine: - what is the value of HKEY_CLASSES_ROOT>Shell.Explorer>CLSID and HKEY_CLASSES_ROOT>Shell.Explorer>CurVer? - do you have a registry entry whose name is the value of HKEY_CLASSES_ROOT>Shell.Explorer>CurVer? (eg.- this is typically Shell.Explorer.2)
Timed out, closing report. Please reopen if this still happens with a recent build such as http://download.eclipse.org/eclipse/downloads/drops/S-3.4M7-200805020100/index.php and you have more information, thanks.
We are seeing this problem with SWT 3.4.2 on a lot of clients computer. We are unable to reproduce it in-house. I think it would be very benificial in the future to not catch the SWTException in IE.create, and rethrow SWT.ERROR_NO_HANDLES as this is really just a mad guess, which makes it very hard to diagnose problems in the wild. I suggest you reopen this bug, and just rethrow the original SWTException after the browser has been disposed.
It's true that the ERROR_NO_HANDLES hides the underlying OLE problem contained in the SWTException. However throwing an OLE-level exception like this from Browser would be exposing implementation detail that a Browser client should not care about. I understand how it would be helpful in your case, but would be inconsistent with swt's API implementation throughout. More importantly, changing this behaviour would also be an API break, because Browser's constructor is spec'd to throw SWTException iff calling from an invalid thread, and SWTError for other instantiation problems. It's rare that this distinction matters on Windows, but on *ix it's more common for Browser instantiations to fail, so swt clients have been dependent for years on catching SWTError to handle cases like this. This cannot be changed now.
Is it at least possible to log the message somehow, so its possible to diagnose this problem in the wild? It seems to me the only way we can understand what is wrong is to debug the application. Since we cannot reproduce this internally, this would require us to setup a remote debugging session; not simple at all.
Could you reopen this bug, as the issue is not at all resolved? At least add some logging so developers have a chance of diagnosing problems.
I've logged bug 317810 for this.