Skip to content

Crash when combining macOS native fullscreen and mpv's own fullscreen #17837

@avioletheart

Description

@avioletheart

mpv Information

mpv v0.41.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
 built on Jan  1 1980 00:00:00
libplacebo version: v7.351.0
FFmpeg version: 8.0.1
FFmpeg library versions:
   libavcodec      62.11.100
   libavdevice     62.1.100
   libavfilter     11.4.100
   libavformat     62.3.100
   libavutil       60.8.100
   libswresample   6.1.100
   libswscale      9.1.100

Other Information

- macOS version: macOS 26.3 (25D125)
- Source of mpv: nixpkgs
- Latest known working version: unknown
- Issue started after the following happened: n/a

Reproduction Steps

  1. open any video file in macOS with --native-fs=no option
  2. open Mission Control and drag the mpv window to a fullscreen Space (not desktop)
  3. go to the mpv window and type f to enable mpv's fullscreen
  4. type f again to disable mpv's fullscreen

Expected Behavior

not sure what the correct behaviour is, but I would expect it not to crash

Actual Behavior

Crash

Log File

output.txt

Crash log:

*** Terminating app due to uncaught exception 'NSGenericException', reason: 'NSWindowStyleMaskFullScreen cleared on a window outside of a full screen transition. Called from (
	0   AppKit                              0x00000001945ffee8 __25-[NSWindow setStyleMask:]_block_invoke + 156
	1   AppKit                              0x0000000193940a10 NSPerformVisuallyAtomicChange + 108
	2   AppKit                              0x00000001945ffd98 -[NSWindow setStyleMask:] + 176
	3   mpv                                 0x00000001002cce70 $s5swift6WindowC9styleMaskSo013NSWindowStyleD0Vvs + 192
	4   mpv                                 0x00000001002ccda0 $s5swift6WindowC9styleMaskSo013NSWindowStyleD0VvsTo + 32
	5   mpv                                 0x00000001002ceec8 $s5swift6WindowC15setToFullScreenyyF + 124
	6   mpv                                 0x00000001002cda8c $s5swift6WindowC16toggleFullScreenyyypSgFTo + 88
	7   mpv                                 0x00000001002c6144 $s5swift6CommonC15initWindowStateyyFyyScMYccfU_TATm + 68
	8   mpv                                 0x00000001002a1b98 $sIeg_IeyB_TR + 28
	9   libdispatch.dylib                   0x000000018f2aab5c _dispatch_call_block_and_release + 32
	10  libdispatch.dylib                   0x000000018f2c4ad4 _dispatch_client_callout + 16
	11  libdispatch.dylib                   0x000000018f2e20d0 _dispatch_main_queue_drain.cold.5 + 812
	12  libdispatch.dylib                   0x000000018f2b9f48 _dispatch_main_queue_drain + 180
	13  libdispatch.dylib                   0x000000018f2b9e84 _dispatch_main_queue_callback_4CF + 44
	14  CoreFoundation                      0x000000018f5309a0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
	15  CoreFoundation                      0x000000018f5057fc __CFRunLoopRun + 1944
	16  CoreFoundation                      0x000000018f5bff3c _CFRunLoopRunSpecificWithOptions + 532
	17  HIToolbox                           0x000000019c041790 RunCurrentEventLoopInMode + 316
	18  HIToolbox                           0x000000019c044ab8 ReceiveNextEventCommon + 488
	19  HIToolbox                           0x000000019c1ceb64 _BlockUntilNextEventMatchingListInMode + 48
	20  AppKit                              0x0000000193e21014 _DPSBlockUntilNextEventMatchingListInMode + 236
	21  AppKit                              0x000000019391ee48 _DPSNextEvent + 588
	22  AppKit                              0x00000001943e5e8c -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
	23  AppKit                              0x00000001943e5b98 -[NSApplication(NSEventRouting) nextEventMatchingMask:untilDate:inMode:dequeue:] + 72
	24  AppKit                              0x0000000193917780 -[NSApplication run] + 368
	25  mpv                                 0x00000001002a21cc $s5swift11ApplicationC4mainySis5Int32V_SpySpys4Int8VGSgGtF + 492
	26  mpv                                 0x00000001002a22b8 $s5swift11ApplicationC4mainySis5Int32V_SpySpys4Int8VGSgGtFTo + 48
	27  mpv                                 0x00000001003ebe54 cocoa_main + 60
	28  dyld                                0x000000018f09dd54 start + 7184
)'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000018f5538fc __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x000000018f02a418 objc_exception_throw + 88
	2   CoreFoundation                      0x000000018f621564 -[NSException initWithCoder:] + 0
	3   AppKit                              0x00000001945fff20 __25-[NSWindow setStyleMask:]_block_invoke + 212
	4   AppKit                              0x0000000193940a10 NSPerformVisuallyAtomicChange + 108
	5   AppKit                              0x00000001945ffd98 -[NSWindow setStyleMask:] + 176
	6   mpv                                 0x00000001002cce70 $s5swift6WindowC9styleMaskSo013NSWindowStyleD0Vvs + 192
	7   mpv                                 0x00000001002ccda0 $s5swift6WindowC9styleMaskSo013NSWindowStyleD0VvsTo + 32
	8   mpv                                 0x00000001002ceec8 $s5swift6WindowC15setToFullScreenyyF + 124
	9   mpv                                 0x00000001002cda8c $s5swift6WindowC16toggleFullScreenyyypSgFTo + 88
	10  mpv                                 0x00000001002c6144 $s5swift6CommonC15initWindowStateyyFyyScMYccfU_TATm + 68
	11  mpv                                 0x00000001002a1b98 $sIeg_IeyB_TR + 28
	12  libdispatch.dylib                   0x000000018f2aab5c _dispatch_call_block_and_release + 32
	13  libdispatch.dylib                   0x000000018f2c4ad4 _dispatch_client_callout + 16
	14  libdispatch.dylib                   0x000000018f2e20d0 _dispatch_main_queue_drain.cold.5 + 812
	15  libdispatch.dylib                   0x000000018f2b9f48 _dispatch_main_queue_drain + 180
	16  libdispatch.dylib                   0x000000018f2b9e84 _dispatch_main_queue_callback_4CF + 44
	17  CoreFoundation                      0x000000018f5309a0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
	18  CoreFoundation                      0x000000018f5057fc __CFRunLoopRun + 1944
	19  CoreFoundation                      0x000000018f5bff3c _CFRunLoopRunSpecificWithOptions + 532
	20  HIToolbox                           0x000000019c041790 RunCurrentEventLoopInMode + 316
	21  HIToolbox                           0x000000019c044ab8 ReceiveNextEventCommon + 488
	22  HIToolbox                           0x000000019c1ceb64 _BlockUntilNextEventMatchingListInMode + 48
	23  AppKit                              0x0000000193e21014 _DPSBlockUntilNextEventMatchingListInMode + 236
	24  AppKit                              0x000000019391ee48 _DPSNextEvent + 588
	25  AppKit                              0x00000001943e5e8c -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
	26  AppKit                              0x00000001943e5b98 -[NSApplication(NSEventRouting) nextEventMatchingMask:untilDate:inMode:dequeue:] + 72
	27  AppKit                              0x0000000193917780 -[NSApplication run] + 368
	28  mpv                                 0x00000001002a21cc $s5swift11ApplicationC4mainySis5Int32V_SpySpys4Int8VGSgGtF + 492
	29  mpv                                 0x00000001002a22b8 $s5swift11ApplicationC4mainySis5Int32V_SpySpys4Int8VGSgGtFTo + 48
	30  mpv                                 0x00000001003ebe54 cocoa_main + 60
	31  dyld                                0x000000018f09dd54 start + 7184
)
libc++abi: terminating due to uncaught exception of type NSException

Sample Files

No response

I carefully read all instruction and confirm that I did the following:

  • I tested and confirmed that the issue exists with the latest release version or newer.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions