Menu

Found the repaint lockup (and fixed it)

Help
MattiasF
2005-04-12
2013-05-29
  • MattiasF

    MattiasF - 2005-04-12

    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!)

     
    • Andrew

      Andrew - 2005-04-13

      Great!  I don't have my Concurrent Programming w/Java book with me but I believe it says to use notifyAll() instead of notify(). 

       
      • John Paul

        John Paul - 2007-04-11

        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

         
    • Jonathan Giles

      Jonathan Giles - 2008-06-03

      This has been fixed in the java_1_5 branch of prefuse.

       

Log in to post a comment.