Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-5677

Executions.schedule cause infinite loop if async event causes exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 10.1.0
    • 10.0.0, 9.6.4, 9.6.5
    • None
    • None

      Steps to Reproduce

      run attached sample (zul+java, click button

      Current Result

      event loops infinitely, never resolves

      Expected Result

      exception in event shouldn't create an infinite loop

      Debug Information

      org.zkoss.zk.ui.impl.DesktopImpl.ScheduleListener

      if (ifPresent != null) {
          ifPresent.invoke();
          _schedInfos.invalidate(key);
      

      invoke is called before removing the schedule info from the cache.
      If an exception occurs, invalidate is never called, which causes the item to not be removed from the _schedInfos

      Workaround

      attached replacement DesktopImpl for 9.6.4
      deploy to src/main/java/org/zkoss/zk/ui/impl/DesktopImpl.java
      to override original class

            jumperchen jumperchen
            MDuchemin MDuchemin
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: