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 258573

Summary: javax.swing.text.BadLocationException: Invalid offset=373 not within <0, 372>
Product: editor Reporter: petrk
Component: Painting & PrintingAssignee: Miloslav Metelka <mmetelka>
Status: NEW ---    
Severity: normal CC: ajkh35, aldobrucale, alied, BartK, brettryan, Cheikh, EduardKarelEtc, emiddio, felipbou, FiruzzZ, gacatocho, ggghhhjjj, hkn, ilia, ilyavenner, jul001, kaenganxt, kamilchojnacki, Kickstart, legitalk, lolo_101, lzgrillo, m1k0, mariolars, mentlicher, mgoe, mgukov, mkhramov, mps77, mtbadi39, muddyweb, muellermi, Musaed, M_C_02, petrk, pkevin, pmaselkowski, ralphbenjamin, rudyment, scanti, small97123, soldatov, stjepo, teras, terminatorul, tmysik, vicricker, Vitex, vkvashin, yardus, zarasvand, zmirc
Priority: P1    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 223240
Attachments: stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
IDE log
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace

Description petrk 2016-03-29 13:26:49 UTC
This bug was originally marked as duplicate of bug 159680, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 20160226-0a11c5776e4d)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.72-b15, Java(TM) SE Runtime Environment, 1.8.0_72-b15
OS: Linux

User Comments:
petrk: Selected text in diff view




Stacktrace: 
javax.swing.text.BadLocationException: Invalid offset=373 not within <0, 372>
   at org.netbeans.modules.editor.lib2.DocUtils.checkOffsetValid(DocUtils.java:239)
   at org.netbeans.modules.editor.lib2.DocUtils.checkOffsetValid(DocUtils.java:234)
   at org.netbeans.modules.editor.lib2.DocUtils.getRowStart(DocUtils.java:70)
   at org.netbeans.modules.editor.lib2.highlighting.CaretBasedBlockHighlighting$CaretRowHighlighting.getCurrentBlockPositions(CaretBasedBlockHighlighting.java:303)
   at org.netbeans.modules.editor.lib2.highlighting.CaretBasedBlockHighlighting.updateLineInfo(CaretBasedBlockHighlighting.java:216)
   at org.netbeans.modules.editor.lib2.highlighting.CaretBasedBlockHighlighting.stateChanged(CaretBasedBlockHighlighting.java:204)
Comment 1 petrk 2016-03-29 13:26:51 UTC
Created attachment 159033 [details]
stacktrace
Comment 2 Maksim Khramov 2016-04-14 10:41:54 UTC
Created attachment 159264 [details]
stacktrace

Try to select copy and paste text from Output panel to newly created SQL file
Comment 3 Exceptions Reporter 2016-05-17 07:39:32 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=223240
Comment 4 Exceptions Reporter 2016-05-29 11:45:55 UTC
Created attachment 159909 [details]
stacktrace

I couldn't identify the reason
Comment 5 Martin Entlicher 2016-07-12 11:51:51 UTC
Created attachment 160355 [details]
stacktrace

Pasting code into editor.
Comment 6 brettryan 2016-08-01 07:13:20 UTC
Created attachment 161507 [details]
stacktrace

Trying to copy statement for insert data.
Comment 7 alied 2016-09-23 14:13:03 UTC
Created attachment 162188 [details]
stacktrace

Just created a new .properties file
Comment 8 aldobrucale 2016-10-10 14:19:25 UTC
Created attachment 162431 [details]
stacktrace

editing sql
Comment 9 brettryan 2016-10-20 03:56:34 UTC
Created attachment 162564 [details]
stacktrace

Highlighted diff text.
Comment 10 brettryan 2016-10-21 07:02:35 UTC
Created attachment 162584 [details]
stacktrace

Switching open files while search field is focussed.
Comment 11 Ralph Ruijs 2016-10-25 09:23:35 UTC
Created attachment 162623 [details]
stacktrace

double click inside md file
Comment 12 zmirc 2016-11-09 15:44:46 UTC
Editing inside scss file in an HTML 5 project
Comment 13 zmirc 2016-11-09 15:44:52 UTC
Created attachment 162853 [details]
IDE log
Comment 14 alied 2016-11-30 21:33:06 UTC
Created attachment 163104 [details]
stacktrace

not sure
Comment 15 alied 2017-02-06 20:54:22 UTC
Created attachment 163584 [details]
stacktrace

selecting text in the editor.
Comment 16 muellermi 2017-02-15 12:09:23 UTC
Created attachment 163638 [details]
stacktrace

wanted to add a watch to variables window
Comment 17 muellermi 2017-02-15 12:12:23 UTC
Created attachment 163639 [details]
stacktrace

tried to add new watch
Comment 18 J Bachorik 2017-05-24 14:46:32 UTC
Created attachment 164397 [details]
stacktrace

Starting IDE
Comment 19 Tomas Mysik 2017-06-20 17:04:26 UTC
Created attachment 164583 [details]
stacktrace

no idea, sorry
Comment 20 Tomas Mysik 2017-06-21 03:53:54 UTC
149 duplicates -> should be likely fixed ;)

Thanks!
Comment 21 Exceptions Reporter 2017-12-18 15:33:15 UTC
This bug already has 250 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=223240
Comment 22 Maksim Khramov 2018-03-15 08:59:44 UTC
Created attachment 165672 [details]
stacktrace

Select text in SQL Query window