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 196134 - Severe freezes and instability when loading and editing project
Summary: Severe freezes and instability when loading and editing project
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: PC Linux
: P1 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-28 21:51 UTC by zoska
Modified: 2011-03-08 05:47 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Project (6.91 MB, application/octet-stream)
2011-02-28 22:10 UTC, zoska
Details
Crash logs, dump, gesturec etc (158.24 KB, application/octet-stream)
2011-03-03 14:20 UTC, zoska
Details
Test case. (595 bytes, text/x-java)
2011-03-04 11:20 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zoska 2011-02-28 21:51:48 UTC
Hi,

Recently I've started working on a project - Java version of Sokoban using JogAmp's bindings. Unfortunately the problems I've encountered forced me to switch to Eclipse to continue work.

I've attached an entire project + libraries I've used. You need to alter the paths after unpacking and loading project.


The problem is that NetBeans either freezes completely or clogs an entire CPU core (I have dual core CPU) for a minute or two. Freezes happens also practically when editing any line of source.

Note that I have autocomplete feature turned on (ie. autocompletion pops up without hitting Ctrl+Space). I think that without autocompletion there could be less freezes but still NetBeans is unusable with this project.

When I attach VisualVM to NetBeans process then I can see that Heap is filled with com.sun.tools.javac.comp.Resolve$AmbiguityError. After some time NetBeans report (through that small stop icon in lower right corner of window) Unexpected exception: OutOfMemoryError - GC overhead limit exceeded. I've tried uploading the crash report few times but I've failed - maybe the report is too big to be accepted or maybe some module in NetBeans broke. Additionally problematic files doesn't have full syntax highlighting, ie. NetBeans parser (I think it's parser) crashes even before coloring the code.


Finally I've created new project in Eclipse, copied sources and other resources and continued work. Surprisingly, Eclipse suffered from similiar problems, autocompletion often resulted in long freezes and heap hogging, but Eclipse does seem to fully recover from such problems and I can continue working. Additionally syntax highlighting works even despite that problem.


Note that this problem is somewhat random - sometimes NetBeans freezes on startup, sometimes I can show the code and edit it before freeze.

I've tested thoroughly NetBeans 6.9.1 and quickly NetBeans 7.0 Beta 2. Both have problems.
Comment 1 zoska 2011-02-28 22:10:44 UTC
Created attachment 106575 [details]
Project

Duh, libraries are too big. Get them from: http://jogamp.org/deployment/webstart/archive/
Comment 2 David Strupl 2011-03-03 13:38:36 UTC
Jan, can you please evaluate how serious/probably the reported OOME is? Thanks a lot, David
Comment 3 zoska 2011-03-03 14:20:28 UTC
Created attachment 106651 [details]
Crash logs, dump, gesturec etc

Here are some NetBeans generated dumps I've collected while working with previously attached project (plus maybe some unrelated files). This is just zipped /home/piotrek/.netbeans/6.9/var/log folder without heap dumps.

I'm curious if anyone else has same problems as me.

Tell me if you need fresh & clean crash logs and/ or heap dumps.
Comment 4 Jan Lahoda 2011-03-04 11:19:45 UTC
It seems that, when a method cannot be resolved and the site is (or, possibly, implements) an interface with inheritance hierarchy complex enough, javac does so many queries and tries to construct and traverse so big tree of AmbiguityError/s, that the computation results in OOME. I will attach a simple test case that breaks current trunk build of NetBeans, and javacs from 1.6.0_20 and 1.7.0-ea-b124.
Comment 5 Jan Lahoda 2011-03-04 11:20:46 UTC
Created attachment 106703 [details]
Test case.
Comment 6 Jan Lahoda 2011-03-07 15:55:51 UTC
Fix in nb-javac:
http://hg.netbeans.org/main/nb-javac/rev/8c8fd9d662f8
fix in JDK7's javac/langtools:
http://hg.openjdk.java.net/jdk7/tl/langtools/rev/74f0c05c51eb
Update of the nb-javac library in NetBeans proper:
http://hg.netbeans.org/jet-main/rev/b6143b0ddc2e
Comment 7 Quality Engineering 2011-03-08 05:47:21 UTC
Integrated into 'main-golden', will be available in build *201103080000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b6143b0ddc2e
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #196134, #196181: updating the nb-javac library