NRichtTextView Exceptions


https://www.nevron.com/Forum/Topic13011.aspx
Print Topic | Close Window

By Rob Panosh - 4 Years Ago
Hi,

When the NRichTextView is intiallially loaded I am getting a registry UnauthorizedAccessException. 

Then a bunch of System.IndexOutOfRangeException exceptions.  These exceptions slow down the opening of the control (first load) by about eight seconds.
See attached document for list of exceptions and glyph errors.  
Please advise ..
Thanks,
Rob
By Nevron Support - 4 Years Ago
Hi Rob,

Both exceptions are handled and will not cause problems for the normal operation of the control.

1. The first exception is caused by an attempt of the control to write a timestamp in the registry - we'll remove this attempt in the next release so it will not appear anymore.

2. The second type of exception is caused by the internal OpenType glyph grid fitting program interpreter. It simply executes an invalid glyph program and generates an index out of range exception. We've deliberately left indexing unchecked for performance reasons as the .NET runtime will check the indexing anyway, but will consider adding an option to have bounds checked indexing in the interpreter to avoid exceptions.

Please let us know if you have any questions or comments.
By Rob Panosh - 4 Years Ago
Hi, 
Thanks for the quick response.  I have been profiling our application using ants.  I noticed that I'm losing about 8 meg of memory every time I open/close your form with your control on it and I am explicitly calling dispose()..
Nevron.Nov.Internal is growing by 2 for each control instance.  See attached instance retention graph (png file).  Is there anything else I need to do to dispose/release the control?  Our form the control is on is getting released.
Thanks,
Rob


By Nevron Support - 4 Years Ago
Hi Rob,
What is the version you're currently using? There was indeed a memory leak related to the ribbon buttons icons that were holding a back reference to the control however that was fixed this year. Can you try to test with the latest release on whether the problem persists?
By Rob Panosh - 4 Years Ago
Here are the versions we are using.

https://www.nevron.com/forum/uploads/images/59c40fda-cd99-4c7b-ae97-cd92.jpg

Is this the latest?

Rob

By Rob Panosh - 4 Years Ago
I just download the latest and updated my references.

https://www.nevron.com/forum/uploads/images/5d0bb61c-baef-4f72-ad34-27b6.jpg

The leak still seems to be there.  This is REALLY a big deal for and causing issues with our release.

Rob
By Nevron Support - 4 Years Ago
Hi Rob,
Thank you for reporting this problem - it is fixed not and we'll upload an updated version by the end of the week. We'll keep you posted.
By Rob Panosh - 4 Years Ago
Thank You!

Rob
By Nevron Support - 4 Years Ago
Hi Rob,

As promised you can download the amended version from this link:

http://www.nevron.com/_AUTHOR/Res/Downloads/NOV/NovSetup2019_1.zip

We hope this fixes the issue - let us know if you still experience any problems.
By Rob Panosh - 4 Years Ago
I will test and get back to you.

Thanks,
Rob
By Rob Panosh - 4 Years Ago
Hi,
Unfortunately there still seems to be a leak.  To make sure I'm not doing something wrong I have attached the source for our user control.  I have also attached word document detailing the leak.

Let me know if you need anything else.

Thanks,
Rob
By Nevron Support - 4 Years Ago
Hi Rob,
Do you call Dispose on the form that you use to host the control? We tested again the control and if you call Dispose on the host form or on the control itself there is no retention. Let us know if this resolves the problem...
By Rob Panosh - 4 Years Ago
Since the user control is in the panel control collection it is not necessary to call dispose.


In my user control I am disposing the host (widget), which does get called.




Did you look at the source for my user control that I sent?  Does everything look okay to you?  I will retest to make sure my form isn't leaking elsewhere.

Thanks,
Rob

By Rob Panosh - 4 Years Ago
Additional Info ... attached is the html that we are loading in the control.  Maybe that is part of the issue ... just a thought.

Rob
By Rob Panosh - 4 Years Ago
I create a sample application that has our user control (you have the source) on it. 
https://www.nevron.com/forum/uploads/images/a89246b6-2e14-41e5-a9d0-a5cd.jpg

Then in the load I add some sample text
https://www.nevron.com/forum/uploads/images/e3669253-b718-4d2c-a9a3-ac69.jpg

Took base line memory snap shot and then open the form twice (baseline and snapshot 3)
https://www.nevron.com/forum/uploads/images/162201ab-612c-45a8-ac80-73c1.jpg

Here are some of the classes that keep growing.
https://www.nevron.com/forum/uploads/images/f34ea6c9-9f45-479b-8370-a0fd.jpg

Would you be willing to have a GoToMeeting show I can review these results?

Thanks,
Rob