Memory leak in Richtext/Markdown editor?

Instances of components seems to be kept in the memory when they contain a ejs-richtexteditor component. To reproduce Please see the attached movie and demo project.



Attachment: 20220314_memleak_syncfusion_markdowneditor_movie_15345913.zip


8 Replies

BE Bernd March 14, 2022 03:26 PM UTC

somehow the forum validation did not let me complete my report because of "forbidden URLs" (there was no URL in it...), so let's try to post it again:

Here are the steps to reproduce:


  1. unzip the demo project, install, build and start:
    1. npm install or yarn install​
    2. ng build or yarn build​
    3. ng serve or yarn start
  2. open developer tools, go to the "Memory" tab, take a heap snapshot
  3. switch "Block 1" 10 times on and off by clicking on the "TOGGLE Block 1" Button, make sure that it's switched off at the end
  4. take another heap snapshot on the "Memory" tab in developer tools, choose "Comparison" in the toolbar and type in "rich" in the "Class filter" input
    Result: you'll see 11 instances of "LComponentView_RichTextEditorComponent"
  5. type "dummy" in the "Class filter" input
    Result: you'll see 11 instances of "LComponentView_DummyComponent" and 10 instances of "DummyComponent"
  6. now switch "Block 2" 10 times on and off by clicking on the "TOGGLE Block 1" Button, make sure that it's switched off at the end
  7. take another heap snapshot, choose "Comparison" in order to compare snapshot 3 with the preceeding snapshot 2, type "dummy" in the "Class filter" input
    Result: you'll se no new instances of "DummyComponent"

The only difference between Block 1 and Block 2 is that Block 1 contains a ejs-richtexteditor component.


Attachment: 20220314_memleak_syncfusion_markdowneditor_demoproject_e104add5.zip


BE Bernd March 14, 2022 03:28 PM UTC

Here's the Markup of the Demo:



<div class="content" role="main">

  <button (click)="onToggle1()" >TOGGLE Block 1 {{isVisible1 ? 'OFF' : 'ON'}}</button>
  <button (click)="onToggle2()" >TOGGLE Block 2 {{isVisible2 ? 'OFF' : 'ON'}}</button>

  <hr/>

  <p>Block 1 - {{isVisible1 ? 'ON' : 'OFF'}} - count: {{counter1}}</p>
  <div *ngIf="isVisible1">
    <dummy-component [counter]="counter1"></dummy-component>

    <ejs-richtexteditor id='mdDefault' #mdDefault editorMode='Markdown' height='250px'>
    </ejs-richtexteditor>
  </div>


  <hr/>


  <p>Block 2 - {{isVisible2 ? 'ON' : 'OFF'}} - count: {{counter2}}</p>
  <div *ngIf="isVisible2">
    <dummy-component [counter]="counter2"></dummy-component>
  </div>


And here's the code of the Demo:


@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {

  public isVisible1 = false;
  public counter1 = 0;

  public isVisible2 = false;
  public counter2 = 0;

  public onToggle1() {
    this.isVisible1 = !this.isVisible1;
    if (this.isVisible1) {
      this.counter1++;
    }
  }

  public onToggle2() {
    this.isVisible2 = !this.isVisible2;
    if (this.isVisible2) {
      this.counter2++;
    }
  }

}


BS Buvana Sathasivam Syncfusion Team March 16, 2022 04:56 PM UTC

Hi Bernd, 

Greetings from Syncfusion support. 

We have considered the issue “Memory leak issue with Rich Text Editor component” as a bug from our end and the fix for the issue will be included with our weekly patch release on April 12, 2022. 

You can now track the current status of the report, review the proposed resolution timeline, and contact us for any further inquiries through this link:  

Regards, 
Buvana S 




VJ Vinitha Jeyakumar Syncfusion Team April 13, 2022 12:55 PM UTC

We couldn't include the fix for the issue due to some complexity and it will be included with our upcoming patch release on 26th April 2022.



BS Buvana Sathasivam Syncfusion Team May 6, 2022 10:27 AM UTC

Hi Bernd,


Sorry for the inconvenience.

We have faced more complexity in fixing this problem and also need to ensure more cases based on this fix. So, we will include your fix in our upcoming Vol 2, 2022 release, which is scheduled to roll out at the end of June, 2022. We appreciate your patience until then.

Regards,

Buvana S



BS Buvana Sathasivam Syncfusion Team July 4, 2022 02:47 PM UTC

We are facing complexity in resolving the reported issue on our end. We will include the fix in the upcoming weekly patch release, which is expected to be rolled out on July 19, 2022.



VJ Vinitha Jeyakumar Syncfusion Team July 28, 2022 05:15 AM UTC

Still we are facing complexity in fixing the reported issue at our end and we will include the fix for the issue with our upcoming Vol 2 2022 SP release which is expected to rolled out on the mid of August 2022.



VJ Vinitha Jeyakumar Syncfusion Team August 10, 2022 10:16 AM UTC

Hi Bernd,


We are glad to announce that our Essential Studio 2022 Volume 2 SP release v20.2.0.43 is rolled out and is available for download under the following link.



We have also included the fix for the reported issue "Memory leak issue with Rich Text Editor component" with our Vol 2 2022 SP release. So please upgrade your package to the latest to resolve the issue from your end.


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you require any further assistance.


Regards,

Vinitha

Loader.
Up arrow icon