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 118593 - [60cat] NetBeans gets into recursive infinite loop when attempting to compile broken Java file
Summary: [60cat] NetBeans gets into recursive infinite loop when attempting to compile...
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
: 112686 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-11 18:38 UTC by wobster
Modified: 2007-10-19 08:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wobster 2007-10-11 18:38:09 UTC
Every time I save a file that I'm doing some major rafactoring on (it is broken when I save it), NetBeans attempts to
compile the thing and gets itself into a recursive loop:
http://statistics.netbeans.org/exceptions/detail.do?id=7287
and uses up the maximum amount of memory.

I can't figure out how to stop it from recompiling. I turned off the Java tasks, but that had no impact on the
auto-compile logic. (Please add a way to halt the auto-compile feature if it doesn't exist already.)
Comment 1 Antonin Nebuzelsky 2007-10-11 20:55:17 UTC
Reassigning to java.
Comment 2 Dusan Balek 2007-10-11 21:43:04 UTC
Could you please attach the broken source compilation of which leads to the infinite loop? Or, do you have any other
reproducible test case?
Comment 3 wobster 2007-10-13 00:45:10 UTC
Unfortunately, I already fixed it. I noticed that it had a couple of duplicated methods and referenced instance
variables did not exist. Also, as a result of splitting inner classes into a separate package from the mother class,
there was some ambiguity as to which class to load since there were classes in the mother class's package that had the
same name as the formerly inner classes. (I used Together Control Center RC2 to move all my inner classes out to a
package for diagramming purposes, but it didn't disambiguate the class loading issue and left out a number of imports
and dependencies. I'll use NetBeans next time since that operation has proven to be reliable in the past.)

As you can see, the class was completely uncompilable so the auto-compile thing really got in the way.
Comment 4 Dusan Balek 2007-10-16 09:26:46 UTC
Finally, I have managed to reproduce the issue.

Fixed.

Checking in SymbolClassReader.java;
/cvs/java/source/src/org/netbeans/modules/java/source/usages/SymbolClassReader.java,v  <--  SymbolClassReader.java
new revision: 1.14; previous revision: 1.13
done
Checking in SymbolDumper.java;
/cvs/java/source/src/org/netbeans/modules/java/source/usages/SymbolDumper.java,v  <--  SymbolDumper.java
new revision: 1.7; previous revision: 1.6
done
Comment 5 Jiri Prox 2007-10-17 10:56:34 UTC
This fix should go also into beta2 branch
Comment 6 Dusan Balek 2007-10-17 13:31:53 UTC
*** Issue 112686 has been marked as a duplicate of this issue. ***
Comment 7 Dusan Balek 2007-10-18 10:56:29 UTC
Merged to [relase60_beta2].

Checking in SymbolDumper.java;
/cvs/java/source/src/org/netbeans/modules/java/source/usages/SymbolDumper.java,v  <--  SymbolDumper.java
new revision: 1.6.2.1; previous revision: 1.6
done
Checking in SymbolClassReader.java;
/cvs/java/source/src/org/netbeans/modules/java/source/usages/SymbolClassReader.java,v  <--  SymbolClassReader.java
new revision: 1.13.2.1; previous revision: 1.13
done
Comment 8 Jiri Prox 2007-10-19 08:51:46 UTC
verified in beta2