Gang,

I think I have located the problem that Envisage easily dies when
interacting with the visual representation.

It is a deadlock that occurs between Prefuse and Swing internals.

The Swing Event thread, acquires getTreeLock() internally in
JComponent.paintChildren(), and when the Prefuse component's
paintComponent() is called, it in turn calls Display.paintDisplay()
which tries to synchronize on (Display.m_vis)...

The Prefuse ActivityManager thread synchronizes on Display.m_vis in
the Action.run() method, and in my deadlock ended up calling
Display.setSize() which calls java.awt.Component.setSize() which calls
java.awt.Component.resize(), which tries to synchronized of
getTreeLock()...

:-(

I think that the real problem lies in Prefuse not posting Swing
updates to the event thread, and instead tries to do things in a
separate thread and gets entangled in its own synchronizations.


Now, the Prefuse project hasn't had any commits to it in 22 months, so
I am not hopeful that it will be fixed easily. I will try t contact
the author and see if he will entertain a bug patch, make someone from
here a co-maintainer, move prefuse to OPS4J or some other action to
allow this to be resolved. IF that doesn't turn out positively, I
think we should fork the codebase, either here or separately to OPS4J,
rename it and push forward...

Any ideas, feedback, suggestions?


Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to