-
-
Notifications
You must be signed in to change notification settings - Fork 682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After waking up computer from Sleep, Macvim will try to close #1459
Comments
That's weird. Never had that happen to me before. What kind of computer do you have (MacBook, Mac Mini, Apple Silicon versus Intel, year of your model, etc)? Do you have any apps installed that could interfere with keyboard / etc (e.g. BetterTouchTool)? Do you have any externally connected devices? The popup seems to indicate something actually caused MacVim to be closed rather than a crash. I'm imagining when this happens, you have no unsaved files? (Since unsaved files should have caused a popup) Do it happen every time? Or sporadically? Any plugins you are using? Trace back events… Hmm, if debug logs don't prove useful, I'm not sure. This may need some research. It should be possible in theory. I would like to make sure I understand the nature of the issue first though (per my above questions). |
Hi Ychin,
I have a 2020 MacBook using Intel.
I do. I use hammerspoon hmmm
It happens without any externally connected devices.
It happens everytime. |
I forgot to add the logs... my bad. for macvim-clean-logs, I started mvim with --clean and waited 10min after locking the computer at 10:34. |
After a bit more troubleshooting, it seems to happen only when the MacVim window is hidden. To reproduce:
|
How much memory do you have on your Mac? Do you tend to run up against memory pressure? I think this is due to Sudden Termination which I was surprised to see that MacVim isn't turning off for itself, but I just want to make sure that's the case. |
Sorry for the delayed answser @ychin |
I have been looking at this and I can't reproduce it. From what I can gather, macOS just decides to terminate MacVim. There is a feature called Automatic Termination but MacVim isn't using it so we shouldn't be randomly killed like that. One blog post I found did suggest that this may happen if you are low on disk space, macOS will start purging cache files and somehow that will also kill hidden apps (with no way of configuring it). Would you happen to be low on storage space? Other than that I can only imagine that Hammerspoon is having a bad interaction with MacVim here. You could try disabling it to see if it still happens. |
The same thing has started happening to me in the past week or so. @R0GG did you ever track it down? Did it ever stop? (I'm not low on disk space and I don't use Hammerspoon, so neither of those would be the cause for me.) |
I have been experiencing the same thing since at least the beginning of January 2024 on both r178 and r179. Every time I wake my Mac I see the dialog:
… or MacVim simply isn't running anymore if all the buffers were saved before my Mac went to sleep. It happens even after a fresh boot when I have multiple gigabytes of free memory. If I can help to debug this, please let me know. I run into this issue multiple times a day. And thanks, @ychin, for all your work on MacVim! |
That's not good. What kind of computer do you have @ronen ? I have not been able to replicate this but I have an M1 Max so it's not apples-to-apples. Let me think about it a little and see if there are better ways to gather the info or push out a pre-release build with the relevant data that we can gather. |
hi @ychin, thanks for looking into it (and for everything MacVim :) I'm running MacVim r179 (Vim 9.1.0), and here's my sys info:
That said, I found this reddit thread from 2 years ago: Mac randomly closing apps when sleeping -- no mention of MacVim but similar behavior for other seemingly random collection of apps including some of Apple's own apps. The only solution offered in that thread is to reinstall the OS. As it turns out I've got an upgrade to 14.4 waiting on deck, so I'll let that install and see if this behavior then goes away :) |
Hi @ronen I confirm I don't have this issue anymore. It disappeared without me realizing it ... |
And the issue is back again ... I'm on a corporate laptop so I wonder if it is caused by security toolings ... |
• macvim-dev/macvim#1459 ↳ After waking up computer from sleep, MacVim will try to close
Steps to reproduce
Open a file with MacVim
Lock computer and wait 5-10min
Unlock computer
Macvim will be either closed or a popup will appear to confirm if you want to close MacVim with unsaved buffers.
Expected behaviour
I expect MacVim to no close itself.
This only happen with MacVim hence I think it is an issue with MacVim...
I've tried to look at debug logs but I don't see anything useful.
Maybe you guys have an idea how to trace back the event that was sent to MacVim ?
Version of Vim and architecture
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep 12 2023 09:31:27) macOS version - x86_64 Included patches: 1-1897 Compiled by GitHub Actions
MacVim r178 (Vim 9.0.1897)
Environment
MacOs Sonoma 14.1.1 (23B81)
Iterm
How MacVim was installed
Downloaded last release via Github
Logs and stack traces
No response
Vim configuration where issue is reproducable
No response
Issue has been tested with given configuration
Issue has been tested with no configuration
mvim --clean
(orgvim
, supplied by MacVim distribution)vim --clean
(in terminal, supplied by MacVim distribution)vim --clean
(in terminal, other suppliers, e.g. /usr/bin/vim)Other conditions
The text was updated successfully, but these errors were encountered: