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 99942 - Editing source code using GroupLayout breaks the background compiler
Summary: Editing source code using GroupLayout breaks the background compiler
Status: RESOLVED DUPLICATE of bug 99480
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-04 10:31 UTC by Marian Petras
Modified: 2007-04-04 13:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
callstack of the first error (87.16 KB, text/plain)
2007-04-04 10:34 UTC, Marian Petras
Details
callstack of the second error (87.07 KB, text/plain)
2007-04-04 10:34 UTC, Marian Petras
Details
source file using GroupLayout library (10.78 KB, text/plain)
2007-04-04 12:54 UTC, Marian Petras
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Petras 2007-04-04 10:31:57 UTC
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).
Comment 1 Marian Petras 2007-04-04 10:34:04 UTC
Created attachment 40421 [details]
callstack of the first error
Comment 2 Marian Petras 2007-04-04 10:34:30 UTC
Created attachment 40422 [details]
callstack of the second error
Comment 3 Marian Petras 2007-04-04 10:36:03 UTC
I attached callstacks of the StackOverflowErrors. I got both errors as a result
of a single invocation of code completion.
Comment 4 Marian Petras 2007-04-04 10:39:52 UTC
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
Comment 5 Marian Petras 2007-04-04 12:53:08 UTC
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.
Comment 6 Marian Petras 2007-04-04 12:54:32 UTC
Created attachment 40430 [details]
source file using GroupLayout library
Comment 7 Marian Petras 2007-04-04 13:01:56 UTC
I can reproduce the buggy behaviour even when I start the IDE with a clean
<userdir>/var/cache/index directory.
Comment 8 Dusan Balek 2007-04-04 13:08:21 UTC
Already fixed.

*** This issue has been marked as a duplicate of 99480 ***