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 187608 - Project Properties inaccessible after reduction in screen dimensions
Summary: Project Properties inaccessible after reduction in screen dimensions
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: _ wadechandler
URL:
Keywords:
: 177335 186402 190228 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-15 17:29 UTC by javadude2000
Modified: 2010-10-25 14:44 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch to fix the issue (2.35 KB, patch)
2010-10-15 22:23 UTC, _ wadechandler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description javadude2000 2010-06-15 17:29:38 UTC
There is a severe exception occurring in NetBeans 6.8 that I first observed in NetBeans 6.7. For no identifiable reason, when attempting to access the project properties dialog in the NetBeans UI, nothing happens whether attempting to access the project properties dialog via right-clicking on a project for the pop-up menu or from the NetBeans menu bar.

The only way to remove the problem requires completely uninstalling NetBeans including the user data, then reinstalling NetBeans. If the user data is not deleted during the uninstall, the problem persists after NetBeans is reinstalled.

I had hoped that this problem had not been inherited from NetBeans 6.7, but that unfortunately appears to be case. Whether it now persists in the newly released NetBeans 6.9 is to be seen.

This is a very serious problem.
Comment 1 Jesse Glick 2010-06-15 19:09:13 UTC
Never heard of such a problem. Need a way to reproduce; or info about what exact files in the userdir, when removed, fix the problem; or relevant log file excerpts showing an error.
Comment 2 javadude2000 2010-06-16 15:56:23 UTC
This same problem occurred repeatedly with version 6.7, and I reported it: https://netbeans.org/bugzilla/show_bug.cgi?id=177335

The problem never occurred in version 6.5, and, was therefore, created by something that was changed between versions 6.5 and 6.7. I have been using version 6.8 for months on a daily basis and had not observed it until yesterday. The only remedy is to completely uninstall NetBeans along with the user data, then reinstall NetBeans. It's possible that something in the IDE is corrupting data being stored in the user data that makes modifying the project properties impossible. 

Just because someone who's been working on NetBeans hasn't heard of a particular problem before doesn't mean that it can simply be dismissed and declared "resolved" when nothing was done to identify the problem and repair it. I'm sorry that I don't have log data to provide to you, but when I was using version 6.7 and this problem was occurring far more often, there was no relevant information being stored in the log about what was happening and the only way to restore the ability to modify a project's properties was to delete that information (along with all the user data) along with NetBeans in order to make NetBeans usable again.

I never knew when the problem was going to happen before with version 6.7. I would be using NetBeans, opening, editing & closing files contained within a project; then, if I needed to modify the project's properties, it would be inaccessible. There was no way to predict or reproduce the problem and several coworkers also using NetBeans experienced the exact same problem and, like me, never knew when it was going to occur.

What ever this problem is, it is certainly not resolved and I am marking it as such.
Comment 3 Jesse Glick 2010-06-16 16:23:46 UTC
There is no way I could identify the problem without more information from you, which is what the INCOMPLETE resolution signifies. See for example: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

If deleting the user directory (or simply using a new one, with --userdir) causes the problem to disappear, then presumably some file in the userdir is a trigger. If so, a simple bisection procedure can be used to identify that file: back up your userdir first; then delete half of it randomly (e.g. half of the top-level subdirectories), and restart the IDE. If the problem still occurs, try to delete half of the remaining files. If it does not, restore half of the deleted files. Continue until the responsible file has been identified. The identity of this file on its own might be enough for me to guess what the actual problem is, or it might serve as a starting point for constructing a reproducible test case. (It is possible for problems to arise from deleting some but not all of a set of userdir files unrelated to the bug being investigated; but in general NetBeans is designed to treat userdir files as optional overrides of a default configuration, so that for the most part they can be freely deleted if they pose any problems.)

Or the problem might be triggered by some environmental change, such as to XP's window management settings, or to the JDK used by NetBeans.

Definitely if any warnings or exceptions appear in the IDE's log file when the problem appears (but not before), that would be relevant information.
Comment 4 _ wadechandler 2010-07-22 02:39:54 UTC
Jesse, please see:
http://forums.netbeans.org/viewtopic.php?p=80527#80527

I talk about it some there. Anyways, the file storing the settings is:
NBUSERDIR/config/Preferences/org/netbeans/modules/projectuiapi.properties

and that is a feature to keep the position. I added it with another NB dev a while back. All the original code I provided is not there though. See:
release691/projectuiapi/src/org/netbeans/modules/project/uiapi/CustomizerDialog.java

and look for the usages of CUSTOMIZER_DIALOG_HEIGHT. You'll see what it is doing with the other information along with the height (x,y, width, height).

I'll try to fix it and provide you a patch and a check in if satisfactory sometime soon unless you see it right off. But, the issue is if the x or y, either one, is less than or greater than the current displays max or min in either case then x and y should be recalculated to center on the display which WindowManager.getDefault().getMainWindow() resides and then perhaps the width and height should be recalculated to fit on that screen more correctly, but only in the situation where x and y must be recalculated.

The reason that feature is there, to keep coordinates and size, is that one resizes the project properties dialog to see certain things depending on their screen size and the amount of information they want to see on the screen. I do that quite often. By storing that information for the next time the dialog is shown, the developer/user doesn't waste time resizing the dialog over and over. This is often needed to be able to see paths better in tables etc and other values which are too long for the default dialog sizes and positions. Sometimes I will have the dialog resized over mutliple displays too. So, this helps support multiple monitors better as well.

I added the original feature because I found myself wasting quite a bit of time on projects with longer paths in certain fields I couldn't see right off.
Comment 5 _ wadechandler 2010-07-22 02:43:22 UTC
*** Bug 186402 has been marked as a duplicate of this bug. ***
Comment 6 _ wadechandler 2010-07-22 02:48:02 UTC
*** Bug 177335 has been marked as a duplicate of this bug. ***
Comment 7 Jesse Glick 2010-07-22 14:51:11 UTC
Am I getting the summary correct? And can I confirm that there is a tested workaround, to delete projectuiapi.properties? If a fix can be verified this might be appropriate for backporting, TBD.
Comment 8 _ wadechandler 2010-07-22 22:35:58 UTC
Yes, deleting the file after stopping the IDE, then restarting would fix the issue for that time at least. Too, there are workarounds related to asking to OS to move the invisible window using the keyboard and shortcuts. 

For instance, on windows when it happens, one can ALT+SPACE, choose move, and then use the keyboard arrows to put the window back in the visible area. Closing the window after that will correct the issue until it happens again as it will overwrite the values.

I have used both methods on this single system of mine which the issue has arisen. I suppose it happens on this one because I use it with multi-monitors, no external monitor, and sometimes am using a docking station. Something in between all the switching around buggers it up pretty good. 

This should really only affect systems which have been using multiple monitors at some point and the positions and sizes have been changed etc. 

I need to see if I can figure out exactly how to reproduce the situation easily so I can verify a patch. I will try to work up a patch in the next so many days and get that verified unless you beat me to it. I first need to try to see if I can make it happen more often. Maybe I can move my monitors orientation around a bit while opening and closing project properties and break it. Will report back sometime tomorrow.
Comment 9 Jesse Glick 2010-07-23 13:49:45 UTC
A patch would probably not be difficult to write but I am not sure I could properly verify it, so assistance would be great. Certainly I could change screen resolution between IDE runs, but that would not capture problems with multihead displays (which I do not own).
Comment 10 _ wadechandler 2010-08-10 14:21:36 UTC
Just an update. I've been trying to make this happen again on my system. No real luck, but haven't had too much time to devote. Will try to figure out more a little later this week and hopefully the patch can be done over the weekend.
Comment 11 Jesse Glick 2010-10-13 18:06:24 UTC
If you can produce a tested patch by Friday this can probably be released in a 6.9.x update; otherwise it will have to wait for 7.0.
Comment 12 _ wadechandler 2010-10-15 22:20:33 UTC
I'm generating a diff which fixes this. I found I could reproduce on this system by moving my displays inverse of each other while opening and closing the project property dialog. Should have the .diff file attached shortly. This was made against the release691 branch of the releases repository.
Comment 13 _ wadechandler 2010-10-15 22:23:50 UTC
Created attachment 102430 [details]
Patch to fix the issue

This patch was made against the releases repository branch release691
Comment 14 _ wadechandler 2010-10-15 22:28:53 UTC
The patch is attached Jesse. Sorry it took me until Friday evening instead of morning. I tried to get it last night, but the repos had changed on mercurial (hg.netbeans.org) so I had to reget etc and patch and all.
Comment 15 Stanislav Aubrecht 2010-10-18 14:02:51 UTC
*** Bug 190228 has been marked as a duplicate of this bug. ***
Comment 16 Petr Suchomel 2010-10-18 14:40:20 UTC
Jesse,
Can you review & verify the patch?
Comment 17 Jesse Glick 2010-10-18 17:51:05 UTC
Committed core-main #98cb87ec9336 with only minor modifications (unused bogus import; simplified comments & formatting). I am not personally able to verify since (as previously noted) I do not have the right kind of hardware to trigger the bug in the first place. I can verify on Ubuntu that if I open the Properties dialog for a (Maven) project, move it partly offscreen, hit Enter to close, and then reopen the dialog, it is restored to a fully visible position (even after an IDE restart). The patch looks sane but it would be nice to have some more formal verification that it works.
Comment 18 Petr Suchomel 2010-10-18 18:39:33 UTC
Thanks, I will talk to QE tomorrow if I can get the fix verified before integrating
Comment 19 Quality Engineering 2010-10-19 02:58:33 UTC
Integrated into 'main-golden', will be available in build *201010190000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/98cb87ec9336
User: wadechandler@netbeans.org
Log: #187608: Project Properties inaccessible after reduction in screen dimensions.
Comment 20 Petr Suchomel 2010-10-19 15:47:38 UTC
Transplanted from main http://hg.netbeans.org/releases/rev/1bd3984d76bb
Comment 21 Tomas Danek 2010-10-25 14:44:06 UTC
cannot reproduce in 6.9. patch2, marking verified.