Uploaded image for project: 'ZK CKeditor'
  1. ZK CKeditor
  2. ZKCK-40

Memory leak in CKEditor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 4.7.0.0
    • 4.4.6.3
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      http://zkfiddle.org/sample/32ovgu2/1-ckeditor-memory-leak
      Click the add editor button
      Wait until the editor flickers in and out

      Current Result

      unbind doesn't clear editor
      An unbound editor exist in JavaScript memory (can be found with zk.$('@ckeditor'))
      clicking the popup button cause NPE due to unbound editor zWatch listener for Vparent

      Expected Result

      Editor should be cleaned up during unbind

      Debug Info

      https://github.com/zkoss/zkckeditor/blob/master/ckez/src/archive/web/js/ckez/CKeditor.js#L160
      If the instance._editor field is null, the unbind method will go in the first if condition and will stop at:
      https://github.com/zkoss/zkckeditor/blob/master/ckez/src/archive/web/js/ckez/CKeditor.js#L163

      This can be caused by removing an editor instance before it is fully initialized

      Root Cause

      https://sourceforge.net/p/zk1/bugs/2205/

      Workaround

            rudyhuang rudyhuang
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h