I use RadialLayout with a NeighbourHightlightControl (NHC). I found that at times the NHC stopped triggering updates and after a day of debugging and learning about the app, I found that the ActivityManager is frozen in wait(), while the NHC deperatly tries to schedule the updates. Somehow the updates are marked as scheduled, but ActivityManager still wait():s. So I added a notify in the ActivityManager _schedule to wake the waiting thread.
Like this:
private synchronized void _schedule(Activity a) {
if ( a.isScheduled() ) {
notify();
return; // already scheduled, do nothing
}
....
This seems to solve my repaint lockups.
(I love this framework!)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I notice this hasn't been changed in the current version of prefuse and I have noticed things locking up every now and then but haven't gotten around to tracing down the problem. Does anyone know if this could still be a source of problems?
~JP
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use RadialLayout with a NeighbourHightlightControl (NHC). I found that at times the NHC stopped triggering updates and after a day of debugging and learning about the app, I found that the ActivityManager is frozen in wait(), while the NHC deperatly tries to schedule the updates. Somehow the updates are marked as scheduled, but ActivityManager still wait():s. So I added a notify in the ActivityManager _schedule to wake the waiting thread.
Like this:
private synchronized void _schedule(Activity a) {
if ( a.isScheduled() ) {
notify();
return; // already scheduled, do nothing
}
....
This seems to solve my repaint lockups.
(I love this framework!)
Great! I don't have my Concurrent Programming w/Java book with me but I believe it says to use notifyAll() instead of notify().
I notice this hasn't been changed in the current version of prefuse and I have noticed things locking up every now and then but haven't gotten around to tracing down the problem. Does anyone know if this could still be a source of problems?
~JP
This has been fixed in the java_1_5 branch of prefuse.