Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

OS X close Oni window (but not quit) then open new file causes error #1193

Closed
familyfriendlymikey opened this issue Dec 27, 2017 · 2 comments · Fixed by #1241
Closed

OS X close Oni window (but not quit) then open new file causes error #1193

familyfriendlymikey opened this issue Dec 27, 2017 · 2 comments · Fixed by #1241

Comments

@familyfriendlymikey
Copy link

On OS X, If you close the Oni window (but don't quit it using CMD + Q or Oni > Exit) such that Oni is still running, and then go to Oni > New File (or Open File, or Open Folder), Oni will give this error:

A JavaScript error occurred in the main process

Uncaught Exception:
Error: Object has been destroyed
    at executeVimCommand (/Applications/Oni.app/Contents/Resources/app/lib/main/src/menu.js:19:54)
    at click (/Applications/Oni.app/Contents/Resources/app/lib/main/src/menu.js:67:21)
    at MenuItem.click (/Applications/Oni.app/Contents/Resources/electron.asar/browser/api/menu-item.js:52:9)
    at Function.executeCommand (/Applications/Oni.app/Contents/Resources/electron.asar/browser/api/menu.js:121:15)

Tested on a Macbook Pro 2015 (12, 1)

I looked through issues for someone else mentioning this error, but I couldn't find anything, so I apologize if this is a duplicate.

@benjamin-rood
Copy link

This is a real problem, experienced the same thing the whole time I have been using Oni on-and-off for the last few months.

@bryphe
Copy link
Member

bryphe commented Jan 3, 2018

Ah yes, thanks for logging this. It's related to #484 - we're not handling the menu state properly once the BrowserWindow has closed. We're keeping a handle to the old / destroyed BrowserWindow which isn't going to work too well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants