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 242005

Summary: Nashorn debugger shows wrong line
Product: debugger Reporter: Jaroslav Tulach <jtulach>
Component: JavaAssignee: Martin Entlicher <mentlicher>
Status: NEW ---    
Severity: normal    
Priority: P4    
Version: 7.4   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Jaroslav Tulach 2014-02-17 12:57:22 UTC
I am debugging very large file of JavaScript (>1MB) and the line numbers are wrong (line 19714). It turned out that the stacktrace actually contains the right line, but for some reason it is not used:

"main"
jdk.nashorn.internal.scripts.Script$\^eval\_$153.VM$_L1$org_apidesign_vm4brwsr_StaticMethod$_L85248(<eval>:19714)
java.lang.invoke.LambdaForm$DMH.31094415.invokeStatic_LL_L(LambdaForm$DMH)
java.lang.invoke.LambdaForm$MH.8019208.invokeExact_MT(LambdaForm$MH)
jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:498)
jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:207)
jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:378)
jdk.nashorn.api.scripting.ScriptObjectMirror.callMember(ScriptObjectMirror.java:179)
jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:506)
jdk.nashorn.api.scripting.NashornScriptEngine.invokeMethod(NashornScriptEngine.java:237)
org.apidesign.vm4brwsr.TestVM.execCode(TestVM.java:62)

The right line number in my case is 85248
Comment 1 Jaroslav Tulach 2014-02-17 12:59:30 UTC
The project to reproduce the misbehavior on is:

$ hg clone -r 5538c1eb03be http://source.apidesign.org/hg/bck2brwsr

debug StaticMethodTest.assertExec and make it step into JavaScript.
Comment 2 Jaroslav Tulach 2014-05-15 12:34:48 UTC
Only happens if the file is larger than 65636 lines. I fixed my problems by generating shorter files. Making P4, but this is a bug of nashorn, not NetBeans support I guess.