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 229749

Summary: Netbeans frozen in opening projects
Product: ide Reporter: kakacek <kakacek>
Component: UIAssignee: issues@ide <issues>
Status: REOPENED ---    
Severity: normal CC: hummeling, mkleint, mmirilovic, motogpwade
Priority: P2    
Version: 8.0   
Hardware: PC   
OS: Windows 7 x64   
Issue Type: DEFECT Exception Reporter:
Attachments: Screen shot
The two "broken" projects
Unified DIFF of modified project files
The thread dump
Thread dump netbeans8.0.2 hanging while background scanning

Description kakacek 2013-05-14 19:36:53 UTC
Created attachment 134444 [details]
Screen shot

After I start the NB it hangs with "opening projects" but it is not completely frozen.

Some things like updater keep working. But the projects actually do not open.

And when I quit the IDE (and confirm to exit despite of the projects opening is in progress) the IDE does not fully terminate - I have to force-quit it.
Comment 1 kakacek 2013-05-16 04:57:23 UTC
I need to use NetBeans - please help me out of this problem!

How can I unblock it?

Ideally withou loosing all my configurtions...
Comment 2 kakacek 2013-05-16 07:30:22 UTC
I installed the clean NB73. After it imported my settings, the behavior is the same.

So I cannot use NetBeans IDE any more :((((
Comment 3 Marian Mirilovic 2013-05-16 09:49:44 UTC
broken project ... could you share the project with us ? 

Also could you generate thread-dump while the IDE is 'frozen' and attach it here and reopen? Thanks in advance.
Comment 4 kakacek 2013-05-16 13:26:44 UTC
Created attachment 134518 [details]
The two "broken" projects

1. I added an archive containig the two projects as I am opening the group of projects and I have no clue which one is causing the NetBeans disfunction.

It is no spaceship program but still please keep the projects confidential.

2. I can remember whenever there is any problem with NetBeans you ask me to that thread dump. As usually, I do not remember how to do that. I will try to google it and may I succeed I will post the thread dump later here.
Comment 5 kakacek 2013-05-16 13:44:21 UTC
Created attachment 134519 [details]
Unified DIFF of modified project files

I also did this:
1. Terminated the NetBeans.
2. Checked the modified project files with an independent SVN client.
3. Created the unified DIFF of all changes (actually only a few) - attached.
4. Reverted thos changes back to the working copy base.
5. Started the NetBeans.
6. The NetBeans is hanging in "Opening projects" again.

So is it "broken" projects or NOT?
Comment 6 Milos Kleint 2013-05-16 13:47:07 UTC
(In reply to comment #4)
> Created attachment 134518 [details]
> The two "broken" projects
> 
> 1. I added an archive containig the two projects as I am opening the group of
> projects and I have no clue which one is causing the NetBeans disfunction.
> 

I've opened the 2 projects and tried a few restarts, added them to a project group or not.. I always got everything working (latest dev build)
By examining the project metadata I also could not find anything special. The thread dump is essential here I guess. Please see below for instructions how to create one.

> 
> 2. I can remember whenever there is any problem with NetBeans you ask me to
> that thread dump. As usually, I do not remember how to do that. I will try to
> google it and may I succeed I will post the thread dump later here.

http://wiki.netbeans.org/GenerateThreadDump
Comment 7 kakacek 2013-05-16 15:14:32 UTC
Thank you for pointing me to the thread dump wiki.

I tried to do it from the console (I am on OSX).

mac-kk:App kk$ /Applications/NetBeans/NetBeans\ 7.3.app/Contents/MacOS/netbeans 
Found jdkhome=/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home
mac-kk:App kk$

The problem did not happen this way of starting the NetBeans IDE.

OK, I became optimistic, quit the NetBeans IDE (as started from the command line) and started it again from the OSX Finder (or actually Dock).

An the problem occured again.

It is perfectly reproducible...
Comment 8 kakacek 2013-05-16 15:30:15 UTC
I verified/repaired my disk and also checked/repaired the permissions.

No improvement...
Comment 9 kakacek 2013-05-16 18:38:08 UTC
Created attachment 134537 [details]
The thread dump

I tried to create the thread dump again, according to the linked how-to, the terminal method.

Please find it attached.
Comment 10 kakacek 2013-05-16 20:53:44 UTC
I also tried this:
1. Terminated the NetBeans IDE.
2. Renamed the folder under which I have those "damaged" projects.
3. Started the NetBeans IDE.

- Now it works.
- I am able to close the projects group.
- I am able to create a new Java project and normally work on it.
- But when I rename the project folder back and restart NetBeans, the problem reappears (even though the project group containing those two projects was closed!).

Conclusion:
- I do not understand the behavior.
- Some indices point to the damaged projects.
- But som other do not.

Now it is your turn :)))
Comment 11 Milos Kleint 2013-06-07 11:10:23 UTC
does your problem occur with python projects exclusively?

the suspicious stacktrace below that appears to be switching from read to write access in project instance creation. I believe that is wrong

ErrorAnnotator worker" daemon prio=5 tid=0x00007f9205c8c800 nid=0xc603 in Object.wait() [0x0000000166fca000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x000000014af10750> (a org.openide.util.Mutex$QueueCell)
	at java.lang.Object.wait(Object.java:503)
	at org.openide.util.Mutex$QueueCell.sleep(Mutex.java:1623)
	- locked <0x000000014af10750> (a org.openide.util.Mutex$QueueCell)
	at org.openide.util.Mutex.enterImpl(Mutex.java:729)
	at org.openide.util.Mutex.enter(Mutex.java:636)
	at org.openide.util.Mutex.writeEnter(Mutex.java:614)
	at org.openide.util.Mutex.writeAccess(Mutex.java:435)
	at org.netbeans.modules.python.api.PythonPlatformManager.storePlatform(PythonPlatformManager.java:212)
	at org.netbeans.modules.python.api.PythonPlatformManager.getBundledPlatform(PythonPlatformManager.java:98)
	at org.netbeans.modules.python.api.PythonPlatformManager.load(PythonPlatformManager.java:176)
	at org.netbeans.modules.python.api.PythonPlatformManager.<init>(PythonPlatformManager.java:61)
	at org.netbeans.modules.python.api.PythonPlatformManager.getInstance(PythonPlatformManager.java:112)
	at org.netbeans.modules.python.project.ui.actions.RunSingleCommand.<init>(RunSingleCommand.java:34)
	at org.netbeans.modules.python.project.PythonActionProvider.<init>(PythonActionProvider.java:45)
	at org.netbeans.modules.python.project.PythonProject.createLookup(PythonProject.java:95)
	at org.netbeans.modules.python.project.PythonProject.<init>(PythonProject.java:72)
	at org.netbeans.modules.python.project.PythonProjectType.createProject(PythonProjectType.java:31)
	at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.loadProject(AntBasedProjectFactorySingleton.java:264)
Comment 12 A_Denever 2013-08-15 06:46:29 UTC
kakacek workaround helped me. I renamed the project directory which caused the problem and now Netbeans is fine.

How my issue surfaced? I had a php project, working fine. I added two files to the directory as suggested in Netbeans wiki to do diffs. These were plain files, HTML document 3kb, two version of a very simple web page. I did a Tools/Diff That worked as expected. The next step I removed the two files from the directory. (since they were not part of the project, as a simple project volunteered in order to diff two files)

Around this last step where the problems started(I possibly close the diff view as well), the IDE displayed in the bottom that it does background indexing. Indexing as well when force quit and reopened. After reopen I may able to maximize the window or close the first tab, but then IDE is frozen.

Sometimes the background indexing shows and progress were first 8% and then 23%, but even when I let it to do, it never complete that indexing. Reboot won't resolve either, after that Menu works fine, but code windows(php files) can be edited. Netbeans half frozen, won't quit, sometimes even force quit does not work when two copies exists in memory. (That time I tried reboot.) Other users can use Netbeans and the problem is resolved by rename the directory which contained the project where the diffed files were added and removed.

The main problem even there is an x for interrupting the indexing, in practice that won't be possible to hit and indexing froze editing main code windows. Menu works, but quit is not, possibly it had to check files state and therefore it wait  in some command queue for indexing to finish.
Comment 13 Marian Mirilovic 2013-08-23 09:52:55 UTC
Waiting for response for comment 11 ...
Comment 14 A_Denever 2013-09-28 13:12:36 UTC
Do happen without diffs, just frozen on indexed state and open window. (when more than one project is open and last is make it frozen and the majority of the fine ones is relocated.)
Comment 15 flaviolacer 2014-04-27 19:24:34 UTC
Same issue!

Solved updating and setting the JVM 1.8. Must be a problem with old JREs.
Comment 16 Donald.Record 2014-06-07 03:53:42 UTC
I regularly have to wait approx. 15-20 minutes for the open project dialog to appear. I am by no means exaggerating. I have been working with strictly Java projects since I have installed NetBeans. I am running Java Version 8 (build 1.8.0-b132).
Comment 17 marckoby 2014-12-11 10:58:54 UTC
"Marked as affecting me"  Where is this bugzilla option?

Same problem. Using PHP Symfony projects.
Never finish loading....

Netbeans 8.0.2 Windows 8.1 x64
Comment 18 BriceGeumez 2015-08-07 14:47:00 UTC
I have the same issue as well (Windows 7 x64, JDK 1.8_51 x64, Netbeans 8.0.2 x64). Java projects.

It appeared two ways:

1) On a fresh install, blank user settings:
File -> Open project, the Open Project dialog is unresponsive. I can drag the dialog around, and the close button visually responds to click but does not close the dialog.

2) Fresh install, user settings imported from Netbeans 7.3.1:
NB8 imported my projects settings that were working fine in version 7. The IDE hangs while "Background scanning of projects" remains at 94%. Again the IDE main window is unresponsive (menu don't work, can't close it, ...) but the window can be dragged around and will be partially redrawn.

For the second case, I have added a thread dump.
Comment 19 BriceGeumez 2015-08-07 14:48:50 UTC
Created attachment 155218 [details]
Thread dump netbeans8.0.2 hanging while background scanning
Comment 20 motogpwade 2016-05-03 15:27:59 UTC
Has this issue been resolved yet?

I get very similar. start netbeans and it just seems to hang.
I have moved the folder where the project was, but netbeans still hangs, and wont let me click open or anything.

wont even close unless i kill the process.
Comment 21 Leperous 2016-05-24 08:59:45 UTC
I'm having the same problem too. It looks like it's hanging on starting up the JVM, as there's no java process and nothing to diagnose in VisualVM.
Comment 22 trogers 2017-09-19 11:46:01 UTC
I was able to work around this problem by turning off all of my network connections. I turned off the wireless and unplugged the Ethernet cable. I started up NetBeans, and then I reconnected the networks.
Comment 23 trogers 2017-09-20 12:21:35 UTC
Nope. I'm wrong. Disabling the network communications doesn't solve the problem. But after opening and quitting NetBeans several times, I can eventually get it to work. It's just random.