Skip to content
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

Crashes extension host when parsing unescaped unicode characters, e.g 💩 #223

Closed
maxmilton opened this issue Oct 21, 2018 · 6 comments
Closed

Comments

@maxmilton
Copy link

When there are emoji unicode characters in the editor it causes the entire extension host to crash with the error:

Extension host terminated unexpectedly. Code:  null  Signal:  SIGSEGV

To reproduce, simply insert an emoji character into an editor with spell check enabled, e.g. 💩💩💩.

I tried to use spellright.ignoreRegExps option with a emoji matching regex from https://github.com/mathiasbynens/emoji-regex/blob/master/es2015/text.js but there was an error of a malformed regex.

@maxmilton maxmilton changed the title Crashes extension host when parsing unescaped unicode characters Crashes extension host when parsing unescaped unicode characters, e.g 💩 Oct 21, 2018
@bartosz-antosik
Copy link
Owner

bartosz-antosik commented Oct 21, 2018

Could you elaborate bit more about the problem, e.g. what document type? How does the crash of extension host manifests? What VSCodes version (regular or insiders)?

I have tried to reproduce it but it seems it does not reproduce the issue:

image

@maxmilton
Copy link
Author

maxmilton commented Oct 21, 2018

I done some more digging around trying to isolate the issue. Firstly some info:

OS: Ubuntu 18.10; Linux max-linux 4.18.0-10-generic #11-Ubuntu SMP Thu Oct 11 15:13:55 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
VS Code: On both stable v1.28.2 and insiders v1.29.0-insiders

Normally I work with the insiders build but I installed stable to debug so I had a clean install.

As it turns out, for small files the extension works as expected, however interesting things happen for larger files. In my quick tests openning a folder or workspace + a larger file results in a crash:

crash-in-folder

Also, when opening the file directly (no folder/worspace) it results in every word being marked as incorrect:

single-file

I suspect it would be for any document language type but I only tested plaintext, markdown, json.

For a sample document, please try this readme: https://raw.githubusercontent.com/WeAreGenki/minna-ui/master/README.md.

Not sure what's going on but it feels like the extension is hitting some resource constraint and VS Code kills it.

Please let me know if there's anything else I can provide to help debug.

@bartosz-antosik
Copy link
Owner

Thank you for investigation. The issue should be resolved in just published version 3.0.6. Please let me know if it works for you!

@maxmilton
Copy link
Author

Confirmed your fix has solved the issue. Thank you very much!

So nice to have spell check ❤️

@rhnvrm
Copy link

rhnvrm commented May 17, 2019

@bartosz-antosik - I have the same error, but for the flag emojis, for eg. 🇮🇳. For other emoji, it seems to work fine.

@maxmilton
Copy link
Author

That sounds like a different case. Instead of posting on a closed issue, please create a new one and provide a link back to old issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants