I've been experiencing periodic issues with Sublime Text 4 locking up when showing LSP popups, forcing me to kill and reopen the application. I've narrowed it down to minihtml trying to render the Typescript code block within the Markdown response from the Typescript language server.
It appears to be catastrophic backtracking from a regular expression in the syntax highlighter. Here's a snippet from the stack trace:
The => at the end of the content string triggers the catastrophic backtracking.
I've also run it with isolated FORMAT_MARKED_STRING and FORMAT_MARKUP_CONTENT flags, and both trigger a freeze. I also explored possible undocumented flags (1, 8 and 16) which don't freeze but also don't output anything.
Here is the complete content returned by tssserver:
Recent dev builds have received several backtracking bugfixes which have been known to cause lockups especially in TypeScript. Does it still happen with ST4150?
Description of the bug
I've been experiencing periodic issues with Sublime Text 4 locking up when showing LSP popups, forcing me to kill and reopen the application. I've narrowed it down to
minihtml
trying to render the Typescript code block within the Markdown response from the Typescript language server.It appears to be catastrophic backtracking from a regular expression in the syntax highlighter. Here's a snippet from the stack trace:
Here is the code that causes the hang:
The
=>
at the end of the content string triggers the catastrophic backtracking.I've also run it with isolated
FORMAT_MARKED_STRING
andFORMAT_MARKUP_CONTENT
flags, and both trigger a freeze. I also explored possible undocumented flags (1, 8 and 16) which don't freeze but also don't output anything.Here is the complete content returned by
tssserver
:Steps to reproduce
Expected behavior
Sublime Text should not lock up.
Possible solutions:
Actual behavior
Sublime Text completely freezes forcing it to be killed.
Sublime Text build number
4143
Operating system & version
macOS Ventura 13.4
(Linux) Desktop environment and/or window manager
No response
Additional information
No response
OpenGL context information