Crash after copy paste and enter

SyntaxEditor for WPF Forum

Posted 5 months ago by Xinen Lee
Version: 19.1.0680
Platform: .NET Core 3.0
Environment: Windows 10 (64-bit)
Avatar

We are using 622 but I am able to reproduce on your sample browser for build 680.

To reproduce:

1. Open the 12.IndentProvider sample.

2. Below the existing comments, type in 

/*

*/

3. In between the typed in comment start/end, paste the following line of 'a's so it looks like this:

/*

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

*/

4. Place cursor somewhere in the middle of the 'a's and press enter. (does not work if you place cursor too in front/behind, must be somewhere in middle)

5. Crash happens because the Reader.Token is null and GetIndentAmount() needs it

[Modified 5 months ago]

Comments (5)

Answer - Posted 5 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Xinen,

Thanks for reporting this.  We found the problem and fixed it for the next build.


Actipro Software Support

Posted 5 months ago by Xinen Lee
Avatar

Thanks for your quick response. Can I confirm that you have fixed the root of the problem (that the Tokens are not set for that range) and not just avoided the crash by checking for null tokens?

Posted 5 months ago by Xinen Lee
Avatar

Also, what can we do on our end to alleviate this issue? Is there any workaround/fix we can use without waiting for a new build?

Posted 5 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Yes, we fixed the core issue where the data that allows incremental lexing to pick up at a line wasn't updating properly when typing in a long complete-line token.  We didn't change anything to look for null tokens, since there shouldn't really be any if this is working properly.

I believe the scenario occurs when on a token that spans before and after the current line only.  Unfortunately the fix is a one-line change internal to our code within the lexical parsing context mechanism.  The only workaround you could do would be to not use multi-line tokens.  But we hope to get out a new 2019.1 maintenance release in the next several days.


Actipro Software Support

Posted 5 months ago by Xinen Lee
Avatar

Thanks!

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.