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 213179 - javax.swing.text.BadLocationException: Wrong insert position 4377
Summary: javax.swing.text.BadLocationException: Wrong insert position 4377
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on: 227677
Blocks:
  Show dependency tree
 
Reported: 2012-05-29 15:54 UTC by Exceptions Reporter
Modified: 2013-07-25 11:12 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 188566


Attachments
stacktrace (5.62 KB, text/plain)
2012-05-29 15:54 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2012-05-29 15:54:18 UTC
This issue was reported manually by sdedic.
It already has 2 duplicates 


Build: NetBeans IDE 7.1 RC2 (Build 201111302200)
VM: Java HotSpot(TM) 64-Bit Server VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Windows 7

User Comments:
netacq_server: While visually editing a component that is not the entire form, used Navigator to remove some components, then tried to rename the in-edit contorl (JPanel).

GUEST: Worked with Swing editor in Design mode. Erased JTree, moved and resized JTable component.
JTable element had two user defined rows with single, string column.




Stacktrace: 
javax.swing.text.BadLocationException: Wrong insert position 4377
   at org.netbeans.editor.BaseDocument.handleInsertString(BaseDocument.java:767)
   at org.netbeans.editor.BaseDocument$FilterBypassImpl.insertString(BaseDocument.java:2347)
   at javax.swing.text.DocumentFilter.insertString(DocumentFilter.java:100)
   at org.openide.text.CloneableEditorSupport$DocFilter.insertString(CloneableEditorSupport.java:2981)
   at org.netbeans.editor.BaseDocument.insertString(BaseDocument.java:751)
   at org.netbeans.api.java.source.ModificationResult.processDocumentLocked(ModificationResult.java:400)
Comment 1 Exceptions Reporter 2012-05-29 15:54:24 UTC
Created attachment 120004 [details]
stacktrace
Comment 2 Tomas Pavek 2012-08-27 08:53:28 UTC
Not a bug in GUI builder, but either in java source or the implementation of java source queries.

java.io.IOException
        at org.netbeans.api.java.source.ModificationResult.processDocument(ModificationResult.java:391)
        at org.netbeans.api.java.source.ModificationResult.commit2(ModificationResult.java:333)
        at org.netbeans.api.java.source.ModificationResult.access$000(ModificationResult.java:95)
        at org.netbeans.api.java.source.ModificationResult$2.run(ModificationResult.java:241)
        at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:317)
        at org.openide.text.NbDocument.runAtomic(NbDocument.java:422)
        at org.netbeans.api.java.source.ModificationResult.commit(ModificationResult.java:238)
        at org.netbeans.api.java.source.ModificationResult.commit(ModificationResult.java:201)
        at org.netbeans.modules.java.source.queriesimpl.QueriesControllerImpl.runUpdate(QueriesControllerImpl.java:109)
        at org.netbeans.modules.java.source.queries.api.Updates.update(Updates.java:157)
...

I guess it's hard to find out what was wrong without a reproducible case, unless the bug was known otherwise. We have only two reports from 7.1, nothing from 7.2, so maybe it was fixed.
Comment 3 David Strupl 2012-11-15 13:20:58 UTC
Yes, closing as works for me.