emilast / vscode-logfile-highlighter

A Visual Studio Code extension for color highlighting log files
MIT License
192 stars 38 forks source link

[ExtensionListenerError] Extension 'emilast.LogFileHighlighter' FAILED to handle event: TypeError: Cannot read properties of undefined (reading 'visibleRanges') #613

Closed ThaDaVos closed 3 months ago

ThaDaVos commented 3 months ago

I am getting my extension host log spammed with these messages:

[error] Error: [ExtensionListenerError] Extension 'emilast.LogFileHighlighter' FAILED to handle event: TypeError: Cannot read properties of undefined (reading 'visibleRanges')
    at i.value (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:164:21030)
    at n.B (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:737)
    at n.C (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:807)
    at n.fire (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:1023)
    at c.$acceptEditorPropertiesChanged (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:156:34697)
    at E.S (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:151:5980)
    at E.Q (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:151:5746)
    at E.M (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:151:4778)
    at E.L (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:151:3605)
    at i.value (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:151:2297)
    at n.B (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:737)
    at n.fire (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:954)
    at s.fire (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:97:14453)
    at i.value (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:177:8655)
    at n.B (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:737)
    at n.fire (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:954)
    at s.fire (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:97:14453)
    at MessagePortMain.<anonymous> (@APPDATA@\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:177:6781)
    at MessagePortMain.emit (node:events:519:28)
    at Object.MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2285)
emilast commented 3 months ago

Thank you for reporting this, it will be investigated. Do you see any other problems than these log messages?

ThaDaVos commented 3 months ago

I haven't checked any further as I currently don't have logs available to highlight - but I can check

ThaDaVos commented 3 months ago

Just checked with the example log from the repo and it shows as follows when marked as "Log": afbeelding When marked as "Plain Text": afbeelding

So it seems the extension does nothing, but I may be wrong

ThaDaVos commented 3 months ago

Some info - it does this when switching files it seems - and when no file opened - it spams the log

emilast commented 3 months ago

Thanks, I'll have a look at this during the weekend.

emilast commented 3 months ago

I just released a bug fix for this and it should work in 3.3.1. Please reopen this bug if it doesn't as I've had problems repeating the error consistently.

emilast commented 3 months ago

Correction: 3.3.2 should contain the correct fix. HTH