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 40647 - Attempt to close a window freezes IDE
Summary: Attempt to close a window freezes IDE
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: _ tboudreau
URL:
Keywords:
: 40636 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-03-01 14:36 UTC by Jiri Skrivanek
Modified: 2008-12-22 19:39 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (9.07 KB, text/plain)
2004-03-01 14:37 UTC, Jiri Skrivanek
Details
Diff of all validation related changes from last night (4.67 KB, patch)
2004-03-01 15:16 UTC, _ tboudreau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2004-03-01 14:36:34 UTC
Window system in the last continuous build behaves
strange. Windows are open "maximized" in IDE and
when you try to close a window it freezes IDE (see
attached thread dump). To reproduce:

- from main menu open Execution window (Window ->
Execution) => it is not shown until you resize the
main window. Then it fills all displayable area of
the main window (except menu bar and tool bar)
- try to close Execution window using the cross
button at the top right corner => IDE freezes.
When you resize the main window, it shows the
welcome screen.

Tested in build 20040301-1056, JDK1.4.2_03, WindowsXP.
Comment 1 Jiri Skrivanek 2004-03-01 14:37:44 UTC
Created attachment 13746 [details]
Thread dump
Comment 2 Jiri Skrivanek 2004-03-01 14:40:13 UTC
*** Issue 40636 has been marked as a duplicate of this issue. ***
Comment 3 Marian Mirilovic 2004-03-01 14:58:56 UTC
It must be fixed before HR !
Comment 4 _ tboudreau 2004-03-01 15:06:55 UTC
Possibly related to some changes I did last night.  Principally these were removing extra 
validations of the main window during startup, which caused it to flash, lay itself out 
multiple times, etc.

But why would the continuous build only start failing now, 12 hours after committing 
these changes?

FYI, the main window is not frozen after you close the execution window - it is just not re-
laid out.  If you resize the main window, will lay itself out and work again.
Comment 5 _ ttran 2004-03-01 15:12:19 UTC
Tim, please fix asap
Comment 6 Marian Mirilovic 2004-03-01 15:13:06 UTC
Tim is right, 
main window isn't repainted - "only"

another test case :
- run IDE
- close Welcome, Runtime
- try to close Filesystems
-> Filesystems tab stays visible
- resize main window
-> whole main window is repainted - it's ok now
Comment 7 Jiri Skrivanek 2004-03-01 15:15:25 UTC
I didn't say the last continuous build started to failing. I just
found it in the latest build.
Comment 8 _ tboudreau 2004-03-01 15:16:57 UTC
Created attachment 13748 [details]
Diff of all validation related changes from last night
Comment 9 _ tboudreau 2004-03-01 16:11:39 UTC
Okay.  Very simple fix is to put back:

       invalidate();
       validate();
       repaint();

in MainWindow.setDesktop().  I tried doing it a couple other places to make it cleaner, but 
without complete success.

I would prefer to have some time to really figure out what is wrong - whenever you see 
code like this, it usually means the developer is flailing around trying to find something 
that works, found something and left it that way.  Adding a component to the hierarchy 
should auto-magically trigger a layout if needed, of those components that are actually 
affected - an explicit call to validate() usually means something is wrong somewhere else.

At the same time, probably I won't be able to review how layout and preferred size and 
such are handled through all the components in the winsys between now and 7PM.  I'll 
poke at it for another 15 or 20 minutes, and if I don't have a better solution, put it back 
the way it was.  But this should be fixed properly later.
Comment 10 _ ttran 2004-03-01 16:38:30 UTC
it may be easier to just first revert the last commit and then spend
time to fix it properly, not under pressure.  Note this is P1
Comment 11 _ tboudreau 2004-03-01 16:40:48 UTC
Fixed, the old code is back.

Checking in MainWindow.java;
/cvs/core/windows/src/org/netbeans/core/windows/view/ui/MainWindow.java,v
 <--
MainWindow.java
new revision: 1.22; previous revision: 1.21
done
Comment 12 Marian Mirilovic 2004-03-02 09:01:04 UTC
verified in [nb_dev](200403011900)