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 31596 - Changing project hangs the IDE
Summary: Changing project hangs the IDE
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: mslama
URL:
Keywords: RANDOM, SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2003-02-28 22:42 UTC by carcassi
Modified: 2008-12-23 09:40 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump showing deadlock. (13.42 KB, text/plain)
2003-04-02 15:22 UTC, gholmer
Details
Thread dump showing deadlock (NB 3.5 rc1, JDK 1.4.2-beta, Linux 2.4.20)) (19.27 KB, text/plain)
2003-05-19 21:30 UTC, gholmer
Details
Binary patch (14.44 KB, application/octet-stream)
2003-05-27 16:39 UTC, mslama
Details
Diff of patch (2.17 KB, patch)
2003-06-03 14:58 UTC, mslama
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description carcassi 2003-02-28 22:42:16 UTC
When I switch project (Project Manager -> Open), the IDE 
hangs. There is no activity on the runide process (memory 
doesn't increase, and no CPU time is used).

It doesn't always happen, but happens very often, and 
sometimes I have to restart the IDE 5/6 times before I can 
change. I am using JDK 1.4.1_01 on Windows XP, but I have 
seen this problem also on Windows 2000.
Comment 1 Vitezslav Stejskal 2003-03-03 11:12:10 UTC
Gabriele, please, make a Full Thread Dump when the IDE freezes and
attach it to this report. Otherwise I can do almost nothing for you.

Here are steps how to get FTD:

1. run IDE using the runide.exe (it will open the console window)
2. enlarge the screen buffer size; use the console window's system
menu; set with = 1024, height = 9999
3. reproduce the state when IDE is frozen
4. press CTRL + Break on the console window; it will produce the FTD
5. copy/paste the FTD to some file and attach this file to your report

Thanks a lot for you help.
Comment 2 carcassi 2003-03-03 15:01:16 UTC
I have tried for an hour this morning, and of course 
wasn't able to reproduce it. I also upgraded to JDK 
1.4.1_02, so it may have disappeared because of that.

I'll keep running using runide: hopefully sooner or later 
it'll happen again.
Comment 3 Vitezslav Stejskal 2003-03-05 15:09:28 UTC
OK, assignig the RANDOM keyword and leaving still open for some time
to gather more information.
Comment 4 gholmer 2003-04-02 15:20:58 UTC
This happens to me quite often.  I'm using NetBeans 3.5 build
200303202210 under Linux 2.4.19 with Blackdown JDK 1.4.1-01.  I've
attached a thread dump showing a deadlock.
Comment 5 gholmer 2003-04-02 15:22:39 UTC
Created attachment 9663 [details]
Thread dump showing deadlock.
Comment 6 mslama 2003-04-02 15:47:53 UTC
It seems it is deadlock in window system. I reassign it. The problem
is that creating instance of Mode (call WorkspaceImpl.addMode())
invokes WorkspaceImpl.getModes().
Comment 7 gholmer 2003-05-19 16:01:47 UTC
I am still seeing this with 3.5 rc1 (just happened).  I took a thread
dump and can post it if you like.
Comment 8 mslama 2003-05-19 16:25:47 UTC
Yes please. Thanks.
Comment 9 gholmer 2003-05-19 21:30:33 UTC
Created attachment 10338 [details]
Thread dump showing deadlock (NB 3.5 rc1, JDK 1.4.2-beta, Linux 2.4.20))
Comment 10 gholmer 2003-05-27 15:46:02 UTC
I am still seeing this in 3.5 rc2, will it be fixed before 3.5 goes
gold? I think this is a serious issue that will affect people's
opinion of NetBeans' quality, and would like to see the priority
raised.  I have another thread dump if you need it.
Comment 11 mslama 2003-05-27 16:38:34 UTC
WorkspaceContext is listening to changes in modes on Workspace -> When
mode is added from inside loading of mode -> it can trigger loading of
workspace from inside loading of mode. Fix breaks this:
WorkspaceContext now handles PROP_MODES event asynchronously. I will
attach binary patch. Please add it to lib/patches (NB 3.5) and test if
deadlock still happens. Fix will go to main trunk. I am afraid it is
too late to fix it in NB 3.5.
Comment 12 mslama 2003-05-27 16:39:44 UTC
Created attachment 10463 [details]
Binary patch
Comment 13 Marian Mirilovic 2003-05-27 16:59:58 UTC
Hi Glenn,

in my opinion it's too late to fix it for 3.5/S1S5, we are nearly the
release day.
We are not able to reproduce your problem and only two users have
reported that problem. 

If it is still happened, please use Mareks attached patch, thanks for
report.

It will be fixed for next releases.
Comment 14 mslama 2003-06-03 14:58:44 UTC
Created attachment 10571 [details]
Diff of patch
Comment 15 mslama 2003-06-03 15:10:06 UTC
To happen WorkspaceContext class must be instantiated ->
propertyChange() is called. WorkspaceContext can be instantiated for
example by Tools -> Options by expanding nodes IDE Configuration ->
Look and Feel -> Workspaces -> Editing, ....

Fix posts processing of PROP_MODES to AWT thread using invokeLater()
-> PROP_MODES is processed asynchronously.

Fixed in main trunk:
core/windows/src/org/netbeans/core/windows/nodes/WorkspaceContext.java
r.1.3
Comment 16 Marian Mirilovic 2003-06-11 15:08:36 UTC
verified in [nb_dev](200306110100)
Comment 17 Jesse Glick 2003-07-08 16:53:29 UTC
Glenn mentioned this bug on nbusers as being an especial problem in
3.5. Looking at the patch, I see that the only change is wrapping a
block in SwingUtilities.invokeLater. Candidate for the SIMPLEFIX keyword?
Comment 18 mslama 2003-07-08 17:01:35 UTC
I think fix is safe. (Updating UI can be made asynchronously.)
Comment 19 Petr Nejedly 2003-07-09 10:47:10 UTC
Then add a SIMPLEFIX keyword and don't forget about it for next bugfix
release.
Comment 20 mslama 2003-07-09 10:52:41 UTC
Ok. Done.