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 249715 - javax.swing.text.BadLocationException: Invalid offset
Summary: javax.swing.text.BadLocationException: Invalid offset
Status: RESOLVED DUPLICATE of bug 249736
Alias: None
Product: web
Classification: Unclassified
Component: YAML (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-09 12:21 UTC by marckoby
Modified: 2015-03-25 15:36 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 213406


Attachments
stacktrace (3.62 KB, text/plain)
2015-01-09 12:21 UTC, marckoby
Details
stacktrace (3.62 KB, text/plain)
2015-01-11 23:33 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description marckoby 2015-01-09 12:21:37 UTC
Build: NetBeans IDE Dev (Build nbms-and-javadoc-2535-on-20150107)
VM: Java HotSpot(TM) Client VM, 25.25-b02, Java(TM) SE Runtime Environment, 1.8.0_25-b18
OS: Windows 8

User Comments:
jan.kurnatowski: I pressed [Enter] key two times while editing YML file

marckoby: adding text to src file...

marckoby: deleted line in src file

marckoby: editting file

jan.kurnatowski: I was editing yml file

jan.kurnatowski: This problem had occured just after I pressed [Enter] key three times in YML editor.




Stacktrace: 
javax.swing.text.BadLocationException: Invalid offset
   at org.netbeans.editor.BaseDocument.getVisColFromPos(BaseDocument.java:2136)
   at org.netbeans.editor.Utilities.getVisualColumn(Utilities.java:588)
   at org.netbeans.modules.languages.yaml.YamlKeystrokeHandler.getLineIndent(YamlKeystrokeHandler.java:282)
   at org.netbeans.modules.languages.yaml.YamlKeystrokeHandler.beforeBreak(YamlKeystrokeHandler.java:192)
   at org.netbeans.modules.csl.core.CslEditorKit$GsfInsertBreakAction.beforeBreak(CslEditorKit.java:347)
   at org.netbeans.editor.BaseKit$InsertBreakAction.performLineBreakInsertion(BaseKit.java:1426)
Comment 1 marckoby 2015-01-09 12:21:39 UTC
Created attachment 151420 [details]
stacktrace
Comment 2 Exceptions Reporter 2015-01-11 23:33:32 UTC
Created attachment 151443 [details]
stacktrace

It seems the problem is pertaining to YML indenting.
Comment 3 Exceptions Reporter 2015-02-26 19:24:59 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=213406
Comment 4 Roman Svitanic 2015-03-25 15:36:52 UTC

*** This bug has been marked as a duplicate of bug 249736 ***