Community
Participate
Working Groups
Created attachment 275583 [details] Test case for reproducing the above exception java.lang.Throwable: at org.eclipse.swt.browser.WebKit.getStackTrace(WebKit.java:437) at org.eclipse.swt.browser.WebKit.getInternalErrorMsg(WebKit.java:430) at org.eclipse.swt.browser.WebKit.access$200(WebKit.java:123) at org.eclipse.swt.browser.WebKit$Webkit2Extension.initializeWebExtensions_callback(WebKit.java:532) at org.eclipse.swt.internal.webkit.WebKitGTK._webkit_web_view_new(Native Method) at org.eclipse.swt.internal.webkit.WebKitGTK.webkit_web_view_new(WebKitGTK.java:1878) at org.eclipse.swt.browser.WebKit.create(WebKit.java:1079) at org.eclipse.swt.browser.Browser.<init>(Browser.java:99) at interoperability.swt.PureSwtTest.initializeSwt(PureSwtTest.java:43) at interoperability.swt.PureSwtTest.initialize(PureSwtTest.java:22) at interoperability.swt.PureSwtTest.main(PureSwtTest.java:50) Steps to reproduce: 1. Compile and run the attached test case with Java 10.0.2 Operating system is Ubuntu 16.04 with GTK 3.18.9-1 / 2.24.30-1. Does NOT happen with environment variable SWT_GTK3=0 set. Additional console output: Aug 28, 2018 12:10:04 PM com.sun.glass.ui.gtk.GtkApplication <clinit> WARNING: SWT-GTK uses unsupported major GTK version 0. GTK3 will be used as default. SWT Webkit.java Error: Could not find webkit extension. BrowserFunction functionality will not be available. (swt version: 4880) SWT Glue code version: 54.0 info: +BrowserFunction/GDBus, +WebkitExtension Folder versioning, +WebKitExtension OSGI support, +setUrl(..postData..), -setCookie(), -getCookie +mouseDown/Focus WebKit2Gtk version 2.20.5
Do you still experience the issue with SWT 4.10? What about on Ubuntu 18.04? Also the snippet attached uses Java FX, is it reproducible with a regular SWT Canvas?
Wanted to look how does SWT perform under GNOME 3.30 with fractional scaling. For this I've downloaded swt-4.10-gtk-linux-x86_64.zip and org.eclipse.sdk.examples.source-4.10.zip, unpacked these and launched java -classpath swt.jar:plugins/org.eclipse.swt.examples_3.106.300.v20181018-1329.jar org.eclipse.swt.examples.controlexample.ControlExample Looks very nice (except for double-wide square border in canvas example), but it just asked me to fill a bug like this one. :) My environment: Arch Linux gnome-shell 3.30.2 gtk3 3.24.5 webkit2gtk 2.22.5 (swt version: 4922r32) SWT Glue code version: 54.0 info: +BrowserFunction/GDBus, +WebkitExtension Folder versioning, +WebKitExtension OSGI support, +setUrl(..postData..), -setCookie(), -getCookie +mouseDown/Focus Stacktrace is almost the same, just line numbers are different: java.lang.Throwable: at org.eclipse.swt.browser.WebKit.getStackTrace(WebKit.java:489) at org.eclipse.swt.browser.WebKit.getInternalErrorMsg(WebKit.java:482) at org.eclipse.swt.browser.WebKit.access$200(WebKit.java:124) at org.eclipse.swt.browser.WebKit$Webkit2Extension.initializeWebExtensions_callback(WebKit.java:594) at org.eclipse.swt.internal.webkit.WebKitGTK._webkit_web_view_new(Native Method) at org.eclipse.swt.internal.webkit.WebKitGTK.webkit_web_view_new(WebKitGTK.java:1928) at org.eclipse.swt.browser.WebKit.create(WebKit.java:1142) at org.eclipse.swt.browser.Browser.<init>(Browser.java:102) at org.eclipse.swt.examples.controlexample.BrowserTab.createExampleWidgets(BrowserTab.java:98) at org.eclipse.swt.examples.controlexample.Tab.createTabFolderPage(Tab.java:1264) at org.eclipse.swt.examples.controlexample.BrowserTab.createTabFolderPage(BrowserTab.java:179) at org.eclipse.swt.examples.controlexample.ControlExample.<init>(ControlExample.java:71) at org.eclipse.swt.examples.controlexample.ControlExample.main(ControlExample.java:225)
Forgot about JDK: Exactly the same under OpenJDK Runtime Environment (build 11.0.2+7) and OpenJDK Runtime Environment (build 1.8.0_202-b26).
(In reply to Arseniy Skvortsov from comment #2) > Wanted to look how does SWT perform under GNOME 3.30 with fractional scaling. > For this I've downloaded swt-4.10-gtk-linux-x86_64.zip and > org.eclipse.sdk.examples.source-4.10.zip, unpacked these and launched > java -classpath > swt.jar:plugins/org.eclipse.swt.examples_3.106.300.v20181018-1329.jar > org.eclipse.swt.examples.controlexample.ControlExample > > Looks very nice (except for double-wide square border in canvas example), > but it just asked me to fill a bug like this one. :) > > My environment: > Arch Linux > gnome-shell 3.30.2 > gtk3 3.24.5 > webkit2gtk 2.22.5 > > > (swt version: 4922r32) SWT Glue code version: 54.0 info: > +BrowserFunction/GDBus, +WebkitExtension Folder versioning, +WebKitExtension > OSGI support, +setUrl(..postData..), -setCookie(), -getCookie > +mouseDown/Focus > > Stacktrace is almost the same, just line numbers are different: > java.lang.Throwable: > at org.eclipse.swt.browser.WebKit.getStackTrace(WebKit.java:489) > at org.eclipse.swt.browser.WebKit.getInternalErrorMsg(WebKit.java:482) > at org.eclipse.swt.browser.WebKit.access$200(WebKit.java:124) > at > org.eclipse.swt.browser.WebKit$Webkit2Extension. > initializeWebExtensions_callback(WebKit.java:594) > at org.eclipse.swt.internal.webkit.WebKitGTK._webkit_web_view_new(Native > Method) > at > org.eclipse.swt.internal.webkit.WebKitGTK.webkit_web_view_new(WebKitGTK.java: > 1928) > at org.eclipse.swt.browser.WebKit.create(WebKit.java:1142) > at org.eclipse.swt.browser.Browser.<init>(Browser.java:102) > at > org.eclipse.swt.examples.controlexample.BrowserTab. > createExampleWidgets(BrowserTab.java:98) > at > org.eclipse.swt.examples.controlexample.Tab.createTabFolderPage(Tab.java: > 1264) > at > org.eclipse.swt.examples.controlexample.BrowserTab. > createTabFolderPage(BrowserTab.java:179) > at > org.eclipse.swt.examples.controlexample.ControlExample.<init>(ControlExample. > java:71) > at > org.eclipse.swt.examples.controlexample.ControlExample.main(ControlExample. > java:225) Hmm this would indicate that WebKit2 isn't loading properly, likely because it can't the extension library. How are you running ControlExample in this case? Do you have the SWT binaries set up and linked properly?
I've downloaded swt-4.10-gtk-linux-x86_64.zip and org.eclipse.sdk.examples.source-4.10.zip, unpacked these and launched java -classpath swt.jar:plugins/org.eclipse.swt.examples_3.106.300.v20181018-1329.jar org.eclipse.swt.examples.controlexample.ControlExample No specific environment variables. I've unpacked native libraries from swt.jar and checked them with ldd. All references are resolved except for libjawt.so. Strange thing is that no library doesn't want libwebkit2gtk.
(In reply to Arseniy Skvortsov from comment #5) > I've downloaded swt-4.10-gtk-linux-x86_64.zip and > org.eclipse.sdk.examples.source-4.10.zip, unpacked these and launched > > java -classpath > swt.jar:plugins/org.eclipse.swt.examples_3.106.300.v20181018-1329.jar > org.eclipse.swt.examples.controlexample.ControlExample > > No specific environment variables. > > I've unpacked native libraries from swt.jar and checked them with ldd. All > references are resolved except for libjawt.so. > > Strange thing is that no library doesn't want libwebkit2gtk. Does it show the extension library? The name should be libswt-webkit2extension-gtk-4*.so.
No, this library is not present in the swt.jar I've downloaded.
New Gerrit change created: https://git.eclipse.org/r/142833
Gerrit change https://git.eclipse.org/r/142833 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=8e642d710e087732cc0ec77807334c2e46afa004
Thanks for fixing it Nikita!