Skip to content

Launching MacVim.app shows no window #1062

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

Closed
latortuga opened this issue Jul 22, 2020 · 19 comments
Closed

Launching MacVim.app shows no window #1062

latortuga opened this issue Jul 22, 2020 · 19 comments

Comments

@latortuga
Copy link

latortuga commented Jul 22, 2020

This is basically the same report as #109 and #66 except that nothing in those issues seems to work for me. I've tried lots of combinations of restarting, pref deleting, opening with sudo, etc. The symptom is exactly the same: click MacVim in the dock, app is open, no window appears. This started happening to me yesterday and I don't think it really coincides with any big changes except perhaps a macOS minor version update.

To Reproduce

Detailed steps to reproduce the behavior:

  1. Open MacVim by clicking on the icon in my dock
  2. No window, and at this point my laptop starts to take off into orbit. Fan speed goes up and CPU pegs.

Expected behavior
A window appears.

Environment (please complete the following information):

$ vim --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Nov  6 2019 08:27:54)
macOS version
Included patches: 1-2250
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl               -farsi             -mouse_sysmouse    -tag_any_white
+arabic            +file_in_path      +mouse_urxvt       -tcl
+autocmd           +find_in_path      +mouse_xterm       +termguicolors
+autochdir         +float             +multi_byte        +terminal
-autoservername    +folding           +multi_lang        +terminfo
-balloon_eval      -footer            -mzscheme          +termresponse
+balloon_eval_term +fork()            +netbeans_intg     +textobjects
-browse            +gettext           +num64             +textprop
++builtin_terms    -hangul_input      +packages          +timers
+byte_offset       +iconv             +path_extra        +title
+channel           +insert_expand     +perl              -toolbar
+cindent           +job               +persistent_undo   +user_commands
-clientserver      +jumplist          +postscript        +vartabs
+clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +virtualedit
+cmdline_hist      +langmap           -python            +visual
+cmdline_info      +libcall           +python3           +visualextra
+comments          +linebreak         +quickfix          +viminfo
+conceal           +lispindent        +reltime           +vreplace
+cryptv            +listcmds          +rightleft         +wildignore
+cscope            +localmap          +ruby              +wildmenu
+cursorbind        +lua               +scrollbind        +windows
+cursorshape       +menu              +signs             +writebackup
+dialog_con        +mksession         +smartindent       -X11
+diff              +modify_fname      -sound             -xfontset
+digraphs          +mouse             +spell             -xim
-dnd               -mouseshape        +startuptime       -xpm
-ebcdic            +mouse_dec         +statusline        -xsmp
+emacs_tags        -mouse_gpm         -sun_workshop      -xterm_clipboard
+eval              -mouse_jsbterm     +syntax            -xterm_save
+ex_extra          +mouse_netterm     +tag_binary
+extra_search      +mouse_sgr         -tag_old_static
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X -DMACOS_X_DARWIN  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang   -L. -fstack-protector-strong -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/[email protected]/lib -L/usr/local/opt/readline/lib  -L/usr/local/lib -o vim        -lncurses -liconv -lintl -framework AppKit  -L/usr/local/opt/lua/lib -llua5.3 -mmacosx-version-min=10.14 -fstack-protector-strong -L/usr/local/lib  -L/usr/local/Cellar/perl/5.30.0/lib/perl5/5.30.0/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc  -L/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/config-3.7m-darwin -lpython3.7m -framework CoreFoundation  -lruby.2.6
  • macOS Catalina 10.15.6
  • Terminal: GUI macvim, but I use iTerm2 day to day and cmd line vim works fine

Additional context
I'm willing to help troubleshoot but I don't even know where to start.

Screenshots
Here's what happens immediately after launching MacVim:

Screen Shot 2020-07-21 at 9 40 27 PM

Forcefully killing that Vim process (had to sudo kill -9) causes immediate relief for my CPU and lap.

@mplough
Copy link

mplough commented Jul 22, 2020

A few questions that might help narrow things down. These probably sound tedious but they'll help us make sure that we're talking about the same things.

First, the "have you tried turning it off and on again" question:

  • What happens when you delete MacVim and install the latest release? It's also possible to install MacVim from Homebrew, but let's try the direct one first.

To confirm what resets of preference files means:

  • What do your ~/.vimrc file, ~/.gvimrc file, and ~/.vim folder look like? Does the issue persist when you delete them or move them out of ~? What about after defaults delete org.vim.MacVim?

To compare what happens with different vim executables:

  • Looks like you're using Homebrew's vim. To 100% confirm, what's the output of which vim?
  • What happens when you run the Vim that ships with macOS? (in your terminal, run /usr/bin/vim)

To check if there's something weird with the GUI component or if it's all of MacVim:

  • What happens when you run the console vim that ships inside MacVim? (in your terminal, run /Applications/MacVim.app/Contents/MacOS/Vim)

Hope that helps kickstart the troubleshooting process. Another thing to try is to start up MacVim and then run a Sample from the process info window in the Activity Monitor. That'll help see if it's caught in an infinite loop somewhere.

@latortuga
Copy link
Author

latortuga commented Jul 23, 2020

@mplough thanks so much for the detailed steps, I'll do my best to address them all.

  • I have tried restarting my computer (basic turn it off and on again)
  • I have tried uninstalling and installing the latest release directly downloaded from Github releases.

Aha! If I move all vim-related files out of my home directory, MacVim starts successfully! I moved them back in one at a time and it seems like it's got to be one of my plugins that's causing the issue. I put back ~/.vimrc, ~/.gvimrc and ~/.viminfo and it still works fine. I use vundle so all my vim plugins are in ~/.vim/ and adding that back causes the hang. Narrowing down which plugin may be a fun game to play. I'll report back when I've had a chance to test.

  • Incidentally, I did try running the console vim that ships inside MacVim before I tried the config file elimination suggestion and had the same "no window" behavior.

@latortuga
Copy link
Author

latortuga commented Jul 23, 2020

I isolated the plugin, it's powerline that's causing it for me. I haven't resolved why yet, but it's definitely the culprit. Thank you @mplough !

Edit to add: The reason I didn't notice it right away is because 1. command line vim seems unaffected and is my primary daily driver and 2. I only sporadically update my plugins and only occasionally close+reopen MacVim. I had updated my plugins several days prior so I didn't connect them.

@eirnym
Copy link
Contributor

eirnym commented Jul 24, 2020

@latortuga I use airline plugin for years and have no problems, you can try it as well

@ychin
Copy link
Member

ychin commented Jul 27, 2020

Actually @latortuga , I think your version of MacVim is quite old (8.1.2250). You may want to update to the latest version first. The plugin may work.

@latortuga
Copy link
Author

Actually @latortuga , I think your version of MacVim is quite old (8.1.2250). You may want to update to the latest version first. The plugin may work.

I posted in the ticket the result of vim --version which is command-line vim, which I believe I have installed via Homebrew. My MacVim version is 8.2.539 (163) which is the latest.

@ychin
Copy link
Member

ychin commented Aug 11, 2020

Just re-opening to track this issue in case we want to look into it. I may re-close in future if it is not bothering you and we haven't diagnosed the issue.

@ychin ychin reopened this Aug 11, 2020
@stona1
Copy link

stona1 commented Aug 13, 2020

Today I updated on my two Mac's (Catalina 10.15.6) MacVim to version 8.2.1424 and on both shows no window after start. I did:

  • removed all plugins from my .vim folder
  • removed .vimrc file
  • removed MacVim and installed it again (from https://github.com/macvim-dev/macvim/releases)
  • .gvimrc file does not exist in my system
  • which vim shows: /usr/bin/vim
    Nothing solved my problem, still now windows.
    In terminal Vim is working OK.
    Any ideas what to do?

@ychin
Copy link
Member

ychin commented Aug 13, 2020

Hmm @stona1 is this a new issue for you? As in you updated from old to new (version 164) and it went from working fine to broken?

What does defaults read org.vim.MacVim | grep MM show?

Also, have you tried launching it with --clean? You can do this by doing /Applications/MacVim.app/Contents/bin/vim -g --clean

@stona1
Copy link

stona1 commented Aug 13, 2020

Hi ychin,
Yes, it is completely new issue for me. I have never had it before. I was using MacVim even today without aby problem. 20 minus ago MacVim show update availability and my problem begins :)
Command defaults read org.vim.MacVim | grep MM shows:
MMAppearanceModeSelection = 2;
MMAutosaveColumns = 142;
MMAutosaveRows = 42;
MMCurrentPreferencePane = General;
MMLastWindowClosedBehavior = 2;
MMTopLeftPoint = "{87, 420}";

Command: /Applications/MacVim.app/Contents/bin/vim -g --clean shows:
dyld: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
Referenced from: /Applications/MacVim.app/Contents/MacOS/Vim
Reason: image not found
[1] 966 abort /Applications/MacVim.app/Contents/bin/vim -g --clean

So it seems like some library is not loaded.
Hope it will help.

@ychin
Copy link
Member

ychin commented Aug 13, 2020

Huh that's not good. I'll revoke the current build for now while I figure this out.

@ychin
Copy link
Member

ychin commented Aug 13, 2020

Also, if you have Homebrew, you can do brew install gettext to work around the issue as well.

@stona1
Copy link

stona1 commented Aug 13, 2020

I am sorry I am not using Homebrew. Is any other way to work around this issue?
When new build will be available?

@ychin
Copy link
Member

ychin commented Aug 13, 2020

You can work around this by downloading 163 manually from https://github.com/macvim-dev/macvim/releases. I will need to figure out how to work around the issue before I can release 165, so I don't know when yet. Probably a couple days.

@ychin
Copy link
Member

ychin commented Aug 13, 2020

Btw just to confirm, you downloaded the new version using the built-in updater right?

@stona1
Copy link

stona1 commented Aug 13, 2020

Yes, exactly.

@ychin
Copy link
Member

ychin commented Aug 13, 2020

I'm going to use #1073 to track the linkage issue that broke 164, since this issue was for something else. Also, thanks for reporting so quickly! The bad build was only out for 2 hours which hopefully minimized the damage somewhat.

@stona1
Copy link

stona1 commented Aug 13, 2020

OK, I will watch #1073
Glad to be helpful.

@ychin
Copy link
Member

ychin commented Aug 15, 2020

I'm closing this issue for now. If you run into this again, @latortuga , it's likely that MacVim is crashing. You could launch it from the console using the mvim command to get some extra printouts, or use Console.app to help look at application logs (just search for "MacVim" to filter down).

@ychin ychin closed this as completed Aug 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants