Community
Participate
Working Groups
I've noticed some undesirable behaviors when using the SWT Browser Embedding/HTML Widget on Linux. The browser area will "break out" of the Eclipse workbench into its own independent top-level window when the user takes certain actions or when it is configured in certain fashions. I have so far found that it does this under EITHER of these two conditions: - The user enables "Fast View" on a view containing a browser component. - A browser component is placed inside of a MultiPageEditor. This problem may be replicated using the browser example, without any modification to its source code. Just start the example, open the HTML view, and set it to "Fast View". Show and hide the view once or twice. The browser's contents will disappear. Then press enter with the browser's location bar focused, and the web page will be displayed in an external top-level window. The bigger problem (in my case) is actually the MultiPageEditor issue, but to demonstrate that takes far more work than the fast view example above. Both cases have nearly identical behavior though. I've tried this on three systems (Two RedHat 9, One RedHat 7.3), each of which has had Ximian Desktop 2 installed, which includes the latest GTK+2.2 libraries, and Mozilla 1.4.0 built with GTK+2 support. I've tried Eclipse 3.0M3, and various post-M3 nightly and integration builds. On Windows, the problem does not occur.
I've just tried the October 7 integration build (eclipse-SDK-I20031007-linux-gtk.zip), and this issue appears to be corrected, at least with regard to embedding browsers in MultiPageEditors. I did notice one additional problem though: If you close the last editor that contains a browser, and then open a new editor that contains a browser it fails with an SWTError (see bottom). Basically, you can go from a state with zero browser-containing multi page editors to a state with one or more editors, but if you go back to a state with zero editors, then attempting to open a browser-utilizing editor will cause this crash. I'd be happy to file a new bug report if you'd like. Here's the stack trace (this is with the Oct 7 int. build): !SESSION Oct 07, 2003 18:36:39.74 ---------------------------------------------- java.version=1.4.2 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US Command-line arguments: -pdelaunch -data /home/tliebeck/runtime-workspace -feature org.eclipse.platform -dev bin,tmp/eclipse_build -os linux -ws gtk -arch x86 -nl en_US -configuration file:/home/tliebeck/eclipse/workspace3.0m3/.metadata/.plugins/org.eclipse.pde.core/_home_tliebeck_runtime-workspace/platform.cfg -install file:/usr/local/eclipse3/ !ENTRY org.eclipse.ui 4 4 Oct 07, 2003 18:36:39.74 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Oct 07, 2003 18:36:39.75 !MESSAGE XPCOM error Not initialized. !STACK 0 org.eclipse.swt.SWTError: XPCOM error Not initialized. at org.eclipse.swt.browser.Browser.<init>(Browser.java:117) at nextapp.es.browser.internalswt.SwtBrowser.<init>(SwtBrowser.java:23) at nextapp.es.browser.BrowserFactory.create(BrowserFactory.java:14) at nextapp.es.form.editor.PreviewEditor.createPartControl(PreviewEditor.java:40) at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:107) at nextapp.es.form.editor.FormEditor.createPreviewPage(FormEditor.java:120) at nextapp.es.form.editor.FormEditor.createPages(FormEditor.java:110) at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:166) at org.eclipse.ui.internal.PartPane$4.run(PartPane.java:141) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1034) at org.eclipse.core.runtime.Platform.run(Platform.java:432) at org.eclipse.ui.internal.PartPane.createChildControl(PartPane.java:137) at org.eclipse.ui.internal.PartPane.createControl(PartPane.java:186) at org.eclipse.ui.internal.EditorWorkbook.createPage(EditorWorkbook.java:404) at org.eclipse.ui.internal.EditorWorkbook.add(EditorWorkbook.java:123) at org.eclipse.ui.internal.EditorArea.addEditor(EditorArea.java:55) at org.eclipse.ui.internal.EditorPresentation.openEditor(EditorPresentation.java:351) at org.eclipse.ui.internal.EditorManager$2.run(EditorManager.java:585) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:574) at org.eclipse.ui.internal.EditorManager.openInternalEditor(EditorManager.java:668) at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:459) at org.eclipse.ui.internal.EditorManager.openEditorFromInput(EditorManager.java:333) at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:424) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2081) at org.eclipse.ui.internal.WorkbenchPage.access$6(WorkbenchPage.java:2029) at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2016) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2011) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:1912) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:132) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:105) at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:49) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:158) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:147) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:194) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:172) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:316) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$5.open(PackageExplorerPart.java:326) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:392) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1034) at org.eclipse.core.runtime.Platform.run(Platform.java:432) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:390) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:600) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:689) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:209) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:204) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:233) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1815) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1595) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2315) at org.eclipse.ui.internal.Workbench.run(Workbench.java:2298) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:298) at org.eclipse.core.launcher.Main.run(Main.java:764) at org.eclipse.core.launcher.Main.main(Main.java:598)
Thanks for the info Tod. Please reopen if you identify a reproduceable case where the Browser comes up into a top level window instead of being embedded. About the second problem you mention: please add yourself to bug 43837