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

Error "zed: @brackets token returned but no bracket defined as: )]" when pasting wide text #3052

Open
philrz opened this issue Apr 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@philrz
Copy link
Contributor

philrz commented Apr 19, 2024

Repro is with Zui commit f1aef59.

The attached Zed ciphers.txt includes a very wide line which I assume is the essential ingredient in this repro. As shown in the attached video, when I paste it into the editor, a large stack dump appears.

Repro.mp4

A paste of that same dump:

Unhandled Runtime Error
Error: zed: @brackets token returned but no bracket defined as: )]

Error: zed: @brackets token returned but no bracket defined as: )]
    at Object.b [as createError] (app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js:110:23371)
    at p._myTokenize (app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js:601:3828)
    at p._tokenize (app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js:600:53628)
    at p.tokenizeEncoded (app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js:600:53502)
    at c (app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js:595:116459)
    at t.updateTokensUntilLine (app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js:595:111127)
    at d._tokenizeOneInvalidLine (app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js:595:118031)
    at d._backgroundTokenizeForAtLeast1ms (app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js:595:117608)
    at h (app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js:595:117306)
    at d._backgroundTokenizeWithDeadline (app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js:595:117413)
    at app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js:595:117072

Call Stack
Object.b [as createError]
app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js (110:23371)
p._myTokenize
app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js (601:3828)
p._tokenize
app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js (600:53628)
p.tokenizeEncoded
app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js (600:53502)
c
app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js (595:116459)
t.updateTokensUntilLine
app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js (595:111127)
d._tokenizeOneInvalidLine
app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js (595:118031)
d._backgroundTokenizeForAtLeast1ms
app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js (595:117608)
h
app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js (595:117306)
d._backgroundTokenizeWithDeadline
app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js (595:117413)
<unknown>
app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js (595:117072)
<unknown>
app-asset://zui/node_modules/monaco-editor/min/vs/editor/editor.main.js (9:12)

As far as I can tell the program still made it in ok, and I also checked on the GA Zui v1.7.0 release and the error only shows up in DevTools. Therefore this may not be urgent to address since it may not be user-impacting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant