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

ST added strange chars to content and crashed when reverting them via Sublime Merge #6501

Open
deathaxe opened this issue Sep 29, 2024 · 1 comment

Comments

@deathaxe
Copy link
Collaborator

Description of the bug

I just got hit by a very strange issue.

When running syntax tests after having added a new test cases to CSS/syntax_test_css.css, syntax test output displayed errors in syntax tests, certainly not modified by me.

Minidiff didn't display any changes on those lines, but Sublime Merge and git saw strange code points. SM displayed a little dot and ST displayed some chineese chars.

This is the 2nd time text content was manipulated in unwanted ways.

I would have ignored it, but then ST crashed when reverting the file via Sublime Merge.

After restarting, everything is fine again.

LSP and LSP-tailwind are active, but no auto-reformatting is configured when saving. Only diagnostics and completions are provided by language servers. I would have blamed them, but inconsistent minidiff and the crash tell me, that's something from core - if not a hardware based memory corruption.

Steps to reproduce

Can't find one.

Expected behavior

Keep content in-tact, don't crash.

Actual behavior

Content of untouched regions was modified with strange unicode chars, which lookes very much like a result of some corruption. Reverting via external tool crashed ST.

Sublime Text build number

4183

Operating system & version

Windows 11

(Linux) Desktop environment and/or window manager

No response

Additional information

No response

OpenGL context information

No response

@deathaxe
Copy link
Collaborator Author

Here we go again:

Out of a sudden, while working on a totally different piece of text, line in screenshot got manipulated. Note the strange chars in front of blue.

grafik

The line can't be copied to clipboard.

The modified text however also causes syntax tests to fail, so here's the output from build output:

Packages/Twig/Syntaxes/HTML/syntax_test_scopes.html.twig:2292:17
error: scope does not match
2292 |        color: {{ �Ƞblue|escape }} {# a comment #};
2299 | {#               ^^^^ variable.other.twig #}
     |                  ^^ these locations did not match
actual:
     |                  ^^     text.html.twig meta.template.twig source.css.embedded.html meta.template.twig meta.property-list.css meta.block.css meta.property-value.css meta.embedded.expression.twig source.twig.embedded 
     |                    ^^^^ text.html.twig meta.template.twig source.css.embedded.html meta.template.twig meta.property-list.css meta.block.css meta.property-value.css meta.embedded.expression.twig source.twig.embedded meta.path.twig variable.other.twig 

The repository is also open in Sublime Merge, but I wasn't touching it when it happened.

This time, both SM and ST's mini diff see document being modified.

grafik

Most recent actions included

  1. creation of various inherited syntax definitions for CSS/JS, in order to include them into HTML (Twig).
  2. editing syntax test assertions

The manipulated text appears about 60-80 lines before the chunk of code I was working on.

What's noteworthy is, I can undo changes until at some point the line becomes ok again.

grafik

The manipulated locateion contains a phantom before being broken. May something go wrong when updating phantoms, which breaks content? It's the only location in document with a phantom in document. Phantom is added by ColorHelper.

Text manipulations, I've seen before however, had no phantom next to it, IIRC.

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

1 participant