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 162228

Summary: javax.swing.text.BadLocationException: Invalid offset=-1 not within <0, 56>
Product: editor Reporter: Exceptions Reporter <exceptions_reporter>
Component: CSL (API & infrastructure)Assignee: David Strupl <dstrupl>
Status: RESOLVED FIXED    
Severity: blocker Keywords: SIMPLEFIX
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=145200
Issue Type: DEFECT Exception Reporter: 145200
Attachments: stacktrace

Description Exceptions Reporter 2009-04-08 15:11:26 UTC
Build: NetBeans IDE Dev (Build 200904011705)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Windows XP, 5.1, x86

User Comments:
tapn2it: starting up net beans

GUEST: running rcov with a functional test that contains shoulda usage... I'm converting tests to use shoulda from straight unit/functional tests... or at least I think I am :-)

speijnik: I was saving a Python file.

GUEST: Just using code coverage feature: Running tests and opening ruby-file. (Not running JRuby)

tapn2it: opening file from projects view



Stacktrace: 
javax.swing.text.BadLocationException: Invalid offset=-1 not within <0, 56>
        at org.netbeans.editor.Utilities.checkOffsetValid(Utilities.java:1356)
        at org.netbeans.editor.Utilities.checkOffsetValid(Utilities.java:1351)
        at org.netbeans.editor.Utilities.getRowFirstNonWhite(Utilities.java:181)
        at org.netbeans.modules.gsf.codecoverage.CoverageHighlightsContainer$Highlights.<init>(CoverageHighlightsContainer.java:299)
        at org.netbeans.modules.gsf.codecoverage.CoverageHighlightsContainer$Highlights.<init>(CoverageHighlightsContainer.java:269)
        at org.netbeans.modules.gsf.codecoverage.CoverageHighlightsContainer.getHighlights(CoverageHighlightsContainer.java:135)
Comment 1 Exceptions Reporter 2009-04-08 15:11:36 UTC
Created attachment 79743 [details]
stacktrace
Comment 2 Vitezslav Stejskal 2009-04-20 20:27:05 UTC
CoverageHighlightsContainer.java:299 should check for invalid line numbers.
Comment 3 David Strupl 2009-04-27 16:21:45 UTC
Fixed in jet-main by changeset:   128934:b6a9ff75229e