Theia: monaco editor hangs sometimes

Created on 31 Mar 2020  路  13Comments  路  Source: eclipse-theia/theia

I don't know how to reproduce, happens sporadically, following stack trace in logs:

RangeError: Maximum call stack size exceeded
    at e.fire (editor.main.js:115)
    at t.endDeferredEmit (editor.main.js:1241)
    at o.deltaDecorations (editor.main.js:1217)
    at e.deltaDecorations (debug-editor-model.ts:401)
    at e.renderBreakpoints (debug-editor-model.ts:180)
    at e.render (debug-editor-model.ts:175)
    at e.render (debug-editor-service.ts:77)
    at debug-editor-service.ts:54
    at event.ts:117
    at e.invoke (event.ts:125)
    at editor.main.js:30
editor.main.js:30 Uncaught Error: Maximum call stack size exceeded

It seems to be related to debugging.

It seems to be a regression from latest Monaco migration. cc @RomanNikitenko

bug critical debug monaco plug-in system

Most helpful comment

I鈥檓 going to run new version in Gitpod next week and if it is fine now. I will close this issue.

All 13 comments

I had something similar today. It was really really slow while typing and also the code suggestions were hanging a lot. Happened after a longer session of coding. I didn鈥榯 check for any logs though as I thought it might have been caused by my internet, but after reading this and having the migration in mind it could be related.
It was not related to debugging though.
I鈥檒l try to get more infos if it happens again.

I don't think it is a regression, nothing was changed in Theia or VS Code in these areas. Also still not clear how it could happen there is a guard preventing rendering breakpoints on breakpoint decorations changed. So probably Maximum call stack size exceeded is related to something else.

The user-facing effect/symptoms of this issue was that the editor became very very slow to the point that it would hang/barely respond at all to e.g. scrolling. Also, I did not see line numbers on the left-hand side anymore.

It seems that breakpoints serialization goes in endless recursion while we try to send them to the plugin host process. The original error is a follow-up.

@akosyakov
Maybe you noticed something common, some conditions/steps to reproduce it?
Did you have the same stack trace this time?

I'm going to test it tomorrow, so any info how to reproduce it would be helpful...
thanks in advance!

@RomanNikitenko I'm struggling to understand myself. I just see that logs are full of such errors on Gitpod staging environment and users complain about hanging UI.

@danidoedel But could it be that you had some breakpoints? Do you remember of what kind and how they were created? by you or provided by some VS Code extension?

I've noticed that there was a breaking change to URI brought by latest Monaco: https://github.com/microsoft/vscode/pull/83060

But in rest of Theia we still use [email protected] not 2.x which is aligned with a breaking change.

From logs it seems that an issue happens when we try to seralize/deserialize vscode URI. I suspect that for some Monaco URI (aligned with 2.x) we create old VS Code URI via string conversion and then it leads to some state which cannot be serialized properly.

The question is: what is a URI triggering it?

Switching to latest VS Code URI in Theia will be a good idea in anyway: https://github.com/eclipse-theia/theia/issues/7495

Switching to latest VS Code URI in Theia will be a good idea in anyway: #7495

Is the issue fixed by #7506?

I鈥檓 going to run new version in Gitpod next week and if it is fine now. I will close this issue.

@akosyakov This seems like an important issue. If confirmed fixed by #7506, should we do a 1.0.1 bugfix release ASAP that includes this commit?

@marcdumais-work I don't think new Monaco was a part of 1.0.0.

@marcdumais-work I don't think new Monaco was a part of 1.0.0.

Ah, right - that would be a big "bugfix" release. Nevermind

Was this page helpful?
0 / 5 - 0 ratings