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 155880 - [70cat] IndexOutOfBoundsException: Invalid line index=409 >= lineCount=409
Summary: [70cat] IndexOutOfBoundsException: Invalid line index=409 >= lineCount=409
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milutin Kristofic
URL: http://statistics.netbeans.org/except...
Keywords:
: 155221 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-20 11:07 UTC by marco_bresciani
Modified: 2011-10-28 20:32 UTC (History)
17 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 16604


Attachments
stacktrace (1.31 KB, text/plain)
2008-12-20 11:07 UTC, marco_bresciani
Details
stacktrace (2.56 KB, text/plain)
2010-12-19 16:51 UTC, _ tboudreau
Details
stacktrace (3.93 KB, text/plain)
2011-02-17 07:30 UTC, schkovich
Details
stacktrace (2.21 KB, text/plain)
2011-02-23 19:33 UTC, Egor Ushakov
Details
stacktrace (3.31 KB, text/plain)
2011-07-21 09:47 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description marco_bresciani 2008-12-20 11:07:04 UTC
Build: NetBeans IDE 6.5 (Build 200811100001)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Windows Vista, 6.0, x86

User Comments:
marco_bresciani: NetBeans SQE, PMD

thulin: Runing the Quality plugin

marco_bresciani: NetBeans SQE, PMD



Stacktrace: 
java.lang.IndexOutOfBoundsException: Invalid line index=409 >= lineCount=409
        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:1362)
        at org.openide.text.NbDocument$DocumentRenderer.renderToInt(NbDocument.java:644)
        at org.openide.text.NbDocument.findLineOffset(NbDocument.java:176)
        at org.openide.text.DocumentLine$Set.offset(DocumentLine.java:1026)
Comment 1 marco_bresciani 2008-12-20 11:07:10 UTC
Created attachment 75209 [details]
stacktrace
Comment 2 Vitezslav Stejskal 2009-01-05 13:57:16 UTC
This looks like a problem in org.nbheaven.sqe.bridge.pmd.utils.RuleViolationAnnotationProcessor:85. Please file the
defect against the plugin. I'm sorry, but I'm not sure who and where maintains the plugin. Thanks
Comment 3 Vitezslav Stejskal 2009-01-05 15:11:12 UTC
*** Issue 155221 has been marked as a duplicate of this issue. ***
Comment 4 Michel Graciano 2010-11-17 13:38:50 UTC
Vita,
could you take a look at the report 439360 at http://statistics.netbeans.org/exceptions/detail.do?id=16604? To reproduce it I just need create a file with a CVS conflict, after a merge for example, and make a little change and save it just to change the status to Locally Modified and do a merge again and I will get something like that:

<<<<<<< file.sql
<<<<<<< file.sql
            SELECT * FROM XYZ;
=======
            SELECT * FROM XYZ
=======
            SELECT * FROM XYZ
>>>>>>> 1.497
                 WHERE 1 = 1 AND
<<<<<<< file.sql
                  DATE IS NULL;
>>>>>>> 1.497
=======
                  DATE IS NULL;
>>>>>>> 1.497

Now what you need to do is call Resolve Conflict action and the exception is thrown.

Product Version: NetBeans IDE Dev (Build 101116-94d64886daeb)
Java: 1.6.0_22; Java HotSpot(TM) Client VM 17.1-b03
System: Linux version 2.6.31-22-generic-pae running on i386; UTF-8; en_US (nb)
Comment 5 _ tboudreau 2010-12-19 16:51:07 UTC
Created attachment 104267 [details]
stacktrace

Clicked a line in maven test output
Comment 6 _ tboudreau 2010-12-19 18:20:11 UTC
Not actually an editor bug;  stack trace I just (inadvertently) attached is maven output handling related;  the other attached stack trace is in the PMD module.  In both cases, the editor is innocent, it was just passed a non-existent line number.

Probably DocumentLine.Set.offset() should throw this exception to avoid confusion.
Comment 7 Jesse Glick 2011-01-07 20:15:33 UTC
(In reply to comment #6)
> stack trace I just (inadvertently) attached is maven output handling related

Maybe fixed in core-main #ef0ca13c80cf.
Comment 8 Jesse Glick 2011-01-07 20:17:22 UTC
(In reply to comment #7)
>> stack trace I just (inadvertently) attached is maven output handling related
> 
> Maybe fixed in core-main #ef0ca13c80cf.

And see bug #193603 where this is reported separately with more info.
Comment 9 Quality Engineering 2011-01-09 06:22:26 UTC
Integrated into 'main-golden', will be available in build *201101090000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/ef0ca13c80cf
User: Jesse Glick <jglick@netbeans.org>
Log: #155880: attempted fix of IOOBE.
Comment 10 schkovich 2011-02-17 07:30:41 UTC
Created attachment 106095 [details]
stacktrace

Commiting to the svn repository
Comment 11 Egor Ushakov 2011-02-23 19:33:37 UTC
Created attachment 106377 [details]
stacktrace
Comment 12 Jan Lahoda 2011-07-21 09:47:04 UTC
Created attachment 109551 [details]
stacktrace
Comment 13 Milutin Kristofic 2011-10-10 12:37:13 UTC
I created separated bug reports for each component. It's problem on component sides.

http://netbeans.org/bugzilla/show_bug.cgi?id=203435
http://netbeans.org/bugzilla/show_bug.cgi?id=203427
http://netbeans.org/bugzilla/show_bug.cgi?id=203432
http://netbeans.org/bugzilla/show_bug.cgi?id=203436

other bugs are repaired by maven fix.
Comment 14 Jesse Glick 2011-10-28 20:32:04 UTC
(In reply to comment #13)
> http://netbeans.org/bugzilla/show_bug.cgi?id=203435

BTW it suffices to write just

  bug #203435

which will get hyperlinked automatically.