-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Script Editor] Handle unexpected input more robustly #55
Comments
OK, I take it back: this has nothing to do with javascript syntax highlighting. Sorry for the wrong classification, @Squareys. From the stack trace, it is a bug in the ImageJ1 macro support, written awhile ago by Johannes. I am investigating! |
I cannot reproduce with the posted script. Maybe the In any case, I am closing this issue for now. If it comes up again, and someone can provide an MCVE to reproduce, then we will certainly fix it. |
@ctrueden This issue caught my interest, because a user has experienced the same issue with another script. I have, however, for testing purposes used the script from SO. The error does not appear every time I open the script, but it seems to happen more frequently after the script was executed and canceled. Opening it via File > Open Recent seems to increase the frequency of such errors occurring. I did about 30 runs in debug mode and caught the error several times. Every time, the issue was due to a comment. The end of a token (when the error occurred) during the tokenizing were somewhere way off, sometimes several lines below the actual end line of a comment. What still baffles me is that the behavior is not deterministic.. |
Based on this report on SO, the Script Editor may be fragile when it comes to unusual characters or syntax.
The error in question is:
And the script which caused it:
The text was updated successfully, but these errors were encountered: