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 - Nashorn debugger shows wrong line
Summary: Nashorn debugger shows wrong line
Status: NEW
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 7.4
Hardware: PC Linux
: P4 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-17 12:57 UTC by Jaroslav Tulach
Modified: 2014-05-15 12:34 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.