Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 179360 - evaluate code text grows after single step
evaluate code text grows after single step
Status: VERIFIED FIXED
Product: debugger
Classification: Unclassified
Component: Java
6.x
PC Windows XP
: P3 (vote)
: 6.x
Assigned To: Martin Entlicher
issues@debugger
68patch1-verified
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-10 21:59 UTC by err
Modified: 2010-01-28 03:35 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description err 2010-01-10 21:59:10 UTC
The Evaluate Code window is docked and contains some text. After most debugger step commands, the text in the evaluate window doubles. For example, if the window contains a single line followed by a <RETURN>
======================
xxxxx

======================

after the next step there is

======================
xxxxx
xxxxx

======================

After another there would be 4 lines. It does not always happen, often.
Comment 1 Martin Entlicher 2010-01-12 03:58:00 UTC
I've reproduced this when I changed the current stack frame.
Comment 2 Martin Entlicher 2010-01-12 04:00:10 UTC
When this happens, also en exception appears in messages.log file:
INFO: Invalid line index=-2 < 0
java.lang.IndexOutOfBoundsException: Invalid line index=-2 < 0
        at org.netbeans.editor.LineRootElement.getElement(LineRootElement.java:108)
        at org.openide.text.NbDocument$DocumentRenderer.run(NbDocument.java:696)
        at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1371)
        at org.openide.text.NbDocument$DocumentRenderer.renderToInt(NbDocument.java:671)
        at org.openide.text.NbDocument.findLineOffset(NbDocument.java:176)
        at org.netbeans.modules.debugger.jpda.ui.WatchPanel.setupContext(WatchPanel.java:223)
        at org.netbeans.modules.debugger.jpda.ui.WatchPanel.setupContext(WatchPanel.java:137)
        at org.netbeans.modules.debugger.jpda.ui.CodeEvaluator.setupContextLazily(CodeEvaluator.java:254)
        at org.netbeans.modules.debugger.jpda.ui.CodeEvaluator.access$400(CodeEvaluator.java:102)
[catch] at org.netbeans.modules.debugger.jpda.ui.CodeEvaluator$2.run(CodeEvaluator.java:233)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1084)

This seems to be related.
Comment 3 Martin Entlicher 2010-01-12 07:04:53 UTC
Both problems are fixed in changeset:   156730:2ccc50c3ed3c and changeset:   156731:1d2820bb2138.
http://hg.netbeans.org/main/rev/2ccc50c3ed3c
http://hg.netbeans.org/main/rev/1d2820bb2138
Comment 4 err 2010-01-12 08:57:40 UTC
Can this be a candidate for 6.8.1 patch?
Comment 5 Quality Engineering 2010-01-13 12:27:50 UTC
Integrated into 'main-golden', will be available in build *201001131418* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/2ccc50c3ed3c
User: mentlicher@netbeans.org
Log: #179360 - Prevent from IndexOutOfBoundsException.
Comment 6 Martin Entlicher 2010-01-14 08:09:00 UTC
O.K. I've made this a candidate for 6.8 patch.
err, can you please verify that the behavior is correct in dev build #201001131418 or newer? Thanks.
Comment 7 err 2010-01-15 14:47:47 UTC
With fix, can not reproduce. Thanks. BTW, I never did see the exception, must be caught?
Comment 8 pgebauer 2010-01-18 05:35:24 UTC
The fix has been ported into the release68_fixes repository.
http://hg.netbeans.org/release68_fixes/rev/fe9b2832576f


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo