| Summary: | [webkit2]BrowserProblem | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Wim Jongman <wim.jongman> |
| Component: | SWT | Assignee: | Leo Ufimtsev <lufimtse> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | akurtakov, lufimtse |
| Version: | 4.8 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=518961 https://git.eclipse.org/r/#/c/116384/ |
||
| Whiteboard: | |||
I'll investigate. Looks like the issue is caused because RichTextEditor makes a javascript execution where the script is empty. I'll continue to investigate. Fixed via: https://git.eclipse.org/r/#/c/116384/ Thank you for bug report. (In reply to Leo Ufimtsev from comment #3) > Fixed via: > https://git.eclipse.org/r/#/c/116384/ > > Thank you for bug report. Thank you for fixing Leo. It is very much appreciated. |
Snippet: Make sure to have Nebula RichText widget installed: package testcase.nebula.richtext.views; import org.eclipse.nebula.widgets.richtext.RichTextEditor; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class RTTest extends org.eclipse.swt.widgets.Shell { public RTTest(Display display) { super(display, SWT.SHELL_TRIM); createContents(); } private void createContents() { new RichTextEditor(this); } public static void main(String[] args) { Display display = new Display(); Shell shell = new RTTest(display); shell.setSize(800, 800); shell.setLayout(new FillLayout()); shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } @Override protected void checkSubclass() { } } Problem: SWT call to Webkit timed out after 3000ms. No return value will be provided. Possible reasons: 1) Problem: Your javascript needs more than 3000ms to execute. Solution: Don't run such javascript, it blocks UI. Instead register a BrowserFunction and call the BrowserFunction upon completion2) Deadlock in swt/webkit2 logic. This is probably a bug in SWT. Please report this issue with steps to reproduce via: For bug report, please atatch this stack trace: java.lang.Throwable: at org.eclipse.swt.browser.WebKit$Webkit2AsyncToSync.execAsyncAndWaitForReturn(WebKit.java:1567) at org.eclipse.swt.browser.WebKit$Webkit2AsyncToSync.runjavascript(WebKit.java:1461) at org.eclipse.swt.browser.WebKit$Webkit2AsyncToSync.evaluate(WebKit.java:1412) at org.eclipse.swt.browser.WebKit.evaluate(WebKit.java:1597) at org.eclipse.swt.browser.WebBrowser.evaluate(WebBrowser.java:402) at org.eclipse.swt.browser.Browser.evaluate(Browser.java:664) at org.eclipse.swt.browser.Browser.evaluate(Browser.java:611) at org.eclipse.nebula.widgets.richtext.RichTextEditorConfiguration.customizeToolbar(RichTextEditorConfiguration.java:525) at org.eclipse.nebula.widgets.richtext.RichTextEditor$1.function(RichTextEditor.java:273) at org.eclipse.swt.browser.WebKit$Webkit2Extension.webkit2callJavaCallback(WebKit.java:451) at org.eclipse.swt.browser.WebkitGDBus.handleMethodCallback(WebkitGDBus.java:215) at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method) at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2133) at org.eclipse.swt.browser.WebKit$Webkit2AsyncToSync.execAsyncAndWaitForReturn(WebKit.java:1560) at org.eclipse.swt.browser.WebKit$Webkit2AsyncToSync.runjavascript(WebKit.java:1461) at org.eclipse.swt.browser.WebKit$Webkit2AsyncToSync.evaluate(WebKit.java:1412) at org.eclipse.swt.browser.WebKit.evaluate(WebKit.java:1597) at org.eclipse.swt.browser.WebBrowser.evaluate(WebBrowser.java:402) at org.eclipse.swt.browser.Browser.evaluate(Browser.java:664) at org.eclipse.swt.browser.Browser.evaluate(Browser.java:611) at org.eclipse.nebula.widgets.richtext.RichTextEditor$3.completed(RichTextEditor.java:297) at org.eclipse.swt.browser.WebKit.lambda$7(WebKit.java:2128) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4809) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4418) at testcase.nebula.richtext.views.RTTest.main(RTTest.java:29) SWT call to Webkit timed out after 3000ms. No return value will be provided. Possible reasons: 1) Problem: Your javascript needs more than 3000ms to execute. Solution: Don't run such javascript, it blocks UI. Instead register a BrowserFunction and call the BrowserFunction upon completion2) Deadlock in swt/webkit2 logic. This is probably a bug in SWT. Please report this issue with steps to reproduce via: https://bugs.eclipse.org/bugs/enter_bug.cgi?alias=&assigned_to=platform-swt-inbox%40ec