vscode icon indicating copy to clipboard operation
vscode copied to clipboard

OutputChannel.hide throws error

Open SamVerschueren opened this issue 11 years ago • 5 comments

It seems that OutputChannel.hide() is throwing an error when called.

This is the error I'm receiving:

{ exception: null,
  error: 
   { stack: 'TypeError: Cannot read property \'getVisibleEditors\' of undefined\n    at e.close (out/vs/workbench/workbench.main.js:1661:15751)\n    at t.e.handle (out/vs/workbench/workbench.main.js:1613:7048)\n    at a (out/vs/workbench/workbench.main.js:1594:19297)\n    at Object.h.handle (out/vs/workbench/workbench.main.js:1594:19861)\n    at out/vs/workbench/workbench.main.js:1675:13\n    at ChildProcess.<anonymous> (out/vs/workbench/workbench.main.js:1675:2055)\n    at emitTwo (events.js:87:13)\n    at ChildProcess.emit (events.js:172:7)\n    at handleMessage (internal/child_process.js:685:10)\n    at Pipe.channel.onread (internal/child_process.js:440:11)',
     message: 'TypeError: Cannot read property \'getVisibleEditors\' of undefined',
     count: 1 },
  promise: 
   { _oncancel: null,
     _nextState: null,
     _state: 
      { name: 'error',
        enter: [Function],
        cancel: [Function: r],
        done: null,
        then: null,
        _completed: [Function: r],
        _error: [Function: r],
        _notify: [Function: f],
        _progress: [Function: r],
        _setCompleteValue: [Function: r],
        _setErrorValue: [Function: r] },
     _value: 
      { stack: 'TypeError: Cannot read property \'getVisibleEditors\' of undefined\n    at e.close (out/vs/workbench/workbench.main.js:1661:15751)\n    at t.e.handle (out/vs/workbench/workbench.main.js:1613:7048)\n    at a (out/vs/workbench/workbench.main.js:1594:19297)\n    at Object.h.handle (out/vs/workbench/workbench.main.js:1594:19861)\n    at out/vs/workbench/workbench.main.js:1675:13\n    at ChildProcess.<anonymous> (out/vs/workbench/workbench.main.js:1675:2055)\n    at emitTwo (events.js:87:13)\n    at ChildProcess.emit (events.js:172:7)\n    at handleMessage (internal/child_process.js:685:10)\n    at Pipe.channel.onread (internal/child_process.js:440:11)',
        message: 'TypeError: Cannot read property \'getVisibleEditors\' of undefined',
        count: 1 },
     _isException: false,
     _errorId: 2,
     done: [Function],
     then: [Function] },
  handler: undefined,
  id: 2,
  parent: undefined }

// @bpasero

SamVerschueren avatar Nov 20 '15 20:11 SamVerschueren

@jrieken I can reproduce, somehow the MainThreadOutputService is created with an undefined editor service (the output service is there though).

bpasero avatar Nov 20 '15 21:11 bpasero

It's odd that it didn't popup in the closed beta phase. Never used .hide() though.

SamVerschueren avatar Nov 20 '15 21:11 SamVerschueren

Awesome! Great job.

SamVerschueren avatar Nov 22 '15 18:11 SamVerschueren

Has this fix been tested successfully? I'm running version 0.10.3 of the app which appears would contain the fix applied in c3094f3 but I still get the undefined error described in this issue when calling the OutputChannel.hide function.

natewallace avatar Dec 04 '15 19:12 natewallace

Fix should be in our upcoming December release.

bpasero avatar Dec 04 '15 22:12 bpasero