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.
I got a StackOverflowError several seconds after I had invoked code-completion in a static import statement: ... import javax.swing.JRadioButton; import org.jdesktop.layout.GroupLayout; import org.jdesktop.layout.LayoutStyle; import org.openide.awt.Mnemonics; import org.openide.util.NbBundle; import static org.jdesktop.layout.LayoutStyle.; I was editing the 'import static ...' line. The editor cursor was just before the semicolon and I pressed Ctrl-Space to invoke code completion. It displayed a pop-up with a "Please wait..." message for a few seconds and then I got the stack overflow errors (see the attachments).
Created attachment 40421 [details] callstack of the first error
Created attachment 40422 [details] callstack of the second error
I attached callstacks of the StackOverflowErrors. I got both errors as a result of a single invocation of code completion.
Note: I was running on a non-final JDK/JRE: NetBeans IDE Dev (Build 070330) 1.6.0_02-ea; Java HotSpot(TM) Server VM 1.6.0_02-ea-b01 Linux version 2.6.14-1.1656_FC4 running on i386 en_US (nb); UTF-8
It seems that the code I am editing is problematic for compiler of any current JDKs. I tested it with JDK 1.5.0_11, JDK 1.6.0, JDK 1.6.0_01-b03 and JDK 1.6.0_02-b01. To reproduce, download the attached Java source file (FindDialog.java) to package org.netbeans.modules.search in the "User Utilities" module (on disk: "utilities") and add the following line of code between lines 139 and 140: criteriaPanelLayout.setHonorsVisibility(false); You may get various results depending on the version of JDK currently running the IDE. In all cases, it breaks the background compiler used for syntax highlighting. In some cases, it causes a neverending stream of exceptions, thus blocking the AWT and the whole IDE.
Created attachment 40430 [details] source file using GroupLayout library
I can reproduce the buggy behaviour even when I start the IDE with a clean <userdir>/var/cache/index directory.
Already fixed. *** This issue has been marked as a duplicate of 99480 ***