ctc-oss / omega-edit

Open source library for building editors that can handle massive files, and multiple viewports.
https://ctc-oss.github.io/omega-edit/
Apache License 2.0
8 stars 6 forks source link

`startServer` optional arguments causes VSCode thread errors #964

Open stricklandrbls opened 2 months ago

stricklandrbls commented 2 months ago

The startServer api call has the port and host as the only required arguments but when the logFile argument is undefined then VSCode logs extension thread failures to the debug console.

This also seems to have a temporal dependency on the setLogger api call which will also cause the logging thread to fail even if the logFile argument is populated.

Errors Logged

Error: the worker thread exited
    at Worker.T (/home/stricklr/Code/ctc/dfdl/daffodil-vscode/dist/ext/extension.js:33252:652240)
    at Worker.emit (node:events:514:28)
    at [kOnExit] (node:internal/worker:316:10)
    at Worker.<computed>.onexit (node:internal/worker:228:20)
    at Worker.callbackTrampoline (node:internal/async_hooks:130:17)
[asf.apache-daffodil-vscode]the worker thread exited
Error: the worker has exited
    at e.exports.write (/home/stricklr/Code/ctc/dfdl/daffodil-vscode/dist/ext/extension.js:33252:655195)
    at [pino.write] (/home/stricklr/Code/ctc/dfdl/daffodil-vscode/dist/ext/extension.js:33252:856645)
    at constructor.r [as debug] (/home/stricklr/Code/ctc/dfdl/daffodil-vscode/dist/ext/extension.js:33252:862411)
    at /home/stricklr/Code/ctc/dfdl/daffodil-vscode/dist/ext/extension.js:33252:676746
    at Generator.next (<anonymous>)
    at /home/stricklr/Code/ctc/dfdl/daffodil-vscode/dist/ext/extension.js:33252:672053
    at new Promise (<anonymous>)
    at o (/home/stricklr/Code/ctc/dfdl/daffodil-vscode/dist/ext/extension.js:33252:671798)
    at /home/stricklr/Code/ctc/dfdl/daffodil-vscode/dist/ext/extension.js:33252:676674
    at /home/stricklr/Code/ctc/dfdl/daffodil-vscode/dist/ext/extension.js:33252:677394
    at Generator.next (<anonymous>)
    at /home/stricklr/Code/ctc/dfdl/daffodil-vscode/dist/ext/extension.js:33252:672053
    at new Promise (<anonymous>)
    at o (/home/stricklr/Code/ctc/dfdl/daffodil-vscode/dist/ext/extension.js:33252:671798)
    at /home/stricklr/Code/ctc/dfdl/daffodil-vscode/dist/ext/extension.js:33252:676608
    at /home/stricklr/Code/ctc/dfdl/daffodil-vscode/dist/ext/extension.js:33252:677438
    at Generator.next (<anonymous>)
    at i (/home/stricklr/Code/ctc/dfdl/daffodil-vscode/dist/ext/extension.js:33252:671855)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

NOTE: In the last console output there's a reference to, what I'm assuming, the logger library pino.

These errors are repeated about 3 times and are always output following the serverStart call and just before the next debugger step in the extension.