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 226668 - When creating a new free form java project the ide hangs forever
Summary: When creating a new free form java project the ide hangs forever
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.3
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-25 16:30 UTC by whitingj
Modified: 2013-06-05 09:35 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
jmap -heap of netbeans when it first started hanging (1.63 KB, text/plain)
2013-02-25 16:30 UTC, whitingj
Details
jstack tacken immediately after ide hung. (23.09 KB, text/plain)
2013-02-25 16:32 UTC, whitingj
Details
jstack taken after about 15 minutes of it being hung. (22.73 KB, text/plain)
2013-02-25 16:33 UTC, whitingj
Details
Proposed patch. (1.25 KB, patch)
2013-06-03 12:09 UTC, David Strupl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description whitingj 2013-02-25 16:30:40 UTC
Created attachment 131838 [details]
jmap -heap of netbeans when it first started hanging

Steps to reproduce:

1. Check out java repo code from hg.
2. Create new free form project.
3. Fill out "Choose Project" with that directory.
4. Fill out "Build and Run Actions" with the appropriate targets from our ant build.xml
5. Press next

Results:
The ide hangs forever and beach balls. netbeans is currently using 125% of my cpu.

I checked out jmap -heap and it seems to have plenty of memory.

I also dumped a jstack as well when it first happened and again after I finished filling out the bug.

It has been going for about 15+ minutes now with 125% cpu and it is still beach balled.

Expected Results:
It should show my the "source package folders" screen.
Comment 1 whitingj 2013-02-25 16:32:15 UTC
Created attachment 131840 [details]
jstack tacken immediately after ide hung.
Comment 2 whitingj 2013-02-25 16:33:09 UTC
Created attachment 131841 [details]
jstack taken after about 15 minutes of it being hung.
Comment 3 whitingj 2013-02-25 16:38:55 UTC
I moved all of my source code out of the directory and left only the build.xml and it still hung.  

So all I had in the project directory at that point was:
.DS_Store
.ant-targets-build.xml
.arcconfig
.hg 
.hgcheck
.hgignore
.hgtags
.reviewboardrc
build.xml

I moved the .* files out and then it went to the next screen.  I have a feeling it is getting stuck on the .hg directory but that is just a guess.
Comment 4 Tomas Zezula 2013-02-26 16:51:31 UTC
Seems as a link cycle in .hg directory or huge amount of data in it.
The .hg should be ignored for source detection.
Comment 5 Petr Somol 2013-02-27 10:56:36 UTC
(In reply to comment #4)
> Seems as a link cycle in .hg directory or huge amount of data in it.
> The .hg should be ignored for source detection.

Please do ignore .hg for source detection ! On Windows with its inferior file system performance I have observed that a cloned NetBeans repository on Windows contains 4,26GB, 319551 files in 82168 directories. Out of that, full one half is the .hg dir, namely 2,62GB, 159208 files in 44579 dirs. I can confirm that whatever operation that involves searching through .hg (like grep) takes ages. It actually takes more time than the one half one would expect due to the numbers above. The problem is that the capacity in .hg is concentrated into just a few file hogs, while the vast majority of files under .hg are very small. This, on Windows, is the worst possible case in terms of file system performance.
Comment 6 David Strupl 2013-06-03 12:09:35 UTC
Created attachment 135262 [details]
Proposed patch.
Comment 7 Tomas Zezula 2013-06-04 14:47:33 UTC
The proposed patch will not work on Windows.
It's much safer to use VisibilityQuery, I will change it.
Comment 8 Tomas Zezula 2013-06-04 15:04:06 UTC
Fixed jet-main f4dbd4315420
Comment 9 Quality Engineering 2013-06-05 09:35:07 UTC
Integrated into 'main-golden', will be available in build *201306050626* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f4dbd4315420
User: Tomas Zezula <tzezula@netbeans.org>
Log: #226668:When creating a new free form java project the ide hangs forever