CodeWriter crashed when pasting not-so-large JSON text (2.5 MB)

Code Writer App Suggestions and Support Forum

Posted 2 years ago by Yusuf Adriansyah
Version: 3.2.0028
Avatar

I'm trying to paste JSON text to code writer. The app froze for a good 2 minutes, consuming 25% CPU of my core i5 desktop, and finally crashed.

Here's the JSON text if you want to try: https://1drv.ms/t/s!AoacpStztuSQ2LxnvZ8_bhbSxt4y4A

Comments (3)

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Yes, the problem with that file is that it's all a single line.  It's a bit complex to explain, but the editor in this scenario must measure and lay out the entire file's content, even though a small portion of it is being displayed in the view at a time.  It must do that to know the horizontal scrollbar range, etc.  My guess is that doing all this layout data at once perhaps caused an out of memory error.  There's no easy fix for this scenario (large one line file) on our end.  We will see if it can be improved through some refactoring in the future.

In the meantime, if you format the document to be multiple lines, that should help.


Actipro Software Support

Posted 2 years ago by Yusuf Adriansyah
Avatar

I see, so it's like a platform limitation. Not a bug then. Sorry for taking your time.

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Yusef,

The good news is that we make the custom code editor control (it's our product named SyntaxEditor) used in Code Writer.  So it might be something we can improve in the future somehow.  Just now sure at the moment the best way due to needing to lay out the whole line to determine the line's size, or all its view lines when word wrap is enabled.


Actipro Software Support

The latest build of this product (v3.3.0029) was released 5 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.