This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 240208

Summary: netscape.javascript.JSException: JavaScript execution terminated.
Product: platform Reporter: Vladimir Riha <vriha>
Component: Embedded BrowserAssignee: Stanislav Aubrecht <saubrecht>
Severity: normal CC: anebuzelsky, jstola, mmirilovic, saubrecht, vriha
Priority: P1 Keywords: JDK_8
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 206450
Attachments: stacktrace

Description Vladimir Riha 2014-01-10 11:06:58 UTC
Build: NetBeans IDE 8.0 Beta (Build 201401100215)
VM: Java HotSpot(TM) Client VM, 25.0-b65, Java(TM) SE Runtime Environment, 1.8.0-ea-b122
OS: Linux

User Comments:
vriha: Adding a new Watch for expression while debugging HTML5 project in embdedded browser

netscape.javascript.JSException: JavaScript execution terminated.
   at com.sun.webkit.dom.JSObject.fwkMakeException(
   at com.sun.webkit.WebPage.twkExecuteScript(
   at com.sun.webkit.WebPage.executeScript(
   at javafx.scene.web.WebEngine.executeScript(
   at org.netbeans.core.browser.webview.ext.WebBrowserImpl$2.handle(
   at org.netbeans.core.browser.webview.ext.WebBrowserImpl$2.handle(
Comment 1 Vladimir Riha 2014-01-10 11:07:00 UTC
Created attachment 143786 [details]
Comment 2 Stanislav Aubrecht 2014-01-10 11:14:42 UTC
There's some JavaScript hack related to issue #217410. Honzo, please evaluate, thanks.
Comment 3 Vladimir Riha 2014-01-10 11:23:16 UTC
Seems like it could be reproduced with following steps:
 - download
 - run it in embedded browser
 - add JavaScript event breakpoint to Clipboard-Copy and 2 line breakpoints: debug_events.js:224 and debug_events.js:226
 - in embedded browser, scroll the page down, there is an input field that says "Copy this text to clipboard" so click on it and press Ctrl+C
 - press Continue F5 so debugguer stops on line 226
 - move cursor out of embedded browser window
Comment 4 Vladimir Riha 2014-01-10 11:30:49 UTC
Happens a bit often, P2
Comment 5 Vladimir Riha 2014-01-10 12:01:44 UTC
I think this is a beta stopper, it happens very often and would cause a lot of duplicate reports. 

General steps are to reproduce:
 - add breakpoint in JS file so debugger will stop there on project run
 - run project in embedded browser
 - once debugger stops on breakpoint, move cursor over embedded browser window, then over editor window with JS file (and hover over some variable to see its value in tooltip), move cursor back over the embedded browser window and now move it outside of embedded browser window, to e.g. Browser DOM or editor window.
Comment 6 Jan Stola 2014-01-10 16:39:32 UTC
The code that throws the exception attempts to work around a bug in JavaFX. It attempts to deliver a missing mouse out event. The event is triggered by a simple script. Unfortunately, there seems to be some problem with execution of the script in the mentioned context. There is probably no clean way to recognize this situation. Hence, I see no other fix for this issue besides catching of the exception.
Comment 7 Vladimir Riha 2014-01-10 18:42:51 UTC
It seems to happen only when debugger stops on breakpoint when running  project in embedded browser on JDK8. Web inspection (selecting element, changing css) seems to work ok (or at least I cannot reproduce it)

Considering that, issue 236055 and fact that JDK8 won't be released in time of Beta (penetration among users probably won't be high). This might not be stopper for Beta.
Comment 8 Stanislav Aubrecht 2014-01-13 09:43:17 UTC
core-main 371614085ba3
Comment 9 Stanislav Aubrecht 2014-01-13 09:46:21 UTC
transplanted to release80_beta branch as 931bd5486f85
Comment 10 Vladimir Riha 2014-01-15 11:24:34 UTC
Verified in Beta, thank you

Product Version: NetBeans IDE 8.0 Beta (Build 201401141042)
Java: 1.8.0-ea; Java HotSpot(TM) Client VM 25.0-b65
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b122
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)