Closed philk closed 9 years ago
Bizarre! Can you reproduce it in a debugger and post a stack trace? E.g.
lldb build/Neovim.app/Contents/MacOS/Neovim -- --args --cwd $PWD somefile
r
(then, if it crashes)
bt
Also, I suppose the script would get confused if PWD wasn't set, though I can't see how that would happen. echo $PWD
gives some output, right?
Also try running Neovim with -u NONE
to disregard your local config
I can also see how this might happen if Neovim.app is old and hadn't been recompiled since the --cwd
flag was added, i.e. if you updated to the commit with gnvim
in it but didn't run make
again.
After rebuilding from source (as opposed to brew reinstall neovim-dot-app --HEAD
) it seems to be working so problem solved I guess 🙃
Weirdness with lldb though:
$ lldb build/Neovim.app/Contents/MacOS/Neovim -- --args --cwd $PWD Makefile
(lldb) target create "build/Neovim.app/Contents/MacOS/Neovim"
rCurrent executable set to 'build/Neovim.app/Contents/MacOS/Neovim' (x86_64).
(lldb) settings set -- target.run-args "--args" "--cwd" "/Users/philkates/Source/neovim-dot-app" "Makefile"
(lldb) r
Process 67752 launched: '/Users/philkates/Source/neovim-dot-app/build/Neovim.app/Contents/MacOS/Neovim' (x86_64)
Process 67752 stopped
* thread #1: tid = 0x3927e7, 0x00007fff84419aaa libsystem_kernel.dylib`write + 10, queue = 'com.apple.main-thread', stop reason = signal SIGPIPE
frame #0: 0x00007fff84419aaa libsystem_kernel.dylib`write + 10
libsystem_kernel.dylib`write:
-> 0x7fff84419aaa <+10>: jae 0x7fff84419ab4 ; <+20>
0x7fff84419aac <+12>: movq %rax, %rdi
0x7fff84419aaf <+15>: jmp 0x7fff84413414 ; cerror
0x7fff84419ab4 <+20>: retq
(lldb) bt
* thread #1: tid = 0x3927e7, 0x00007fff84419aaa libsystem_kernel.dylib`write + 10, queue = 'com.apple.main-thread', stop reason = signal SIGPIPE
* frame #0: 0x00007fff84419aaa libsystem_kernel.dylib`write + 10
frame #1: 0x00000001000015a8 Neovim`Client::send(this=0x0000000100454ab0, message="\x94\0\x02�vim_command\x91�redraw!") + 520 at client.cc:25
frame #2: 0x000000010001953a Neovim`RPC* Client::call<msgpack::v1::type::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >(this=0x0000000100454ab0, name="vim_command", args=tuple<std::__1::basic_string<char> > @ 0x00007fff5fbfd288) + 1450 at client.h:68
frame #3: 0x0000000100022af6 Neovim`Vim::vim_command(this=0x0000000100454ab0, cmd=<unavailable>) + 214 at vim.h:60
frame #4: 0x0000000100044abc Neovim`-[VimView setFont:](self=0x0000000100455040, _cmd="setFont:", font=0x000000010035e650) + 1356 at view.mm:177
frame #5: 0x0000000100043db3 Neovim`-[VimView initWithFrame:vim:](self=0x0000000100455040, _cmd="initWithFrame:vim:", frame=(origin = (x = 0, y = 0), size = (width = 100, height = 100)), vim=0x0000000100454ab0) + 659 at view.mm:44
frame #6: 0x0000000100044183 Neovim`-[VimView initWithCellSize:vim:](self=0x0000000100455040, _cmd="initWithCellSize:vim:", cellSize=(width = 213, height = 56), vim=0x0000000100454ab0) + 227 at view.mm:95
frame #7: 0x000000010004c90b Neovim`-[VimWindow initWithArgs:](self=0x0000000100454860, _cmd="initWithArgs:", args=size=3) + 667 at window.mm:232
frame #8: 0x00000001000271cd Neovim`-[AppDelegate newWindowWithArgs:](self=0x00000001003034b0, _cmd="newWindowWithArgs:", args=size=3) + 61 at app.mm:105
frame #9: 0x0000000100028926 Neovim`-[AppDelegate applicationDidFinishLaunching:](self=0x00000001003034b0, _cmd="applicationDidFinishLaunching:", notification=@"NSApplicationDidFinishLaunchingNotification") + 1510 at app.mm:229
frame #10: 0x00007fff8c7f5c9c CoreFoundation`__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
frame #11: 0x00007fff8c7f5c2f CoreFoundation`___CFXRegistrationPost_block_invoke + 63
frame #12: 0x00007fff8c7f5ba7 CoreFoundation`_CFXRegistrationPost + 407
frame #13: 0x00007fff8c7f5912 CoreFoundation`___CFXNotificationPost_block_invoke + 50
frame #14: 0x00007fff8c7b26d2 CoreFoundation`-[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1922
frame #15: 0x00007fff8c7b1925 CoreFoundation`_CFXNotificationPost + 693
frame #16: 0x00007fff86d920fa Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 66
frame #17: 0x00007fff88854ea1 AppKit`-[NSApplication _postDidFinishNotification] + 297
frame #18: 0x00007fff88854c0b AppKit`-[NSApplication _sendFinishLaunchingNotification] + 203
frame #19: 0x00007fff8870fdc1 AppKit`-[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 557
frame #20: 0x00007fff8870f86b AppKit`-[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 250
frame #21: 0x00007fff86de0a8d Foundation`-[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 290
frame #22: 0x00007fff86de0907 Foundation`_NSAppleEventManagerGenericHandler + 102
frame #23: 0x00007fff92c421b5 AE`aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 531
frame #24: 0x00007fff92c41f3c AE`dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 31
frame #25: 0x00007fff92c41e58 AE`aeProcessAppleEvent + 288
frame #26: 0x00007fff894a3ef5 HIToolbox`AEProcessAppleEvent + 55
frame #27: 0x00007fff8870b230 AppKit`_DPSNextEvent + 2245
frame #28: 0x00007fff8870a1c5 AppKit`-[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
frame #29: 0x00007fff886fed28 AppKit`-[NSApplication run] + 682
frame #30: 0x0000000100030dfa Neovim`main(argc=5, argv=0x00007fff5fbff2a0) + 186 at main.mm:19
frame #31: 0x00007fff9190a5ad libdyld.dylib`start + 1
Hm. I know we do ignore SIGPIPE so maybe that's just LLDB picking up on it anyway... if this causes problems I'll look into it but I'm guessing it's benign.
The new gnvim script (which I'm super excited about) doesn't seem to be working for me. It attempts to start Neovim.app but the window just pops up and immediately closes. It seems to have something to do with the new
--cwd $PWD
arg sinceopen -a Neovim --args /absolute/filename
works fine.Here's what I see in Console.app when I try running gnvim:
A quick bit of Googling also makes it seem like it may have something to do with security permissions related to El Capitan's rootless mode but I couldn't find any fixes. Putting this out there to see if anyone else has any solutions.