Skip to content
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

Split View issues on OS X El Capitan #79

Closed
ahmadsalim opened this issue Oct 5, 2015 · 7 comments
Closed

Split View issues on OS X El Capitan #79

ahmadsalim opened this issue Oct 5, 2015 · 7 comments

Comments

@ahmadsalim
Copy link

Hi,

When using MacVim on El Capitan, it seems there are some drawing issues that happen when going into Split View mode and when scrolling up and down while in Split View. Everything is drawn fine afterwards, when I use the redraw screen command ^L but this must be done each time I scroll which makes it hard to skim through papers. I have attached a screenshot below:

skaermbillede 2015-10-05 kl 08 57 27

Thanks!

@nkarls
Copy link

nkarls commented Oct 5, 2015

MacVim's full screen mode seems to rely on having a fixed/unchanging window size.
Upon entering full(split)screen, MacVim will allocate as much of the screen real estate as possible, leaving only a small margin for the other app it should share the desktop with.
Resizing the portions of the screen between the two apps on it will produce the glitched drawing. Moreover, resizing will not actually change the size of the editor buffer but just the visible part of it: lines don't wrap on the new window border but go beyond it into the invisible part of the editor only to wrap at some later point.
Every switch to another editor tab will restore the original full-screen window size, too, so editing multiple files in a split view is unusably inconvenient.

@bmccutchon
Copy link

Hah -- looks like I'm not the only one who was going to use split screen (with Preview) to edit LaTeX. Let's hope this gets fixed...

@wiserfirst
Copy link

I'm having the same problem with MacVim in full screen split view on El Capitan.

I'll summarize what I know:

  1. When putting MacVim in full screen split view or re-sizing the split view, it becomes a black screen or random patterns
  2. Everything would be fine if redraw is triggered either by :redraw! command or by C-F / C-B
  3. Scrolling the screen with mouse or j/k would trigger similar issues like the screenshot by @ahmadsalim
  4. If the MacVim window is closed, MacVim application would crash every time.

@bmccutchon
Copy link

I also noticed crashing, but for me it also occurs in the normal full screen.

@eaoliver
Copy link

eaoliver commented Oct 9, 2015

Experienced the crash also. Appears to be an assertion failure. Here's a stack trace that got dumped in my terminal:

Voracious:modules eaoliver$ 2015-10-09 14:11:30.846 MacVim[16045:179616] *** Assertion failure in -[_NSWindowFullScreenTransition startExitFullScreenTransitionForCGWindow:targetFrame:duration:completionHandler:], /Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1404.11/AppKit.subproj/NSWindowFullScreenTransition.m:650
2015-10-09 14:11:30.852 MacVim[16045:179616] An uncaught exception was raised
2015-10-09 14:11:30.852 MacVim[16045:179616] Invalid parameter not satisfying: _fullScreenState == NSExitingFullScreen
2015-10-09 14:11:30.852 MacVim[16045:179616] (
0 CoreFoundation 0x00007fff8a4febd2 __exceptionPreprocess + 178
1 libobjc.A.dylib 0x00007fff876a8dd4 objc_exception_throw + 48
2 CoreFoundation 0x00007fff8a5038aa +[NSException raise:format:arguments:] + 106
3 Foundation 0x00007fff8e996f46 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
4 AppKit 0x00007fff85636e27 -[_NSFullScreenTransition startExitFullScreenTransitionForCGWindow:targetFrame:duration:completionHandler:] + 168
5 AppKit 0x00007fff85636d74 -[_NSWindowFullScreenTransition _exitFullScreenModeForWindow:duration:completionHandler:] + 156
6 AppKit 0x00007fff854360a9 NSPerformVisuallyAtomicChange + 147
7 AppKit 0x00007fff85c091b6 __106-[_NSWindowFullScreenTransition _performExitFullScreenModeForWindow:options:customWindows:doKitAnimation:]_block_invoke + 954
8 AppKit 0x00007fff85b24be7 __177-[NSDockConnection(FullScreenMessages) sendFullScreenExitForTransition:synchronous:window:exitForClose:backgroundWindows:participatingWindows:customAnimation:completionHandler:]_block_invoke + 60
9 libxpc.dylib 0x00007fff915ff74b _xpc_connection_reply_callout + 26
10 libxpc.dylib 0x00007fff915ff6ec _xpc_connection_call_reply + 36
11 libdispatch.dylib 0x00007fff92601453 _dispatch_client_callout + 8
12 libdispatch.dylib 0x00007fff92614c1c _dispatch_main_queue_callback_4CF + 1685
13 CoreFoundation 0x00007fff8a4b4789 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9
14 CoreFoundation 0x00007fff8a47373d **CFRunLoopRun + 1949
15 CoreFoundation 0x00007fff8a472d38 CFRunLoopRunSpecific + 296
16 HIToolbox 0x00007fff94a77d55 RunCurrentEventLoopInMode + 235
17 HIToolbox 0x00007fff94a77b8f ReceiveNextEventCommon + 432
18 HIToolbox 0x00007fff94a779cf _BlockUntilNextEventMatchingListInModeWithFilter + 71
19 AppKit 0x00007fff852fbf3a _DPSNextEvent + 1067
20 AppKit 0x00007fff852fb369 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
21 AppKit 0x00007fff852efecc -[NSApplication run] + 682
22 AppKit 0x00007fff852b9162 NSApplicationMain + 1176
23 libdyld.dylib 0x00007fff953505ad start + 1
24 ??? 0x0000000000000003 0x0 + 3
)
2015-10-09 14:11:30.853 MacVim[16045:179616] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: _fullScreenState == NSExitingFullScreen'
* First throw call stack:
(
0 CoreFoundation 0x00007fff8a4febd2 __exceptionPreprocess + 178
1 libobjc.A.dylib 0x00007fff876a8dd4 objc_exception_throw + 48
2 CoreFoundation 0x00007fff8a5038aa +[NSException raise:format:arguments:] + 106
3 Foundation 0x00007fff8e996f46 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
4 AppKit 0x00007fff85636e27 -[_NSFullScreenTransition startExitFullScreenTransitionForCGWindow:targetFrame:duration:completionHandler:] + 168
5 AppKit 0x00007fff85636d74 -[_NSWindowFullScreenTransition _exitFullScreenModeForWindow:duration:completionHandler:] + 156
6 AppKit 0x00007fff854360a9 NSPerformVisuallyAtomicChange + 147
7 AppKit 0x00007fff85c091b6 __106-[_NSWindowFullScreenTransition _performExitFullScreenModeForWindow:options:customWindows:doKitAnimation:]_block_invoke + 954
8 AppKit 0x00007fff85b24be7 __177-[NSDockConnection(FullScreenMessages) sendFullScreenExitForTransition:synchronous:window:exitForClose:backgroundWindows:participatingWindows:customAnimation:completionHandler:]_block_invoke + 60
9 libxpc.dylib 0x00007fff915ff74b _xpc_connection_reply_callout + 26
10 libxpc.dylib 0x00007fff915ff6ec _xpc_connection_call_reply + 36
11 libdispatch.dylib 0x00007fff92601453 _dispatch_client_callout + 8
12 libdispatch.dylib 0x00007fff92614c1c _dispatch_main_queue_callback_4CF + 1685
13 CoreFoundation 0x00007fff8a4b4789 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
+ 9
14 CoreFoundation 0x00007fff8a47373d __CFRunLoopRun + 1949
15 CoreFoundation 0x00007fff8a472d38 CFRunLoopRunSpecific + 296
16 HIToolbox 0x00007fff94a77d55 RunCurrentEventLoopInMode + 235
17 HIToolbox 0x00007fff94a77b8f ReceiveNextEventCommon + 432
18 HIToolbox 0x00007fff94a779cf _BlockUntilNextEventMatchingListInModeWithFilter + 71
19 AppKit 0x00007fff852fbf3a _DPSNextEvent + 1067
20 AppKit 0x00007fff852fb369 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
21 AppKit 0x00007fff852efecc -[NSApplication run] + 682
22 AppKit 0x00007fff852b9162 NSApplicationMain + 1176
23 libdyld.dylib 0x00007fff953505ad start + 1
24 ??? 0x0000000000000003 0x0 + 3
)
libc++abi.dylib: terminating with uncaught exception of type NSException

@kamitchell
Copy link

I think this comment in MMFullScreenWindow.m may have bearing:

 * When entering full-screen mode the window controller is set to control an
 * instance of this class instead of an MMWindow.  (This seems to work fine
 * even though the Apple docs state that it is generally a better idea to
 * create a separate window controller for each window.)

I wonder if swapping the window out without making a new window controller is confusing the split view logic in AppKit. Just a theory.

Thanks @splhack for #86! It shows where the critical code is. I built MacVim for myself, and I can get split view mode with correct drawing, though it fights with the split size and sometimes needs redraws. I feel motivated to clean up other full-screen glitchiness if I find a few moments.

@splhack
Copy link
Contributor

splhack commented Oct 29, 2015

crash issue is the same as #62

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

7 participants