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 75110 - NetBeans hangs with SDI on two monitors
Summary: NetBeans hangs with SDI on two monitors
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords: DUAL_MONITOR
Depends on:
Blocks:
 
Reported: 2006-04-16 19:29 UTC by dwilson99
Modified: 2008-12-22 21:54 UTC (History)
5 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 dwilson99 2006-04-16 19:29:00 UTC
I use two monitors on my Mac, running Mac OS X 10.4.6, with J2SE 5.0.

I changed the NetBeans Preferences | IDE Configuration | System Settings to use SDI, and distributed the 
windows over two monitors. It worked fine until I quit and later restarted NetBeans. The windows titles 
kept flashing and cycling, and NetBeans wouldn't respond to user input - it was hung. I tried many times 
with the same result. I reinstalled NetBeans but it did not help. I finally had to restore my hard disk from 
the previous day's backup to get NetBeans to work. 

If I hadn't backed up my system the day before, it would have been a major disaster. I guess I would have 
never been able to use NetBeans again.
Comment 1 Peter Pis 2006-04-17 08:43:05 UTC
Reassigning to "core" for evalution.
Comment 2 Jan Chalupa 2006-04-23 19:00:04 UTC
The window system settings are stored in the userdir (by default in
${home}/.netbeans/5.x. Re-installing NetBeans won't help in such cases. The user
needs to delete the content of the ./config/Windows2Local subdirectory in the
userdir.

Other than that, it looks like a pretty nasty bug.
Comment 3 David Simonek 2006-04-27 15:40:36 UTC
Hmm, I think I remember similar SDI issues, but I don't know if it was Mac
specific or not. Anyway please Milos, try to reproduce and solve, thanks.
Comment 4 Milos Kleint 2006-04-28 08:01:21 UTC
sorry dafe, this has not much to do with macosx. it's about SDI and the way we
handle activation of windows + focus.

what happens is that on restart we need to create X new frames. For some reason
a newly created frame gets activated when it's first made visible. so we get X
frame s like this, and additionally we set one of the frames as active. And
because the keyboard focus follows asynchronously, in some situations we end up
with neverending loop of frames stealing focus from each other.

at the time I was looking into this I noticed that when a frame is made hidden
and shown again, it doesn't do the activation trick anymore. So the idea was to
keep a cache of used frames and recycle them.. It won't help at first start though.
Comment 5 Antonin Nebuzelsky 2006-06-05 16:07:54 UTC
Dafe, please, evaluate.
Comment 6 David Simonek 2006-06-06 11:17:10 UTC
Stando, I'm sorry but could you look at this? I'm sick at home without two monitors.
I found activation code of separate SID frames in
DefaultSeparateContainer.ModeFrame. There is already some hack with time-delayed
activation, but I didn't understand it well...

Anyway, Milos said it should be reproductible also on Win OS, when starting IDE
in SDI mode and windows are scattered across both monitors from previous session. 

Comment 7 Stanislav Aubrecht 2006-06-06 12:02:40 UTC
reproduced on winxp, jdk1.5
Comment 8 Stanislav Aubrecht 2006-06-06 12:27:06 UTC
i tried a simple fix (see the cvs log) which seems to be working fine. at least
i cannot reproduce the bug anymore. on the other hand, the fix may create new
SDI issues...
test it please and let me know if it works for you.


Checking in DefaultSeparateContainer.java;
/cvs/core/windows/src/org/netbeans/core/windows/view/ui/DefaultSeparateContainer.java,v
 <--  DefaultSeparateContainer.java
new revision: 1.16; previous revision: 1.15
Comment 9 Tomas Bilka 2006-06-07 11:27:03 UTC
Verified 

NetBeans IDE Dev (Build 200606061800)
1.6.0-beta2; Java HotSpot(TM) Client VM 1.6.0-beta2-b86
Windows XP version 5.1 running on x86
cs_CZ (nb); Cp1250

Comment 10 dwilson99 2006-06-07 22:07:00 UTC
NetBeans still hangs, unfortunately, when I switch preferences to SDI. I'm running Mac OS X 10.4.6 with 
two monitors, using NetBeans 5.0.

As soon as I switched the preference to SDI, separate windows appeared all over my main monitor, and the 
active windows cycled among all the open windows until I killed NetBeans. This all happened before I even 
closed the Preferences dialog window. I never even got the chance to move or arrange any of the windows.

The good news is that when I restarted NetBeans, it defaulted back to MDI, so I could go back to work.
Comment 11 Tomas Bilka 2006-06-08 08:53:06 UTC
Hello dwilson, this bug was fixed in trunk, which means only the latest NB
builds have been fixed. Unfortunately we are facing now some problems with
availibility
of this latest builds for public (netbeans.org was moved to diff. machines), so
you can't check it now. Anyway, maybe Standa (saubrecht) will decide to backport
this fix to 5.0. 
Comment 12 Stanislav Aubrecht 2006-06-08 09:21:25 UTC
i have fixed the bug in release55 branch as well.
i'm not going to backport this to version 5.0 as the SDI mode is a minority case
only.

dwilson99, please verify the fix using the latest trunk or release55 build when
they become available.

Checking in DefaultSeparateContainer.java;
/cvs/core/windows/src/org/netbeans/core/windows/view/ui/DefaultSeparateContainer.java,v
 <--  DefaultSeparateContainer.java
new revision: 1.15.84.1; previous revision: 1.15
done
Comment 13 dwilson99 2006-06-26 01:13:00 UTC
I tried SDI with two monitors using Development release 5.5 and the bug is fixed.

I now see a related problem. The second-monitor window locations are not saved when I quit, so I have to 
rearrange them each time I restart NetBeans. This was not a big deal with MDI, but it is with SDI, since I 
typically have to move at least five different windows every time I reopen NetBeans. The windows that lose 
their location are the ones that are placed in the second monitor when I quit NetBeans.

This is not a major bug, but it is a problem for anyone trying to make best use of the screen real estate 
using two monitors. It hurst productivity for those of us who can't leave netBeans running all the time.
Comment 14 Stanislav Aubrecht 2006-06-26 08:19:22 UTC
the new report is a different bug, see issue #79054

closing this one as fixed