The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

This topic is READ ONLY
import-bot (20211) [Avatar] Offline
#1
Re: Deadlock in swing components validating
[Originally posted by smithlc]

Doh! Found at the bottom of the stack a synchronize on one of my methods,
posting to a log... in the midst of that another thread for another panel was
doing an addNotify and hit a synchronized method... between synchronize
methods and locking on getTree, they deadlocked.

I had long ago coded the log method so the synchronize could be removed, I
just forgot to take it off the method definition.

-Chad
import-bot (20211) [Avatar] Offline
#2
Re: Deadlock in swing components validating
[Originally posted by matt]

So you are all set now? No more deadlocking?....
import-bot (20211) [Avatar] Offline
#3
[Originally posted by smithlc]

Ack! Now what!

I have a very complex app with multiple panes (www.gameblazer.com) and
everything works fine until rapid clicking occurs, then the panels can get
refreshed simultanously and AWT deadlocks in validate. This is occuring in the
Container validate method which synchronizes on a getTreeLock()... which of
course is final so can't be easily fixed. I can't believe I have to write
another serialization on top of awt's. Bah!

There, I feel better now. Any tips on how to avoid this?

Chad