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.
Build: NetBeans IDE Dev (Build 200804110003) VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b12 OS: Linux, 2.6.22-14-generic, i386 User comments: I have selected an item from the editor hints and confirmed it with Enter Editor became totally unusable after this exception - the caret was not synchronized with the typed text. I had to restart NB. STACKTRACE: (first 10 lines) java.lang.IllegalStateException: Region: <6526,6526) not found. at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.findRegionIndex(TextRegionManager.java:502) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.removeRegionFromParent(TextRegionManager.java:575) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.removeTextSyncGroup(TextRegionManager.java:175) at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.release(CodeTemplateInsertHandler.java:438) at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.released(CodeTemplateInsertHandler.java:452) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionEditing.releaseActiveGroup(TextRegionEditing.java:271) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionEditing.stopSyncEditing(TextRegionEditing.java:296) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionEditing.docActiveTextSyncReleased(TextRegionEditing.java:264) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionEditing$2.outsideModified(TextRegionEditing.java:234) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.outsideModified(TextRegionManager.java:327)
Can you provide the source file, please?
Well, Jirka, sure I can, however - as I said - I have restarted NB and completed the unfinished line:o(. The file is attached bellow, I got the exception while I used the auto completion in following section ('|' stands for caret as usual): new Action(MENU_SWITCH2FLOW, null).perform(); sleep(5000); ComponentPaletteOperator cpo = new ComponentPaletteOperator(); cpo.|expand(new JCheckBoxOperator(cpo,NEW_CATEGORY), true);
Created attachment 60056 [details] Source file (note: Jelly Test)
This issue has already 5 duplicates
Created attachment 62053 [details] stacktrace
This issue has already 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=45925
*** Issue 137843 has been marked as a duplicate of this issue. ***
This issue has already 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=45925
Build: NetBeans IDE 6.5 Beta (Build 200808101001) VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b14 OS: Linux, 2.6.24-19-generic, i386 User Comments: editing template for (int i=0l i< arr.lenght -----> tried to change to my custom for loop Stacktrace: java.lang.IllegalStateException: Region: <1666,1667) not found. at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.findRegionIndex(TextRegionManager.java:502) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.fixRegionStartOffset(TextRegionManager.java:400) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.insertUpdate(TextRegionManager.java:238) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager$DocListener.insertUpdate(TextRegionManager.java:622) at org.netbeans.editor.BaseDocument.insertString(BaseDocument.java:801) at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:655)
Created attachment 67029 [details] stacktrace
Unfortunately I'm unable to reproduce from the steps given by joshis and musilt2. Could you please provide me more detailed info of what you've been doing? Thanks.
I think I can reproduce it: 1. open a java file that has a method in it 2. write System.out.println("") in the method 3. select this line 4. alt+enter to show available hints and choose 'Surrond with for(int i=...' hint 5. undo 6. repeat #3 and #4 and you should get the exception IMO the problem is that when a user undoes a change, which resulted in creating synced-text regions, these regions are not canceled properly. Maybe this is actually the same problem as issue #146105.
Build: NetBeans IDE Dev (Build 200809031401) VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b28 OS: Windows XP, 5.1, x86 User Comments: "Backspace" on 6 marked text characters in Editor Stacktrace: java.lang.IllegalStateException: Region: <5602,5625) not found. at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.findRegionIndex(TextRegionManager.java:502) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.removeRegionFromParent(TextRegionManager.java:575) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.removeTextSyncGroup(TextRegionManager.java:175) at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.release(CodeTemplateInsertHandler.java:438) at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.released(CodeTemplateInsertHandler.java:452) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionEditing.releaseActiveGroup(TextRegionEditing.java:274)
Created attachment 69159 [details] stacktrace
- repeated "Backspace" on 6 marked text characters in Editor - did 1..3 other small editings - "Save All" --> IDE completely hangs; had to exit IDE
Created attachment 69160 [details] How it looks in editor, while IDE hangs
I have finally decided to fix this by having a custom undoable edit marking a code template's insertion so there's a new method in BaseDocument callable during document's atomic lock: public void addUndoableEdit(UndoableEdit edit); Undoing the edit cancels CT's editing. http://hg.netbeans.org/main/rev/56654571e1ce
Reopening - reproduced in NetBeans IDE Dev (Build 200810150101) http://statistics.netbeans.org/exceptions/detail.do?id=128182
A different stacktrace - the new one is reported as issue 150130.
Reopening - reproduced in NetBeans IDE Dev (Build 200811011401) http://statistics.netbeans.org/exceptions/detail.do?id=135996
Not sure why it happens. I have added a better exception's info. http://hg.netbeans.org/main/rev/e71f217ccdc5
Integrated into 'main-golden', will be available in build *200811110201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/e71f217ccdc5 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #132615 - IllegalStateException: Region: <6526,6526) not found. - better exception's info.
Build: NetBeans IDE 6.5 (Build 200811100001) VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_04-b12 OS: Windows XP, 5.1, x86 User Comments: Error while typing a character (i) when code completion was showing for forc macro (in it variable) Stacktrace: java.lang.IllegalStateException: Region: <20681,20682) not found. at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.findRegionIndex(TextRegionManager.java:513) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.fixRegionStartOffset(TextRegionManager.java:411) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.insertUpdate(TextRegionManager.java:249) at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager$DocListener.insertUpdate(TextRegionManager.java:633) at org.netbeans.editor.BaseDocument.insertString(BaseDocument.java:802) at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:655)
Created attachment 75838 [details] stacktrace
reproducible
Should finally be fixed http://hg.netbeans.org/main/rev/992aee21152c
Integrated into 'main-golden', will be available in build *200902031446* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/992aee21152c User: Miloslav Metelka <mmetelka@netbeans.org> Log: #132615 - Code Templates: IllegalStateException: Region: <6526,6526) not found.
Seems to be fixed properly, changing the state to VERIFIED.
*** Issue 150130 has been marked as a duplicate of this issue. ***