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 83954 - Lifecycle.exit() from ModuleInstall.restored()
Summary: Lifecycle.exit() from ModuleInstall.restored()
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: David Simonek
URL:
Keywords:
Depends on: 67934
Blocks:
  Show dependency tree
 
Reported: 2006-08-31 18:32 UTC by gustavosantucho
Modified: 2008-12-22 23:55 UTC (History)
1 user (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 gustavosantucho 2006-08-31 18:32:46 UTC
Inside a ModuleInstall.restored() method, I'm calling LifecycleManager.exit() to
shutdown my application after a failed log on.
When I shutdown the app this way, the next time I start the application (i.e.
whith a correct login) the following happen:

a) The app *works* i.e. it's not frozen.
b) The main window has a very small size, and shows on the top left corner of
the screen.
c) The main window's layout is broken, with TC's appearing anywhere.
d) If I close all TCs, everything is back to normal.

Of course, after a normal shutdown, everything is ok.

Is there any way I can avoid this broken-layout-start after a forced shutdown
from a restored() method?

-----
Gustavo.
Comment 1 gustavosantucho 2006-08-31 18:36:34 UTC
Note that using a WindowListener on the MainWindow, as suggested by some people
on the list, it's possible to shutdown without breaking layout. 
I don't know if this is the "right" way.

-----
Gustavo.
Comment 2 gustavosantucho 2006-09-01 05:27:52 UTC
As suggested by Rich Unger, I've tried to call Lifecycle.exit() from
ModuleInstall.validate(), instead of ModuleInstall.restored().
This doesn't break the main window's layout, and this way I can avoid the
flashing caused by the main window appearing and disappearing when using the
WindowListener approach.
But validate() gets called earlier on the startup process, and some things don't
work as expected, i.e. my dialog doesn't have the app's look and feel.
I've noted some keyboard focus problems too.

-----
Gustavo.
Comment 3 Stanislav Aubrecht 2006-09-14 10:54:17 UTC
gustavo, pls see issue #67934, the new api might solve your problem i think
Comment 4 gustavosantucho 2006-09-14 23:00:18 UTC
I've tested the new API on a 6.0 daily build and it works.
I'm new to issue tracker, should we mark this issue as FIXED, being under 5.0?

-----
Gustavo.

Comment 5 David Simonek 2006-09-18 13:03:36 UTC
I'm marking this as fixed and dependent on 67934, as the problem was solved by
using solution in 67934.