Community
Participate
Working Groups
Created attachment 269131 [details] Testcase which reproduce the behavior Hello, We are starting use Nebula Rich Text component for our engineering tools in order to put descriptions. Under Linux, at the opening of the Rich text widget, there are logged exception (see the end f this description) This exception disappoints our users. After debugging, it is the javascript function initEditor() which is called from Browser progress listener in completed(...) method. In the fact, when Webkit ends loading Nebula HTML template, it execute the initEditor() without any problems. But, when it's load the underlaying editor (CKEditor), which contains frames (I thinks so) following this line in the stack [at org.eclipse.swt.browser.WebKit.webFrameProc(WebKit.java:506)], and when it's end it recall the completed method of the attached progress listener. The frame I think it doesn't defined the method to initialize the editor. Here the following information of the Eclipse Platform and Java we use: eclipse.buildId=4.6.3.M20170301-0400 java.version=1.8.0_121 java.vendor=Oracle Corporation BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US In the attachement, I do a simple example as Eclipse View to use the Nebula richtext. To use it: 1. Import the plugin in the workspace 2. Launch a Runtime instance 3. Go to window Menu -> Show View -> Others... -> RichText -> NebulaRichTextView Here the stack we got when doing the previous steps: org.eclipse.swt.SWTException: undefined at org.eclipse.swt.browser.WebBrowser$EvaluateFunction.function(WebBrowser.java:192) at org.eclipse.swt.browser.WebKit.callJava(WebKit.java:2350) at org.eclipse.swt.browser.WebKit.JSObjectCallAsFunctionProc(WebKit.java:283) at org.eclipse.swt.internal.webkit.WebKitGTK._JSEvaluateScript(Native Method) at org.eclipse.swt.internal.webkit.WebKitGTK.JSEvaluateScript(WebKitGTK.java:144) at org.eclipse.swt.browser.WebKit.execute(WebKit.java:956) at org.eclipse.swt.browser.WebBrowser.evaluate(WebBrowser.java:436) at org.eclipse.swt.browser.WebBrowser.evaluate(WebBrowser.java:395) at org.eclipse.swt.browser.Browser.evaluate(Browser.java:663) at org.eclipse.swt.browser.Browser.evaluate(Browser.java:610) at org.eclipse.nebula.widgets.richtext.RichTextEditor$3.completed(RichTextEditor.java:297) at org.eclipse.swt.browser.WebKit.fireProgressCompletedEvent(WebKit.java:1453) at org.eclipse.swt.browser.WebKit.handleLoadFinished(WebKit.java:1517) at org.eclipse.swt.browser.WebKit.webframe_notify_load_status(WebKit.java:1794) at org.eclipse.swt.browser.WebKit.webFrameProc(WebKit.java:506) at org.eclipse.swt.browser.WebKit.Proc(WebKit.java:403) 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:2495) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4149) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) at com.thalesgroup.mde.mdk.product.Application.start(Application.java:120) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) at org.eclipse.equinox.launcher.Main.run(Main.java:1519) at org.eclipse.equinox.launcher.Main.main(Main.java:1492) Thank you
Is it only that you see exceptions in the log or does the RichTextEditor also not open?
The editor is opened after this exception was logged on the error log.
So everything is working as expected. There is only an annoying exception stack in the console. Is that correct?
Yes, it is correct.
Then it is not a major defect. We need to investigate why the initEditor() callback is throwing an error although everything works as expected. Maybe an issue in SWT Browser on GTK.
Ok. let me informed please about the result of investigation. Thank you.
Does not happen on Windows. Looks similar to Bug 491322, therefore I assign it to the SWT team. There is nothing I could do as far as I can see.
Yes, it's look like to the issue. Thank you for your investigation
(In reply to Faycal Abka from comment #0) > Created attachment 269131 [details] > Testcase which reproduce the behavior > > Hello, > > We are starting use Nebula Rich Text component for our engineering tools in > org.eclipse.swt.internal.webkit.WebKitGTK.JSEvaluateScript(WebKitGTK.java: > 144) > at org.eclipse.swt.browser.WebKit.execute(WebKit.java:956) > at org.eclipse.swt.browser.WebBrowser.evaluate(WebBrowser.java:436) > at org.eclipse.swt.browser.WebBrowser.evaluate(WebBrowser.java:395) Thank you for bug submission. This issue is relevant to what I've been working on for the last year. Nebular builds the rich text editor on top of Browser. It injects some javascript and expects callbacks to come from javascript to call events. The callstack above indicates that the code ran against Webkit1. Webkit1 is in the process of being replaced with Webkit2: Bug 516838 – [GTK3][webkit] Port SWT Browser to webkit2gtk (4.8) Would it be possible for you to try out Webkit2? 1) Download newest Eclipse (for webkit2 patches) (See below) 2) Run eclipse via: export SWT_WEBKIT2=1 eclipse Or set env var: SWT_WEBKIT 1 3) Observe what happens. Take notes. 4) In this bug, post observations. I think most of Nebula's Rich Text editor might work, but I think there may be a few corner cases where we have breakage, because there is one more thing that webkit2 port still lacks: Bug 510905 – [GTK3][Webkit2] Implement webkit2 support for browser function (Part 2: Java return a value from callback.) If you come across breakage, then I could make a note of it and verify that things work once I've made more progress on Webkit2. To download recent nightly/integration builds, please go here: http://download.eclipse.org/eclipse/downloads/ - Scroll down to "4.x Integration Builds". - Click on the most recent stable build like "I201XXXXX...", - Find your platform in the "Eclipse SDK". Download the archive, extract it and run the 'eclipse' binary.
(In reply to Leo Ufimtsev from comment #9) Hi Leo, is there any hint to see if webkit2 is active. I have added this: -vmargs -DSWT_WEBKIT2=1
(In reply to Wim Jongman from comment #10) > (In reply to Leo Ufimtsev from comment #9) > > Hi Leo, is there any hint to see if webkit2 is active. I have added this: > > -vmargs -DSWT_WEBKIT2=1 Hmmm. I think I should add an SWT environmental variable that prints versions of it's internal libs. I've made a note to add them in the future: Bug 519124 – Add SWT variables to print versions of underlying libraries For the time being: String webkitGtkVersionStr = System.getProperty("org.eclipse.swt.internal.webkitgtk.version"); //$NON-NLS-1$ Note, webkitgtk 2.0 does not mean webkit2. Webkitgtk 2.5 and onwards uses webkit2. Webkit2.4 and below use webkit1.
(In reply to Leo Ufimtsev from comment #11) > String webkitGtkVersionStr = > System.getProperty("org.eclipse.swt.internal.webkitgtk.version"); > //$NON-NLS-1$ Btw, the above has to be called after SWT/ (Browser) was initialized.
(In reply to Leo Ufimtsev from comment #12) > Btw, the above has to be called after SWT/ (Browser) was initialized. If you have trouble, let me know and I'll work on adding the SWT_LIB_VERSIONS sooner, and you could test with newest builds next day.
(In reply to Leo Ufimtsev from comment #13) > (In reply to Leo Ufimtsev from comment #12) > > Btw, the above has to be called after SWT/ (Browser) was initialized. > > If you have trouble, let me know and I'll work on adding the > SWT_LIB_VERSIONS sooner, and you could test with newest builds next day. I can't see that environment variable. I am running the latest Oxygen is this a correct runtime?
Created attachment 269175 [details] Test in Oxygen
(In reply to Wim Jongman from comment #14) > (In reply to Leo Ufimtsev from comment #13) > > (In reply to Leo Ufimtsev from comment #12) > > > Btw, the above has to be called after SWT/ (Browser) was initialized. > > > > If you have trouble, let me know and I'll work on adding the > > SWT_LIB_VERSIONS sooner, and you could test with newest builds next day. > > I can't see that environment variable. I am running the latest Oxygen is > this a correct runtime? Hmmm, not sure. It should be showing up. Plan B: To move forward, I've submitted a patch that would print lib versions if SWT_LIB_VERSIONS=1 is specified. I'm awaiting for the patch to be merged into master: Bug 519124 – Add SWT variable to print versions of underlying libraries (I expect tomorrow/day after). Once merged and new eclipse nightly is build, I will post a comment here for you to test with new env var. Please wait.
I am using Windows 10, does that make a difference? Is the webkit only used in Linux?
(In reply to Leo Ufimtsev from comment #9) > (In reply to Faycal Abka from comment #0) > > Created attachment 269131 [details] > > Testcase which reproduce the behavior > > > > Hello, > > > > We are starting use Nebula Rich Text component for our engineering tools in > > > org.eclipse.swt.internal.webkit.WebKitGTK.JSEvaluateScript(WebKitGTK.java: > > 144) > > at org.eclipse.swt.browser.WebKit.execute(WebKit.java:956) > > at org.eclipse.swt.browser.WebBrowser.evaluate(WebBrowser.java:436) > > at org.eclipse.swt.browser.WebBrowser.evaluate(WebBrowser.java:395) > > Thank you for bug submission. This issue is relevant to what I've been > working on for the last year. > > Nebular builds the rich text editor on top of Browser. It injects some > javascript and expects callbacks to come from javascript to call events. > > The callstack above indicates that the code ran against Webkit1. Webkit1 is > in the process of being replaced with Webkit2: > Bug 516838 – [GTK3][webkit] Port SWT Browser to webkit2gtk (4.8) > > Would it be possible for you to try out Webkit2? > 1) Download newest Eclipse (for webkit2 patches) (See below) > 2) Run eclipse via: > export SWT_WEBKIT2=1 > eclipse > Or set env var: > SWT_WEBKIT 1 > 3) Observe what happens. Take notes. > 4) In this bug, post observations. > > I think most of Nebula's Rich Text editor might work, but I think there may > be a few corner cases where we have breakage, because there is one more > thing that webkit2 port still lacks: > Bug 510905 – [GTK3][Webkit2] Implement webkit2 support for browser function > (Part 2: Java return a value from callback.) > > If you come across breakage, then I could make a note of it and verify that > things work once I've made more progress on Webkit2. > > To download recent nightly/integration builds, please go here: > http://download.eclipse.org/eclipse/downloads/ > - Scroll down to "4.x Integration Builds". > - Click on the most recent stable build like "I201XXXXX...", > - Find your platform in the "Eclipse SDK". Download the archive, extract it > and run the 'eclipse' binary. Hello, Sorry for my late answer. I followed your instruction to test with last released. I downloaded the last eclipse SDK (I20170704-2000) for Linux 64bits. I have setted the variable SWT_WEBKIT2 to 1 I used the example which I attached to this bugzilla Nebula rich text doesn't works and ends with this error: org.eclipse.swt.SWTError: No more handles at org.eclipse.swt.SWT.error(SWT.java:4563) at org.eclipse.swt.SWT.error(SWT.java:4452) at org.eclipse.swt.SWT.error(SWT.java:4423) at org.eclipse.swt.browser.Browser.<init>(Browser.java:103) at org.eclipse.nebula.widgets.richtext.RichTextEditor.<init>(RichTextEditor.java:239) at org.eclipse.nebula.widgets.richtext.RichTextEditor.<init>(RichTextEditor.java:138) at testcase.nebula.richtext.views.NebulaRichTextView.createPartControl(NebulaRichTextView.java:22) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:151) at org.eclipse.ui.internal.e4.compatibility.CompatibilityView.createPartControl(CompatibilityView.java:147) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:355) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:990) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:955) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:124) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:399) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:318) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:105) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:74) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:56) at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:992) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:661) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$1.run(PartRenderingEngine.java:546) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:530) at org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer.createWidget(ElementReferenceRenderer.java:70) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:992) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:661) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:767) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:738) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:732) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:716) at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1293) at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.lambda$0(LazyStackRenderer.java:68) at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:144) at org.eclipse.swt.widgets.Display.syncExec(Display.java:5547) at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:212) at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:196) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:52) at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:173) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:620) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:584) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:768) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:742) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:680) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:675) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1178) at org.eclipse.ui.internal.WorkbenchPage.showPart(WorkbenchPage.java:1287) at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1278) at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.java:4329) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:4325) at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:4305) at org.eclipse.ui.handlers.ShowViewHandler.openView(ShowViewHandler.java:132) at org.eclipse.ui.handlers.ShowViewHandler.openOther(ShowViewHandler.java:110) at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHandler.java:77) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:291) at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:92) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:305) at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:239) at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132) at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487) at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210) at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:390) at org.eclipse.ui.internal.ShowViewMenu$1.run(ShowViewMenu.java:139) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565) at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5360) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1363) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4629) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4214) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) at org.eclipse.equinox.launcher.Main.run(Main.java:1499) at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
I investigated this business. The regression seems to have started after an overhaul in RichTextEditor in Nebula. Older versions of RichTextEditor work fine on Webkit1 and Webkit2. Potentially some javascript is executed, which is not supported by webkit. I've submitted a Nebula bug for investigation, which lists the commit after which RichTextEditor stopped working on linux: Bug 519333 – Regression after (Bug 498392 Create a more general configuration design) https://bugs.eclipse.org/bugs/show_bug.cgi?id=519333 For further investigation by SWT, the issue has to be narrowed down to a javascript snippet, which raises an exception that you believe should not be raised. (See template.html initEditor() function).
It's in progess :), thank you
After investigation, the javascript execption only occurs on Linux with Webkit1 and Webkit2. (see related bug). (and not on Win32/Cocoa). If someone can narrow things down to the specific javascript that's causing the issue, it would be helpful. Otherwise it might be a while before I can get to this bug.
Hi, I tryed to call initEditor() function in onload attribute of body tag in template.html, and removed the calling to this function in ProgressListener of richtext. The exception doesn't occur anymore. I don't know if there are impacts of the calling to this editor in this way rather than in SWT Listener! if there no impacts, it's possible to integrate it in Nebula RichText widget?
The call to initEditor function is done via swt listener to ensure the necessary swt initialization is done in advance. Need to test but I would assume that several functions might not work correctly when integrated
In M4 there is full js implementation based on webkit2 (run eclipse with SWT_WEBKIT2=1) and verify the issue is fixed.
Ping. If no interest in the bug I'll resolve it next time when triaging.
(In reply to Alexander Kurtakov from comment #25) > Ping. If no interest in the bug I'll resolve it next time when triaging. I have ran the RichText with -DSWT_WEBKIT2=1 and the editor seems to function normally. I don't see the initial exception anymore but there is another: 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%40eclipse.org&attach_text=&blocked=&bug_file_loc=http%3A%2F%2F&bug_severity=normal&bug_status=NEW&comment=&component=SWT&contenttypeentry=&contenttypemethod=autodetect&contenttypeselection=text%2Fplain&data=&defined_groups=1&dependson=&description=&flag_type-1=X&flag_type-11=X&flag_type-12=X&flag_type-13=X&flag_type-14=X&flag_type-15=X&flag_type-16=X&flag_type-2=X&flag_type-4=X&flag_type-6=X&flag_type-7=X&flag_type-8=X&form_name=enter_bug&keywords=&maketemplate=Remember%20values%20as%20bookmarkable%20template&op_sys=Linux&product=Platform&qa_contact=&rep_platform=PC&requestee_type-1=&requestee_type-2=&short_desc=[webkit2]BrowserProblem 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)
Would you please open new bug report with exact steps to reproduce it? Ideally an SWT only snippet.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=529870
Fixed via: https://git.eclipse.org/r/#/c/116384/ RichText editor up and running on SWT/Gtk now. Please use 4.8 M6 and Webkit2 & above for fix.