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 129958 - java.lang.IndexOutOfBoundsException: Invalid line index=40 >= lineCount=18
Summary: java.lang.IndexOutOfBoundsException: Invalid line index=40 >= lineCount=18
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Diff (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P2 blocker (vote)
Assignee: Tomas Stupka
URL: http://statistics.netbeans.org/analyt...
Keywords:
: 162223 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-12 20:51 UTC by Petr Dvorak
Modified: 2012-01-03 15:20 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 18054


Attachments
stacktrace (1.86 KB, text/plain)
2008-05-26 10:49 UTC, Dan Kolar
Details
stacktrace (1.86 KB, text/plain)
2009-06-10 14:36 UTC, Michel Graciano
Details
stacktrace (3.53 KB, text/plain)
2010-07-15 17:27 UTC, adam_myatt
Details
stacktrace (3.53 KB, text/plain)
2010-07-15 17:30 UTC, adam_myatt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Dvorak 2008-03-12 20:51:18 UTC
Build: NetBeans IDE 6.0 (Build 200711261600)
VM: Java HotSpot(TM) Client VM, 1.5.0_06-b05
OS: Windows 2000, 5.0, x86

User comments: I was trying resolve conflicts after I used "merge from branch..." 

STACKTRACE: (first 10 lines)
java.lang.IndexOutOfBoundsException: Invalid line index=1919 >= lineCount=1175
        at org.netbeans.editor.LineRootElement.getElement(LineRootElement.java:114)
        at org.openide.text.NbDocument$DocumentRenderer.run(NbDocument.java:669)
        at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1206)
        at org.openide.text.NbDocument$DocumentRenderer.renderToInt(NbDocument.java:644)
        at org.openide.text.NbDocument.findLineOffset(NbDocument.java:176)
        at org.netbeans.modules.merge.builtin.visualizer.MergePanel.copy(MergePanel.java:1113)
        at org.netbeans.modules.merge.builtin.visualizer.MergePanel.copySource1ToResult(MergePanel.java:1088)
        at org.netbeans.modules.merge.builtin.visualizer.MergeControl.copyToResult(MergeControl.java:239)
        at org.netbeans.modules.merge.builtin.visualizer.MergeControl.initialize(MergeControl.java:131)
        at org.netbeans.modules.merge.builtin.visualizer.GraphicalMergeVisualizer.createView(GraphicalMergeVisualizer.java:130)
Comment 1 Vitezslav Stejskal 2008-03-13 10:04:03 UTC
Most likely a wrong line number passed from the MergePanel.
Comment 2 Petr Dvorak 2008-03-13 10:24:58 UTC
I will just add here the same comment that I wrote in the statistics page here (just in case - the original comment
displayed in the first description seems to be from a very old build of netbeans, see statistics).

I got this exception when I tried to resolve a conflict in SVN right after I tried to revert modifications (over
multiple selected revisions) in Search History.
Comment 3 Petr Dvorak 2008-03-13 10:26:10 UTC
I have also updated Summary and URL to statistics page.
Comment 4 Max Sauer 2008-03-13 10:38:19 UTC
This could be a duplicate of http://www.netbeans.org/issues/show_bug.cgi?id=65970.
Comment 5 Maros Sandor 2008-03-17 13:56:40 UTC
Please attach those 3 files (Base, Locally Modified, Remotely Modified) that are to be merged so that we can reproduce
it here. We are unable to reproduce it on arbitrary files.
Comment 6 Exceptions Reporter 2008-03-19 19:23:07 UTC
This issue has already 10 duplicates 
Comment 7 Dan Kolar 2008-05-26 10:49:09 UTC
Created attachment 61902 [details]
stacktrace
Comment 8 Ondrej Vrabec 2009-04-20 14:32:15 UTC
*** Issue 162223 has been marked as a duplicate of this issue. ***
Comment 9 Michel Graciano 2009-06-10 14:36:50 UTC
Build: NetBeans IDE 6.7 RC2 (Build 200906042131)
VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Linux, 2.6.27-14-generic, i386

User Comments: 


Stacktrace: 
java.lang.IndexOutOfBoundsException: Invalid line index=2574 >= lineCount=2574
        at org.netbeans.editor.LineRootElement.getElement(LineRootElement.java:112)
        at org.openide.text.NbDocument$DocumentRenderer.run(NbDocument.java:669)
        at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1371)
        at org.openide.text.NbDocument$DocumentRenderer.renderToInt(NbDocument.java:644)
        at org.openide.text.NbDocument.findLineOffset(NbDocument.java:176)
        at org.netbeans.modules.merge.builtin.visualizer.MergePanel.copy(MergePanel.java:1114)
Comment 10 Michel Graciano 2009-06-10 14:36:54 UTC
Created attachment 83406 [details]
stacktrace
Comment 11 Ondrej Vrabec 2009-06-10 14:43:03 UTC
hmichel: Please attach those 3 files (Base, Locally Modified, Remotely Modified) that are to be merged so that we can
reproduce
it here. We are unable to reproduce it on arbitrary files.
Comment 12 adam_myatt 2010-07-15 17:27:31 UTC
Created attachment 100860 [details]
stacktrace

using CVS Merge Conflicts Resolver. clicked the Accept and Next button.
Comment 13 adam_myatt 2010-07-15 17:30:31 UTC
Created attachment 100861 [details]
stacktrace
Comment 14 Marian Mirilovic 2011-12-02 10:05:30 UTC
100 reports so far, at least P2
Comment 15 Tomas Stupka 2012-01-03 15:20:07 UTC
(In reply to comment #14)
> 100 reports so far, at least P2
since 6.8 (091204) we had only two reports - one in 6.9.1 (101108) and one in 7.0 (110408). No report from 7.1. Problem probably already fixed.