10

I run into a very strange problem when using macvim.

Env:
OS: OS X Mountain Lion, Macvim: https://github.com/b4winckler/macvim/archive/snapshot-66.tar.gz

Steps to reproduce: 1. connecting my labtop to a extra display. 2. open macvim 3. disconnecting labtop from extra display 4. restart macvim I got the following errors:

2013-07-09 07:53:05.458 MacVim[9400:707] Error (1007) creating CGSWindow on line 259
2013-07-09 07:53:05.460 MacVim[9400:707] (
  0   CoreFoundation                      0x00007fff8f3d8b06 __exceptionPreprocess + 198
  1   libobjc.A.dylib                     0x00007fff85b723f0 objc_exception_throw + 43
  2   CoreFoundation                      0x00007fff8f3d88dc +[NSException raise:format:] + 204
  3   AppKit                              0x00007fff88215b49 _NSCreateWindowWithOpaqueShape2 + 655
  4   AppKit                              0x00007fff88214340 -[NSWindow _commonAwake] + 2002
  5   AppKit                              0x00007fff882c475b -[NSWindow _makeKeyRegardlessOfVisibility] + 88
  6   AppKit                              0x00007fff882c46c5 -[NSWindow makeKeyAndOrderFront:] + 25
  7   MacVim                              0x0000000108097192 -[MMWindowController presentWindow:] + 150
  8   Foundation                          0x00007fff8d1b9d05 __NSFireDelayedPerform + 358
  9   CoreFoundation                      0x00007fff8f395804 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
  10  CoreFoundation                      0x00007fff8f39531d __CFRunLoopDoTimer + 557
  11  CoreFoundation                      0x00007fff8f37aad9 __CFRunLoopRun + 1529
  12  CoreFoundation                      0x00007fff8f37a0e2 CFRunLoopRunSpecific + 290
  13  HIToolbox                           0x00007fff8f6bceb4 RunCurrentEventLoopInMode + 209
  14  HIToolbox                           0x00007fff8f6bcc52 ReceiveNextEventCommon + 356
  15  HIToolbox                           0x00007fff8f6bcae3 BlockUntilNextEventMatchingListInMode + 62
  16  AppKit                              0x00007fff8820c533 _DPSNextEvent + 685
  17  AppKit                              0x00007fff8820bdf2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
  18  AppKit                              0x00007fff882031a3 -[NSApplication run] + 517
  19  AppKit                              0x00007fff881a7bd6 NSApplicationMain + 869
  20  libdyld.dylib                       0x00007fff8d5ff7e1 start + 0
  21  ???                                 0x0000000000000003 0x0 + 3    

does anyone know how to fix it? any suggestion will be appreciated.

4

3 回答 3

10

I got this same error randomly after disconnecting the external display. FWIW, this worked before.

To fix this I had to go into ~/Library/Preferences/ and delete the two MacVim preference files:

  • org.vim.MacVim.LSSharedFileList.plist
  • org.vim.MacVim.plist

Opened it back up and worked like a charm. Don't bother re-installing MacVim, that didn't work for me (using HomeBrew).

于 2013-08-07T14:39:57.557 回答
4

The accepted answer didn't work for me by itself, but rebooting after deleting the plist files worked.

于 2014-01-08T19:49:57.657 回答
1

There's no need to reboot or delete entire plist files. This command clears the troublesome property:

$ defaults delete org.vim.MacVim MMTopLeftPoint
于 2015-11-30T18:52:54.477 回答