oni icon indicating copy to clipboard operation
oni copied to clipboard

Unhandled Exception when switching back and forth between sidebar and vim-startify buffer

Open dkns opened this issue 8 years ago • 1 comments

Oni Version: 3.4 Neovim Version (Linux only): 3.0dev Operating System: Ubuntu 16.04

Describe your issue

Neovim instance crashes/hangs when switching to vim startify (https://github.com/mhinz/vim-startify) buffer from sidebar. Oni itself is responsive i.e. I can access menu items, sidebar etc. but main editing window with neovim is dead. Doesn't respond to any input etc.

Expected behaviour

Oni continues to work as usual.

Actual behaviour

Editing buffer dosen't respond to any input/commands.

Steps to reproduce

I'm not sure if this is issue with only startify or something else with my setup but basically I open oni, signify buffer is displayed, I switch to sidebar, back again to signify and it hangs.

I have also these keybinds in oni config:

    oni.input.bind("<c-h>", function () {
        return oni.editors.activeEditor.neovim.command("call OniNextWindow('h')<CR>");
    });
    oni.input.bind("<c-j>", function () {
        return oni.editors.activeEditor.neovim.command("call OniNextWindow('j')<CR>");
    });
    oni.input.bind("<c-k>", function () {
        return oni.editors.activeEditor.neovim.command("call OniNextWindow('k')<CR>");
    });
    oni.input.bind("<c-l>", function () {
        return oni.editors.activeEditor.neovim.command("call OniNextWindow('l')<CR>");
    });

Here's the error message from DevTools:

Received notification for - Unhandled Exception:TypeError: Cannot read property 'filePath' of undefined
Please report this error. Callstack: TypeError: Cannot read property 'filePath' of undefined
    at buffers.map.b (/opt/Oni/resources/app/vim/core/oni-plugin-buffers/index.js:20:35)
    at Array.map (native)
    at updateBufferList (/opt/Oni/resources/app/vim/core/oni-plugin-buffers/index.js:19:41)
    at EventEmitter.Oni.editors.activeEditor.onBufferEnter.subscribe (/opt/Oni/resources/app/vim/core/oni-plugin-buffers/index.js:108:60)
    at emitOne (events.js:120:20)
    at EventEmitter.emit (events.js:210:7)
    at t.Event.dispatch (file:///opt/Oni/resources/app/lib/browser/vendor.bundle.js:429:9012)
    at eo.notifyBufferEnter (file:///opt/Oni/resources/app/lib/browser/vendor.bundle.js:743:100232)
    at eo.enter (file:///opt/Oni/resources/app/lib/browser/vendor.bundle.js:964:35530)
    at $.enter (file:///opt/Oni/resources/app/lib/browser/20.bundle.js:46:2969)

Uncaught TypeError: Cannot read property 'filePath' of undefined
    at buffers.map.b (/opt/Oni/resources/app/vim/core/oni-plugin-buffers/index.js:20:35)
    at Array.map (native)
    at updateBufferList (/opt/Oni/resources/app/vim/core/oni-plugin-buffers/index.js:19:41)
    at EventEmitter.Oni.editors.activeEditor.onBufferEnter.subscribe (/opt/Oni/resources/app/vim/core/oni-plugin-buffers/index.js:108:60)
    at emitOne (events.js:120:20)
    at EventEmitter.emit (events.js:210:7)
    at t.Event.dispatch (file:///opt/Oni/resources/app/lib/browser/vendor.bundle.js:429:9012)
    at eo.notifyBufferEnter (file:///opt/Oni/resources/app/lib/browser/vendor.bundle.js:743:100232)
    at eo.enter (file:///opt/Oni/resources/app/lib/browser/vendor.bundle.js:964:35530)
    at $.enter (file:///opt/Oni/resources/app/lib/browser/20.bundle.js:46:2969)

dkns avatar Jun 02 '18 20:06 dkns

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

oni-bot avatar Jun 02 '18 20:06 oni-bot