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 201111090600) VM: Java HotSpot(TM) Client VM, 21.1-b02, Java(TM) SE Runtime Environment, 1.7.0_01-b08 OS: Windows XP User Comments: alied: Now every time I change the code i get this exception. restarting NetBeans. alied: I invoked Code Completion. Stacktrace: java.lang.StackOverflowError at javax.swing.undo.CompoundEdit.lastEdit(CompoundEdit.java:88) at javax.swing.undo.CompoundEdit.addEdit(CompoundEdit.java:128) at javax.swing.undo.CompoundEdit.addEdit(CompoundEdit.java:138) at javax.swing.undo.CompoundEdit.addEdit(CompoundEdit.java:138) at javax.swing.undo.CompoundEdit.addEdit(CompoundEdit.java:138) at javax.swing.undo.CompoundEdit.addEdit(CompoundEdit.java:138)
Created attachment 113102 [details] stacktrace
Created attachment 113172 [details] Java source file to reproduce bug. 1) Open attached java file in NetBeans. 2) Put cursor on method2() call inside method1(). 3) Right click and choose Refactor>>Inline... and then on preview window, click "Do Refactoring" button. 4) Right click on anywhere on code in editor and choose Refactor>>Undo[Inline Method]. 5) Now type this in at bottom of class: public void setX(int x) { this.x = x; } This exception is thrown when this.x is typed. This causes the exception to be thrown over and over and NetBeans must be closed. It nearly locks up NetBeans because it takes 10 - 12 seconds before it will close.
Make sure you delete public void setX(int x) from the file before you go through the steps. If you just try to type this.x inside the method already in the file, it won't throw the exception. You have to type the whole method in new.
Reproduced. It's probably related to implementing of #21237.
http://hg.netbeans.org/jet-main/rev/aa155afd5926
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/aa155afd5926 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #204965 - StackOverflowError at javax.swing.undo.CompoundEdit.lastEdit().
verified