Error: Model is disposed! on Playground reload

Hello :slight_smile:

I cannot manage to find the exact pattern to reproduce the issue, but on the Playground, there is sometimes an error in console at reload (non blocking for the rest of the page, that’s why I never noticed…) It appears even more often when switching between TS and JS, but non only.

Uncaught (in promise) Error: Model is disposed!
    at Te._assertNotDisposed (textModel.js:210:19)
    at Te.getWordAtPosition (textModel.js:1539:14)
    at S._analyzeCodeAsync (monacoManager.ts:568:40)

It appears that it’s triggered by this line :

const wordInfo = model.getWordAtPosition(position);


1 Like

i’ll wrap those in happy tries and wonderful catches. Thanks for reporting! I can’t seem to reproduce, but I understand it happens.