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 200019 - IDE shutdown grabs memory and hangs upon System shutdown
Summary: IDE shutdown grabs memory and hangs upon System shutdown
Status: RESOLVED INCOMPLETE
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: -S1S-
Hardware: PC Other
: P1 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-10 17:36 UTC by kloassie
Modified: 2011-07-12 17:47 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 kloassie 2011-07-10 17:36:51 UTC
when not exiting the netbeans manually before executing system shutdown, the
OS sends shutdown command to all open processes and waits for processes to shutdown. However, on this event Netbeans does not shutdown, but instead, collects all available memory, and then hangs. This causes to fail the 'cancel shutdown' when hitting the 'cancel' button. At that point the user is stuck: waiting for shutdown will do nothing and returning to the OS to shutdown Netbeans manually has become impossible. The only options left for the user are: 1. killing the netbeans process in the taskmanager (which is bad for the OS) and then return to OS or 2. pressing the power button for more than 3 secs (which is also bad for the OS).

I think there should be an easy fix for this, since exiting netbeans manually already works fine.

OS: Windows 7
PC: Asus Eee netbook
Comment 1 Petr Jiricka 2011-07-11 07:35:32 UTC
I can not reproduce, does not happen for me. Can you describe which external processes are running when you shut down NetBeans? And are these processes terminated correctly by NetBeans? What if you try to gracefully terminate them before exiting NetBeans - does that help?

When NetBeans hangs for you, does it continue to consume CPU cycles? Or is there a deadlock? Can you please send a thread dump of the IDE when it is in this state? Thanks.
Comment 2 kloassie 2011-07-11 08:21:51 UTC
How can I make a dump when I cant get back into the OS, and therefor cant reach the IDE interface anymore? As I said: When I exit Netbeans thru the IDE close button, everything goes according to normal behaviour. This ONLY occurs if I choose 'shutdown' from the Windows start menu while Netbeans still is open.

I waited for Netbeans to first complete all its tasks of scanning folders/files and all other processes it may possibly run. I waited at least 30 minutes with only having 1 project containing about 25 files divided over 4 packages.

Netbeans was completely at easy and was consuming minimal CPU time when I started the Windows shutdown. Windows showed its process of closing processes: a picture I had left open, then a pdf I had left open and then Netbeans. At that time my computer got working harder and harder, the noise went up and so I knew that some very intense process was being run. Windows gave the notice that it couldnt close Netbeans. 

At that time the 'cancel' didnt function anymore. However CTRL+ALT+DEL still did so I could get some insight thru Taskmanager. There I saw that all memory was hijacked by Netbeans.

Normally such notices indicate that the program that should close gave popped a dialog, of which the 2 most occuring are 'Are you sure you want to exit Blah?' and 'The file somefile.txt has been changed, do you want to save these changes?'

I had done n.o.t.h.i.n.g. yet with Netbeans (I normally use Eclipse, just wanted to give NB a try this time), so no files were changed. And indeed after I restarted my computer and see if any pop up would show on exit by clicking exit button on IDE, there were NO popups.

So the hanging was not because of a popup - it was a malfunction in the IDE.
Comment 3 kloassie 2011-07-11 08:44:08 UTC
You may argue that maybe Eclipse or another IDE or any texteditor had changed any of the source files and that Netbeans was reacting upon this.

I tested the behaviour of Netbeans described by me several times. After the first time I saw this (the first time it happened, I wasnt testing at all) the only thing I did for a few times was:
1. starting computer
2. starting Netbeans
3. Watch Netbeans complete all its initial tasks
4. Wait abt 5 minutes to see if any other task would be started by Netbeans
5. Exit, either by IDE or by OS

Also, even if there was some unfinished process or a pop up dialog, it still shouldnt take so much resources that the 'cancel' becomes disfunctional. I have never encountered any other program that does this. Do NOT take so much resources that the PC gets cripled.
Comment 4 Petr Jiricka 2011-07-11 15:27:58 UTC
Sorry, I misunderstood your original report, thanks for the explanation. Now it's clear. 

I suspect you may be hitting bug 197927, which is specific to Windows 7, and is fixed in NetBeans 7.0.1 Release Candidate - it would be great if you can try with this build. I am reassigning to filesystems.
Comment 5 Jiri Rechtacek 2011-07-12 08:32:15 UTC
kloassie@netbeans.org, please could you download/install latest RC candidate for 701 from http://dlc.sun.com.edgesuite.net/netbeans/7.0.1/rc1/ and let us know if this problem disappeared there? Thanks
Comment 6 kloassie 2011-07-12 17:47:22 UTC
I will test 7.01 later this week or next week. I downloaded it but since I had my jdk installed on D:\ instead of C:\ (I always install as less as possible on C:\ so minimal data will be lost at any major system crash resulting in new OS installation) Netbeans wouldnt install. (7.0 I had installed from the jdk/netbeans bundle from Oracle)