Mailingliste - Einträge 2005


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qftestJUI] SUT hangs on startup


  • Subject: Re: [qftestJUI] SUT hangs on startup
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: Tue, 20 Sep 2005 18:52:02 -0000

Hello Dylan,

as expected, your app is calling Swing methods from outside the event
dispatch thread. Please see

http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html

for more information about Swing not being thread-safe, including the
note that even initializing components before bringing up the frame is
no longer deemed safe (in fact, it never was).

In your case there are two problems:

The main thread calls

com.bd.framework.ApplicationFramework.startFramework()

which then goes on to create menus, etc. This is the main culprit. If
you wrap that code in SwingUtilities.invokeAndWait(...) you should be
mostly fine.

But there's also Thread-10 that is busy setting up a FileChooser that
is now also blocked due to the dealock. Any GUI related code on that
thread should also be moved to the event dipatch thread using either
invokeAndWait or SwingUtilities.invokeLater.

Best regards,
    Greg


Dylan_Wilson@?.com writes:

> Here it is.  I see some suspects, but I'll wait for your diagnosis.
>
> Thanks again,
> Dylan
>
> (See attached file: dump.txt)
>
>
>
> |---------+--------------------------->
> |         |           Gregor Schmid   |
> |         |           <Gregor.Schmid@q|
> |         |           fs.de>          |
> |         |                           |
> |         |           09/20/2005 02:00|
> |         |           PM              |
> |         |                           |
> |---------+--------------------------->
>   >----------------------------------------------------------------------------------------------------------------------|
>   |                                                                                                                      |
>   |        To:      qftestJUI-list@?.de                                                                                |
>   |        cc:      Dylan_Wilson@?.com                                                                                  |
>   |        Subject: Re: [qftestJUI] SUT hangs on startup                                                                 |
>   >----------------------------------------------------------------------------------------------------------------------|
>
>
>
>
>
> Hi Dylan,
>
> it's very likely that the startup of your SUT has some small bug where
> not everything related to Swing objects is done on the AWT event
> dispatch thread. You'll get away with this most of the time, but
> qftestJUI often exposes such problems as it causes increased activity
> within the SUT and such increases the likelyhood for deadlocks to
> happen.
>
> Either way, we need a full thread dump to find out where the cause of
> the problem is. Please see message
>
> http://www.qfs.de/archive/qftest-list/2005/msg00092.html
>
> about how to create a full thread dump on Windows.  Best create two or
> three dumps (always useful in case there's an endless loop instead of
> a deadlock) and send the result to me or the list.
>
> Best regards,
>     Greg
>
> Dylan_Wilson@?.com writes:
>
> > Testing a pure Java application using 1.4.2_05 and JUI 1.08.3.  I've
> tried
> > both "Start Java SUT client" and starting using a shell command that runs
> a
> > batch file.  The JDK is instrumented.
> > When the application starts up, I see my app, but it doesn't seem to have
> > fully initialized as the menu bar is not the correct one, its a default
> bar
> > which is swapped out for the correct one during startup.  My app is not
> > responsive at all, and I have to kill it to end it.  Further
> complications
> > might include using JInternalFrames, using JGoodies Look and Feel, using
> > multiple threads at startup.  I have tested it with another simpler app.
> > that we have written here and it works great.  That app has the L&F, but
> > doesn't use the InternalFrames or swap its menubars.  This is my first
> time
> > using JUI and I have otherwise been pleasantly surprised.  We are in the
> > evaluation phase and plan to purchase something within 1month.  Thanks
> for
> > the help!
> > I should mention that JUI doesn't hang at all during these scenarios.
> >
> > Dylan

--
Gregor Schmid                                Gregor.Schmid@?.de
Quality First Software GmbH                     http://www.qfs.de
Tulpenstr. 41                                Tel: +49 8171 919870
DE-82538 Geretsried                          Fax: +49 8171 919876


Videos Downloads Dokumentation Kaufen Gratis Testen