ashersyed / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

Cannot open new windows on multiple computers, multiple OS X versions #363

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When I run MacVim from OS X directly (not via command line) I cannot open new 
windows or open any files. If I run mvim after MacVim is open, then I get a new 
window. Also, if I start MacVim.app from the command line, then it works.

With debugging enabled, there is no message written to the console when the new 
window command fails.

I've tried this with completely fresh installs, no settings, no plists on three 
computers - one OS X 10.6, two OS X 10.7. Additionally, I've tried this with 
snapshots 59, 60, 61 and compiling from source with 61. This issue started a 
few weeks ago.

I'm not sure why I seem to be the only one with this issue.
For now, I'm working around this by launching from the command line, but this 
is not ideal.

Original issue reported on code.google.com by syx...@gmail.com on 29 Aug 2011 at 11:48

GoogleCodeExporter commented 9 years ago
I have not come across this problem.  Could you perhaps send me the output from 
the debug log [1]?  Those instructions start from Terminal, so you'll have to 
modify those instructions somewhat and capture the output from Console.app 
instead.

[1] https://github.com/b4winckler/macvim/wiki/Debugging

Original comment by bjorn.winckler@gmail.com on 29 Aug 2011 at 3:27

GoogleCodeExporter commented 9 years ago
That is part of the problem. I have done all the debug steps and there is no 
error message written to Console. Here is an example of starting MacVim.app and 
pressing Command-N:

8/29/11 5:33:52 PM  [0x0-0x4d57d53].org.vim.MacVim[82513]   Mon Aug 29 17:33:52 
lggmac15.local MacVim[82513] <Debug>: -[MMAppController 
applicationOpenUntitledFile:]@450: Opening untitled window...

8/29/11 5:33:52 PM  [0x0-0x4d57d53].org.vim.MacVim[82513]   Mon Aug 29 17:33:52 
lggmac15.local MacVim[82513] <Debug>: -[MMAppController newWindow:]@1041: Open 
new window

8/29/11 5:33:52 PM  [0x0-0x4d57d53].org.vim.MacVim[82513]   Mon Aug 29 17:33:52 
lggmac15.local MacVim[82513] <Debug>: -[MMAppController(Private) 
executeInLoginShell:arguments:]@2193: new process pid=82515 (count=1)

8/29/11 5:33:52 PM  [0x0-0x4d57d53].org.vim.MacVim[82513]   Mon Aug 29 17:33:52 
lggmac15.local MacVim[82513] <Info>: -[MMAppController 
applicationDidFinishLaunching:]@397: MacVim finished launching

8/29/11 5:34:59 PM  [0x0-0x4d57d53].org.vim.MacVim[82513]   Mon Aug 29 17:34:59 
lggmac15.local MacVim[82513] <Debug>: -[MMAppController newWindow:]@1041: Open 
new window

8/29/11 5:34:59 PM  [0x0-0x4d57d53].org.vim.MacVim[82513]   Mon Aug 29 17:34:59 
lggmac15.local MacVim[82513] <Debug>: -[MMAppController(Private) 
executeInLoginShell:arguments:]@2193: new process pid=82521 (count=2)

... And that's it. No new window.

The count does go up each time so perhaps the processes are launching but 
nothing is shown...

The weird thing is that this is happening in each of my computers. I thought it 
was due to compilation with Homebrew, but it happens in snapshot binaries as 
well.

Original comment by syx...@gmail.com on 29 Aug 2011 at 3:36

GoogleCodeExporter commented 9 years ago
Is that really a full debug log?  There should be heaps more messages.

Original comment by bjorn.winckler@gmail.com on 29 Aug 2011 at 3:56

GoogleCodeExporter commented 9 years ago
That's all I'm getting to Console.
Maybe because I can't launch it with -g in the GUI?

8/29/11 5:59:01 PM  [0x0-0x4d57d53].org.vim.MacVim[82513]   Mon Aug 29 17:59:01 
lggmac15.local MacVim[82513] <Debug>: -[MMAppController(Private) 
reapChildProcesses:]@2212: Wait for pid=82522 complete
8/29/11 5:59:01 PM  [0x0-0x4d57d53].org.vim.MacVim[82513]   Mon Aug 29 17:59:01 
lggmac15.local MacVim[82513] <Debug>: -[MMAppController(Private) 
reapChildProcesses:]@2212: Wait for pid=82521 complete
8/29/11 5:59:01 PM  [0x0-0x4d57d53].org.vim.MacVim[82513]   Mon Aug 29 17:59:01 
lggmac15.local MacVim[82513] <Debug>: -[MMAppController(Private) 
reapChildProcesses:]@2212: Wait for pid=82515 complete
8/29/11 5:59:10 PM  [0x0-0x4d65d61].org.vim.MacVim[84476]   Mon Aug 29 17:59:10 
lggmac15.local MacVim[84476] <Debug>: -[MMAppController 
applicationOpenUntitledFile:]@450: Opening untitled window...
8/29/11 5:59:10 PM  [0x0-0x4d65d61].org.vim.MacVim[84476]   Mon Aug 29 17:59:10 
lggmac15.local MacVim[84476] <Debug>: -[MMAppController newWindow:]@1041: Open 
new window
8/29/11 5:59:10 PM  [0x0-0x4d65d61].org.vim.MacVim[84476]   Mon Aug 29 17:59:10 
lggmac15.local MacVim[84476] <Debug>: -[MMAppController(Private) 
executeInLoginShell:arguments:]@2193: new process pid=84478 (count=1)
8/29/11 5:59:10 PM  [0x0-0x4d65d61].org.vim.MacVim[84476]   Mon Aug 29 17:59:10 
lggmac15.local MacVim[84476] <Info>: -[MMAppController 
applicationDidFinishLaunching:]@397: MacVim finished launching
8/29/11 5:59:22 PM  [0x0-0x4d65d61].org.vim.MacVim[84476]   Mon Aug 29 17:59:22 
lggmac15.local MacVim[84476] <Debug>: -[MMAppController newWindow:]@1041: Open 
new window
8/29/11 5:59:22 PM  [0x0-0x4d65d61].org.vim.MacVim[84476]   Mon Aug 29 17:59:22 
lggmac15.local MacVim[84476] <Debug>: -[MMAppController(Private) 
executeInLoginShell:arguments:]@2193: new process pid=84479 (count=2)

Original comment by syx...@gmail.com on 29 Aug 2011 at 4:00

GoogleCodeExporter commented 9 years ago
And when opening a file...
8/29/11 6:02:15 PM  [0x0-0x4d6ad66].org.vim.MacVim[84573]   Mon Aug 29 18:02:15 
lggmac15.local MacVim[84573] <Debug>: -[MMAppController fileOpen:]@1062: Show 
file open panel
8/29/11 6:02:18 PM  [0x0-0x4d6ad66].org.vim.MacVim[84573]   Mon Aug 29 18:02:18 
lggmac15.local MacVim[84573] <Info>: -[MMAppController 
application:openFiles:]@457: Opening files (
8/29/11 6:02:18 PM  [0x0-0x4d6ad66].org.vim.MacVim[84573]           
"/Users/me/file.test"
8/29/11 6:02:18 PM  [0x0-0x4d6ad66].org.vim.MacVim[84573]       )
8/29/11 6:02:18 PM  [0x0-0x4d6ad66].org.vim.MacVim[84573]   Mon Aug 29 18:02:18 
lggmac15.local MacVim[84573] <Debug>: -[MMAppController(Private) 
executeInLoginShell:arguments:]@2193: new process pid=84591 (count=3)

Original comment by syx...@gmail.com on 29 Aug 2011 at 4:03

GoogleCodeExporter commented 9 years ago
It is surprising that there are no more logs.

Not sure what I can do about this since I can't reproduce.  Lets leave this 
issue open and see if anybody else reports similar problems.

Do you by any chance have some other software or device drivers which may 
interfere?  In the past, Logitech drivers caused a similar issue.  Another 
thing to watch out for are utilities which inject code (like SIMBL etc.).

Original comment by bjorn.winckler@gmail.com on 29 Aug 2011 at 6:01

GoogleCodeExporter commented 9 years ago
I got this issue at least 5 times. It happened randomly, till now I have not 
know how to reproduce it. I am using the latest version of MacVim(VIM - Vi 
IMproved 7.3 (2010 Aug 15, compiled Sep 18 2011 16:19:12). I have no SIMBL 
installed. 

Thanks

Original comment by linsong....@gmail.com on 18 Nov 2011 at 7:26

GoogleCodeExporter commented 9 years ago
I reported in issue 384 that I cannot get MacVim to render a window AT ALL. 
Back then I was using snapshot 62, now I'm using snapshot 63, and still no 
change. I have also attempted to compile macvim from brew and I get exactly the 
same result. No matter what version of macvim I use, I cannot get a separate 
rendered window.

The compiled snapshot simply doesn't do anything, no matter what.

I can at least use brew's macvim in my terminal.

Even more frustrating, I cannot get any error output. The -g flag does nothing.

I'm running a fully upgraded Mac OS Lion 10.7.2.

Original comment by iamdamoc...@gmail.com on 28 Nov 2011 at 4:52

GoogleCodeExporter commented 9 years ago
I have the same exact issue, Lion 10.7.2, installed snapshot 57 via Homebrew. 
Can't get any windows to render. 

Original comment by glass...@gmail.com on 28 Nov 2011 at 6:32

GoogleCodeExporter commented 9 years ago
I actually have an update on this, sorry I didn't post earlier. I reset all my 
vim settings, not just ~/.vim but  /usr/share/vim/vim73/ to the default, and 
this worked. Then, I added in all my vim plugins one by one. None of them 
caused the problem again, so I'm guessing it was something wrong in 
/usr/share/vim.

Hope this helps.

Original comment by syx...@gmail.com on 28 Nov 2011 at 8:03

GoogleCodeExporter commented 9 years ago
I have already tried eliminating anything and everything like that myself ... 
and I haven't even tried installing any extensions! Still no dice. My install 
-- as far as vim/MacVim is concerned -- is pristine. But it still doesn't work.

Original comment by iamdamoc...@gmail.com on 28 Nov 2011 at 8:54

GoogleCodeExporter commented 9 years ago
more details about my report: when I can get this issue, I can still open 
MacVim through mvim successfully. 

Original comment by linsong....@gmail.com on 29 Nov 2011 at 7:25

GoogleCodeExporter commented 9 years ago
OK, so this is not an isolated problem.  I am still stumped as to what is 
causing this.  I have not been able to reproduce this issue myself so at the 
moment I am not sure what to do about it.

If anybody with this problem could try debugging it themselves I would be 
grateful.

Original comment by bjorn.winckler@gmail.com on 30 Nov 2011 at 9:09

GoogleCodeExporter commented 9 years ago
I've had the same problem for all versions of VIM over the past year, even 
before OS X Lion. MacVIM never opens a window upon startup, nor when New Window 
is chosen from the File menu. 

It won't even open a window for a file launched from the Finder. MacVim opens 
-- just no window.

I thought it may be because of a multi-monitor setup. But the window is not 
just off-screen -- it does not exist. I verified this by choosing the option to 
Quit when the last window is closed. Then when the Prefs dialog is closed, 
MacVim quits.

Deleting the settings listed above does not help, even using the latest 
Snapshot 63.

Original comment by JavaFo...@gmail.com on 5 Jan 2012 at 9:50

GoogleCodeExporter commented 9 years ago
If one of you guys could run MacVim through GDB and see what is going on it 
would be immensely helpful.  Something like (pseudo-commands, you'll have to 
adapt it so that it works):

$ gdb path/to/MacVim/Contents/MacOS/Vim
(gdb) break [MMBackend checkin]
(gdb) run -f -g

Then track what's going on inside [MMBackend checkin] -- is it getting a 
connection?  After that, is [MMBackend processInput:data:] ever getting called? 
 And so on.

Original comment by bjorn.winckler@gmail.com on 8 Jan 2012 at 4:15

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I ran the command twice, once against Vim, and once against MacVim. Here follow 
the results.

+++++

% gdb MacVim.app/Contents/MacOS/Vim
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Thu Nov  3 21:59:02 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared 
libraries ............... done

(gdb) break [MMBackend checkin]
Breakpoint 1 at 0x17e74f
(gdb) run -f -g
Starting program: 
/Users/damon/Downloads/MacVim-snapshot-64/MacVim.app/Contents/MacOS/Vim -f -g
Reading symbols for shared libraries 
++++++++++++++..................................................................
................................................................... done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done

Program exited normally.
(gdb) <prompt>

+++++

% gdb MacVim.app/Contents/MacOS/MacVim
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Thu Nov  3 21:59:02 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared 
libraries ........... done

(gdb) break [MMBackend checkin]
Junk at end of arguments.
(gdb) run -f -g
Starting program: 
/Users/damon/Downloads/MacVim-snapshot-64/MacVim.app/Contents/MacOS/MacVim -f -g
Reading symbols for shared libraries 
++++++++++......................................................................
............................................................... done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries .. done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done

<program hangs!>

+++++

As far as I can tell, the Vim process just plain exits. :(

The MacVim process is even more mysterious. "Junk at end of arguments"? And 
then, when told to run the program, it just plain hangs! Even gdb is stuck and 
requres a force quit.

No useful information that I can get out of this. Hopefully, somebody else can.

Original comment by iamdamoc...@gmail.com on 10 Jan 2012 at 3:30

GoogleCodeExporter commented 9 years ago
Thanks for trying to look into this.  However, finding the problem will require 
gdb knowledge and willingness/time to learn the MacVim source code.  Output 
from gdb is of no use unfortunately.

Original comment by bjorn.winckler@gmail.com on 15 Jan 2012 at 2:18

GoogleCodeExporter commented 9 years ago
Having this problem as well latest OSX 10.8.2 and latest MacVim.

Original comment by merrick....@gmail.com on 1 Feb 2013 at 9:01

GoogleCodeExporter commented 9 years ago
If you have a .gvimrc file, that could be fatal. Especially if you're 
specifying a font. Regardless, if you have a .gvimrc file, ditch it and try 
launching MacVim again.

Original comment by iamdamoc...@gmail.com on 1 Feb 2013 at 9:26

GoogleCodeExporter commented 9 years ago
Your quick response gave me hope! Unfortunately, removing .gvimrc didn't yield 
any success. Neither did attempting to debug this using the Console.app 
(Because launching from the CLI works!).

Thanks again for reviewing this. :-) 

-M

Original comment by merrick....@gmail.com on 1 Feb 2013 at 9:30

GoogleCodeExporter commented 9 years ago
Is there like a "VIM" log that I can review?

Original comment by merrick....@gmail.com on 1 Feb 2013 at 9:36

GoogleCodeExporter commented 9 years ago
Well, merrick ... I have heard that it helped some people. But you and I are 
still in the same boat. I was hopeful after upgrading to 10.8.2 as well. Le 
sigh.

Original comment by iamdamoc...@gmail.com on 1 Feb 2013 at 9:51

GoogleCodeExporter commented 9 years ago
I'm sorry that this is causing grief for so many people.  I still have not been 
able to reproduce this problem so I can't fix it.

Those of you who are experiencing problems, can you please try to generate a 
debug log as outlined in comment #1 and I'll take a look at the logs.  Thanks.

Original comment by bjorn.winckler@gmail.com on 2 Feb 2013 at 2:09

GoogleCodeExporter commented 9 years ago
The trouble with debugging it by launching it from the CLI first is that it 
already works when launched from the CLI. The problem is when it is launched by 
double clicking the Application or from spotlight. Can I generate a debug log 
from there?

Original comment by merrick....@gmail.com on 2 Feb 2013 at 8:02

GoogleCodeExporter commented 9 years ago
That makes it a bit more complicated.  You'll have to check the logs in 
Console.app but by default syslog blocks a lot of logs so you'll have to 
unblock them first

$ sudo syslog -c 0 -d

Then make sure you've enabled MacVim logging with

$ defaults write org.vim.MacVim MMLogLevel 7

Now you can see MacVim's logs in Console.app.  Note that the first command will 
let through logging from *all* programs so you may get lots of other garbage in 
Console.app.  It may be helpful to enter "vim" in the "Filter" search box.

Once you're done, reset the logging filters

$ defaults delete org.vim.MacVim MMLogLevel
$ sudo syslog -c 0 -e

Original comment by bjorn.winckler@gmail.com on 2 Feb 2013 at 8:49

GoogleCodeExporter commented 9 years ago

what are the permissions on macvim.app ?

that 'file' is really a folder (bundle) and should have the 'x' set.

in terminal do this... (if this is where you put macvim)
cd /applications/macvim/macvim.app/contents/macos
ls -la

what are the permissions of:
/applications/macvim/macvim.app/contents/macos/macvim

does macvim open if you do this?
./macvim

if macvim opens, quit macvim
go back to terminal, are there any messages?

bill

Original comment by BeeYaw...@gmail.com on 3 Feb 2013 at 8:34

GoogleCodeExporter commented 9 years ago
It seems at least one user managed to work around this issue.  The following 
excerpt is from [1]:

"After using Onyx and all cleaned all caches, rebuilding launchd-database 
- essentially checking everything in the Automation-tab, MacVim works 
now again :)"

[1] 
https://groups.google.com/group/vim_mac/browse_thread/thread/f26a02cbbebc04a0

Original comment by bjorn.winckler@gmail.com on 12 Feb 2013 at 8:38

GoogleCodeExporter commented 9 years ago
I was able to get around this by deleting 
$HOME/Library/Preferences/org.vim.MacVim.plist

Original comment by rat...@gmail.com on 22 May 2013 at 3:11

GoogleCodeExporter commented 9 years ago
deleting $HOME/Library/Preferences/org.vim.MacVim.plist worked for me as well

Original comment by dominik....@gmail.com on 1 Jun 2013 at 10:46

GoogleCodeExporter commented 9 years ago
I'm still having this problem — completely reproducible on my computer (OS X 
10.8.4).
I installed the latest version of MacVim (snapshot 70) via Homebrew (`brew 
install macvim --fresh --build-from-source --use-clang --override-system-vim 
--with-cscope --with-lua`, though the flags don't affect this behavior), and 
launching it through the Finder or through Alfred prevents MacVim from working 
properly. Launching via the command line works completely fine (`mvim`, or `vim 
-g` both work), but launching MacVim as an app fails.

I have no .gvimrc file, and removing ~/Library/Preferences/org.vim.MacVim.plist 
does nothing. Onyx didn't help, and enabling debug logging with the above 
instructions just produces the following in the console:

    9/8/13 3:26:33.096 PM MacVim[94661]: -[MMAppController newWindow:]@1041: Open new window
    9/8/13 3:26:33.097 PM MacVim[94661]: -[MMAppController(Private) executeInLoginShell:arguments:]@2208: new process pid=94802 (count=3)

Activity Monitor shows that no "Vim" process is launched; or rather, Vim just 
dies on launch, and MacVim is left hanging around.

Basically, I'm having the above symptoms, but none of the fixes suggested work 
for me. I don't know how else I can help; there's little debugging I can do 
when launching MacVim from the Finder, because it can't print output to the 
Terminal.

Original comment by itaifer...@gmail.com on 8 Sep 2013 at 9:16

GoogleCodeExporter commented 9 years ago
I was also having the precise symptoms reported in #32 -- launching MacVim from 
the command line worked fine, but launching from Finder did not.

Being a coder by trade, I fetched the code and got myself all set up to debug 
the problem.  Only to discover that whatever the problem was appears to already 
have been sorted out at the head of the git repository.  The Homebrew formula 
for building MacVim "stable" gives me this problem 100% of the time when 
running from Finder, but the current HEAD does not.

So folks having this problem (and acquiring MacVim via homebrew), I'd recommend 
doing a `brew uninstall macvim` followed by `brew install macvim --HEAD`, and 
see if that fixes the problem for you; it did for me.

Original comment by tre...@gridbug.org on 15 Oct 2013 at 8:03

GoogleCodeExporter commented 9 years ago
I've been using the current HEAD for a while (and was using it when I posted 
several months ago); I just now saw comment #33, and reinstalled it via 
Homebrew, hoping something has changed, but it still doesn't work. I'm running 
OS X 10.9 with Xcode version 5.0.2 (clang version 500.2.79), if that helps.

Original comment by itaifer...@gmail.com on 13 Dec 2013 at 5:32

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I experienced similar issues:
I'm using the MacVim snapshot 7.0, running on OsX 10.8.5  
Mac vim stopped showing windows, removing and reinstalling in the /Applications 
folder did not help.
Running the application from the bundle, while storing the bundle in the user 
home folder *would* show the windows.
Running ps -A|grep vim in the terminal, showed some vim processes that were 
never killed. Stopping these processes fixed the issue. 

Original comment by tiagoa...@gmail.com on 5 Mar 2014 at 6:35

GoogleCodeExporter commented 9 years ago
Issue 501 has been merged into this issue.

Original comment by bjorn.winckler@gmail.com on 16 Apr 2014 at 4:12

GoogleCodeExporter commented 9 years ago
I'm just going through the same issue. I installed macvim from homebrew for a 
few days, and the GUI was working fine before, now, clicking the MacVim app 
starts it but no windows are created. From terminal, open 
/Applications/MacVim.app works, but double clicking the app icon doesn't bring 
any window, just the top menu, and trying to launch new windows from there 
doesn't open any windows too.

Original comment by obl...@gmail.com on 17 Jun 2014 at 5:49

GoogleCodeExporter commented 9 years ago
OK, I have figured it out =), my .profile/.bashrc seems to be not working quite 
nice for MacVim when starting it from Finder. I'm not sure how the shell script 
is not fitting for GUI stuff, but it doesn't.

Specifically, this is the wrong stuff that I should fix, removing it from 
.bashrc (which is loaded by .profile) solves the issue:

if [[ -z "$TMUX" ]] ;then
    ID="`tmux ls 2>/dev/null | grep -vm1 attached | cut -d: -f1`" # get the id of a deattached session
    if [[ -z "$ID" ]] ;then # if not available create a new one
        exec tmux new-session >/dev/null 2>&1
    else
        exec tmux attach-session -t "$ID" >/dev/null 2>&1 # if available attach to it
    fi
fi

Original comment by obl...@gmail.com on 17 Jun 2014 at 6:06

GoogleCodeExporter commented 9 years ago
I'm just finding it very strange for MacVim to inherent/execute .profile and/or 
.bashrc. Is it the norm? I'm not sure how can I prevent that from running for 
GUI, just for terminal session, which is where it makes sense.

Original comment by obl...@gmail.com on 17 Jun 2014 at 6:13

GoogleCodeExporter commented 9 years ago
My single question is, why $BASH_VERSION exists when launching MacVim from 
Finder. There's a if [ -n "$BASH_VERSION" ] guard in my .profile but, even for 
stuff now being launched from bash, e.g. MacVim from Finder, the test still 
pass which makes bash specific stuff to be executed and hence mess with MacVim.

Original comment by obl...@gmail.com on 17 Jun 2014 at 7:07

GoogleCodeExporter commented 9 years ago
I have asked this on stackexchange: 
http://apple.stackexchange.com/questions/135252

Original comment by obl...@gmail.com on 17 Jun 2014 at 7:44

GoogleCodeExporter commented 9 years ago
I have solved the issue by checking $TERM_PROGRAM instead of $BASH_VERSION. 
It's weird anyway to have $BASH_VERSION in non-terminal environments.

Original comment by obl...@gmail.com on 17 Jun 2014 at 10:44

GoogleCodeExporter commented 9 years ago
Removing an `exec` from my .bash_profile worked around this problem for me too. 
However that's not a long-term solution for me.

Original comment by tom.whit...@gmail.com on 8 Jul 2014 at 10:17

GoogleCodeExporter commented 9 years ago
This can be fixed by doing:

    defaults write org.vim.MacVim MMLoginShell 0

which disables launching MacVim through a login shell.

Original comment by tom.whit...@gmail.com on 8 Jul 2014 at 10:29

GoogleCodeExporter commented 9 years ago
thanks for the info although the $BASH_VERSION -> $TERM_PROGRAM change for me 
is a more general approach for preventing bash specific commands being run when 
launching applications.

Original comment by obl...@gmail.com on 8 Jul 2014 at 10:33

GoogleCodeExporter commented 9 years ago
I just ran into this issue and came across this bug report while trying to find 
a solution. I had gotten the error when running the installed MacVim bundle 
from this site launching via Alfred, but not when I ran mvim from bash. That 
seems consistent with what others are seeing, but there was something kind of 
odd, in that I'd have two separate instances of MacVim running, i.e. when I 
Cmd-Tabbed, I'd see the icon twice. So, when I was running the application from 
Alfred and I'd try to open new windows, if I ran "ps ax | fgrep -i vim", I'd 
see the main application process, then a new process named "(vim)" for each 
window I tried to launch (I could get a window to open if I opened a specific 
file, but not just a new empty window). If I hit Cmd-Q, the app process and 
other child processes would all go away properly.

I finally figured out that, at some point, I'd installed MacVim through 
homebrew and, when I ran mvim, I was getting the homebrew version of the 
application. That is why I was getting two separate icons for MacVim. 

I added /usr/local/Cellar to my Alfred search path and Alfred picked up the 
homebrew version of the application (both the installed and homebrew apps were 
the latest and greatest, 7.4.258). The interesting thing is that the MacVim 
launched from the homebrew location worked properly: it opened a new window on 
start-up and would open a new window whenever I hit Cmd-N. The other 
application continued to not work properly. I deleted the standard application 
bundle, re-downloaded it, and re-installed it. It worked properly this time :/

I don't know if this info will help you understand the problem better, but it 
is fairly weird. I don't see how the tmux stuff above would affect it, but 
figuring that stuff out isn't in my job description :)

Thanks a lot for the work you do on this!

Original comment by rherr...@gmail.com on 6 Jan 2015 at 4:43