Re: [gui-dev] Startup deadlock problems

Jens-Uwe Mager <[email protected]> Fri, 23 Jul 2004 21:01:18 +0200
Newsgroups gmane.network.gnutella.limewire.gui.devel
Message-ID <[email protected]>
On Fri, Jul 23, 2004 at 14:46 -0400, Sam Berlin wrote:

> What version of Java are you using on the boxes?   We have no 
> experienced these errors, so it is very strange that you are seeing it 
> 1/3 of the time on XP.

I am using on XP:

java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)

> I did experiment at one time with putting the initial 
> GUIMediator.instance call in the Swing thread, but noticed (as you saw) 
> that the splash screen wasn't updated.  The problem was that the update 
> required the Swing thread to show, but it was blocked by the 
> construction of the GUI.  Rather than try and separate out the 
> problematic points, it seemed unnecessary to put the construction in 
> the Swing thread, since there were no problems at the time.
> 
> Can you hit 'ctrl-break' during these deadlocks to have Java show where 
> the deadlock is occurring?  (On OSX you can send a kill with the 
> interrupt signal.)

Oh, I did not know about the ctrl-break trick to get a stack dump. I am
now seeing that it deadlocks in the GUI initialization of a custom tab I
added to my version of LimeWire, that is the reason you did not see the
problem. I will probably need to shield that part of the initialization
with SwingUtilities.invokeLater. But it appears to me that the whole
thing is a bit fragile, changing a few minor things in the
initialization sequence might produce a similar problem in stock
LimeWire as well.

-- 
Jens-Uwe Mager	<pgp-mailto:F476EBC2>
_______________________________________________
gui-dev mailing list
[email protected]
http://www.limewire.org/mailman/listinfo/gui-dev