8000 Crash in mpv_render_context_report_swap while quitting · Issue #4315 · iina/iina · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Crash in mpv_render_context_report_swap while quitting #4315
Closed
@low-batt

Description

@low-batt

System and IINA version:

  • macOS 13.3
  • IINA development build

Expected behavior:
IINA shuts down cleanly.

Actual behavior:
Very rarely the CVDisplayLink thread crashes calling mpv_render_context_report_swap.

Crash report:
Translated Report (Full Report Below)
-------------------------------------

Process:               IINA [81402]
Path:                  /Users/USER/Library/Developer/Xcode/DerivedData/iina-gwhhvjgxybcchtdcwvmukizbfeip/Build/Products/Debug/IINA.app/Contents/MacOS/IINA
Identifier:            com.colliderli.iina
Version:               1.3.1 (133)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               503

Date/Time:             2023-03-31 23:00:10.1260 -0400
OS Version:            macOS 13.3 (22E252)
Report Version:        12
Anonymous UUID:        C8F97525-3322-572C-B9CE-A91EB243AC3C

Sleep/Wake UUID:       37328EBC-C3E2-44A6-ACEC-EA9DD1C69FB6

Time Awake Since Boot: 44000 seconds
Time Since Wake:       854 seconds

System Integrity Protection: enabled

Crashed Thread:        13  CVDisplayLink

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x87ff0c1ea4a9627e -> 0xffff8c1ea4a9627e (possible pointer authentication failure)
Exception Codes:       0x0000000000000001, 0x87ff0c1ea4a9627e

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [81402]

VM Region Info: 0xffff8c1ea4a9627e is not in any region.  Bytes after previous region: 18446511108319175295  
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      MALLOC_NANO (reserved)   600018000000-600020000000 [128.0M] rw-/rwx SM=NUL  ...(unallocated)
--->  
      UNUSED SPACE AT END

Thread 0::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x184c4bf14 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x184c5e240 mach_msg2_internal + 80
2   libsystem_kernel.dylib        	       0x184c54b78 mach_msg_overwrite + 604
3   libsystem_kernel.dylib        	       0x184c4c290 mach_msg + 24
4   CoreFoundation                	       0x184d6a8b8 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                	       0x184d69198 __CFRunLoopRun + 1208
6   CoreFoundation                	       0x184d6858c CFRunLoopRunSpecific + 612
7   CoreFoundation                	       0x184e0d194 CFPasteboardResolveAllPromisedData + 468
8   CoreFoundation                	       0x184d5f254 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148
9   CoreFoundation                	       0x184dfaf30 ___CFXRegistrationPost_block_invoke + 88
10  CoreFoundation                	       0x184dfae78 _CFXRegistrationPost + 440
11  CoreFoundation                	       0x184d30580 _CFXNotificationPost + 704
12  Foundation                    	       0x185c8d9e4 -[NSNotificationCenter postNotificationName:object:userInfo:] + 88
13  AppKit                        	       0x18819b630 -[NSApplication terminate:] + 1092
14  AppKit                        	       0x18812fa50 -[NSApplication(NSResponder) sendAction:to:from:] + 440
15  AppKit                        	       0x1881fba98 -[NSMenuItem _corePerformAction] + 336
16  AppKit                        	       0x1881fb814 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 104
17  AppKit                        	       0x1884ed8e8 -[NSMenu _performActionForItem:atIndex:fromEvent:] + 212
18  AppKit                        	       0x1881fad24 -[NSMenu performKeyEquivalent:] + 356
19  AppKit                        	       0x18862b178 routeKeyEquivalent + 428
20  AppKit                        	       0x1880b3d58 -[NSApplication(NSEvent) sendEvent:] + 652
21  AppKit                        	       0x1883040f0 -[NSApplication _handleEvent:] + 60
22  AppKit                        	       0x187f7b57c -[NSApplication run] + 500
23  AppKit                        	       0x187f529a8 NSApplicationMain + 880
24  IINA                          	       0x105000860 main + 12 (AppDelegate.swift:24)
25  dyld                          	       0x184933f28 start + 2236

Thread 1:
0   libsystem_pthread.dylib       	       0x184c86d8c start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib       	       0x184c86d8c start_wqthread + 0

Thread 3:
0   libsystem_pthread.dylib       	       0x184c86d8c start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib       	       0x184c86d8c start_wqthread + 0

Thread 5:
0   libsystem_pthread.dylib       	       0x184c86d8c start_wqthread + 0

Thread 6:
0   libsystem_pthread.dylib       	       0x184c86d8c start_wqthread + 0

Thread 7::  Dispatch queue: IINAPlayerCoreTask
0   libsystem_kernel.dylib        	       0x184c4f6b8 getattrlistbulk + 8
1   CoreServicesInternal          	       0x187da0784 NextEntryFromParent + 184
2   CoreServicesInternal          	       0x187da0514 DirEnumRead + 388
3   CoreServicesInternal          	       0x187da030c _GetDirectoryURLs(_CFURLEnumerator*) + 1272
4   CoreServicesInternal          	       0x187d9eb8c _URLEnumeratorGetNextURL + 140
5   Foundation                    	       0x185cb962c -[NSFileManager contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:] + 212
6   IINA                          	       0x104eeb0c0 AutoFileMatcher.getAllPossibleSubs() + 4292 (AutoFileMatcher.swift:102)
7   IINA                          	       0x104ef3c14 AutoFileMatcher.startMatching() + 1552 (AutoFileMatcher.swift:334)
8   IINA                          	       0x1051f8ad0 PlayerCore.autoLoadFilesInCurrentFolder(ticket:) + 92 (PlayerCore.swift:1547)
9   IINA                          	       0x1051f4548 closure #3 in PlayerCore.fileStarted(path:) + 488 (PlayerCore.swift:1391)
10  IINA                          	       0x104e06fd8 thunk for @escaping @callee_guaranteed () -> () + 48
11  libdispatch.dylib             	       0x184ada874 _dispatch_call_block_and_release + 32
12  libdispatch.dylib             	       0x184adc400 _dispatch_client_callout + 20
13  libdispatch.dylib             	       0x184ae3a88 _dispatch_lane_serial_drain + 668
14  libdispatch.dylib             	       0x184ae45f8 _dispatch_lane_invoke + 384
15  libdispatch.dylib             	       0x184aef244 _dispatch_workloop_worker_thread + 648
16  libsystem_pthread.dylib       	       0x184c88074 _pthread_wqthread + 288
17  libsystem_pthread.dylib       	       0x184c86d94 start_wqthread + 8

Thread 8:
0   libsystem_pthread.dylib       	       0x184c86d8c start_wqthread + 0

Thread 9:
0   libsystem_pthread.dylib       	       0x184c86d8c start_wqthread + 0

Thread 10:
0   libsystem_pthread.dylib       	       0x184c86d8c start_wqthread + 0

Thread 11:: caulk.messenger.shared:17
0   libsystem_kernel.dylib        	       0x184c4be90 semaphore_wait_trap + 8
1   caulk                         	       0x18e2aa024 caulk::semaphore::timed_wait(double) + 212
2   caulk                         	       0x18e2a9ed8 caulk::concurrent::details::worker_thread::run() + 36
3   caulk                         	       0x18e2a9bc8 void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*>>>(void*) + 96
4   libsystem_pthread.dylib       	       0x184c8bfa8 _pthread_start + 148
5   libsystem_pthread.dylib       	       0x184c86da0 thread_start + 8

Thread 12:: com.apple.NSEventThread
0   libsystem_kernel.dylib        	       0x184c4bf14 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x184c5e240 mach_msg2_internal + 80
2   libsystem_kernel.dylib        	       0x184c54b78 mach_msg_overwrite + 604
3   libsystem_kernel.dylib        	       0x184c4c290 mach_msg + 24
4   CoreFoundation                	       0x184d6a8b8 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                	       0x184d69198 __CFRunLoopRun + 1208
6   CoreFoundation                	       0x184d6858c CFRunLoopRunSpecific + 612
7   AppKit                        	       0x1880b2508 _NSEventThread + 172
8   libsystem_pthread.dylib       	       0x184c8bfa8 _pthread_start + 148
9   libsystem_pthread.dylib       	       0x184c86da0 thread_start + 8

Thread 13 Crashed:: CVDisplayLink
0   libmpv.1.dylib                	       0x1065e9b34 mp_msg_va + 48
1   libmpv.1.dylib                	       0x1065eac0c mp_msg + 28
2   libmpv.1.dylib                	       0x1066a33dc mpv_render_context_report_swap + 36
3   IINA                          	       0x105237df8 MPVController.mpvReportSwap() + 96 (MPVController.swift:448)
4   IINA                          	       0x10514a038 displayLinkCallback(_:_:_:_:_:_:) + 216 (VideoView.swift:420)
5   IINA                          	       0x105149f40 @objc displayLinkCallback(_:_:_:_:_:_:) + 68
6   CoreVideo                     	       0x18ca0ee28 CVDisplayLink::performIO(CVTimeStamp*) + 308
7   CoreVideo                     	       0x18ca0ddd4 CVDisplayLink::runIOThread() + 664
8   libsystem_pthread.dylib       	       0x184c8bfa8 _pthread_start + 148
9   libsystem_pthread.dylib       	       0x184c86da0 thread_start + 8


Thread 13 crashed with ARM Thread State (64-bit):
    x0: 0x87ff0c1ea4a9627e   x1: 0x0000000000000008   x2: 0x000000010689c1cc   x3: 0x000000016ba82bf0
    x4: 0x0000000000000020   x5: 0x0000000000000010   x6: 0x0000600001980010   x7: 0x00000000008b592d
    x8: 0x000000016ba82bf0   x9: 0x0000000000000000  x10: 0x0000656b81f60000  x11: 0x0000600001980000
   x12: 0x0000000000000010  x13: 0x00000000001ff800  x14: 0x00000000000007fb  x15: 0x000000009aed2802
   x16: 0x00000001066a33b8  x17: 0x000000009aed2802  x18: 0x0000000000000000  x19: 0x000000014018cc50
   x20: 0x87ff0c1ea4a9627e  x21: 0x000000016ba82bf0  x22: 0x0000000000000008  x23: 0x0000000000000000
   x24: 0x000000010689c1cc  x25: 0x00000001dd9b77d4  x26: 0x0000000000000003  x27: 0x00000001dd9b77d8
   x28: 0x00000001dd9b80f0   fp: 0x000000016ba82bc0   lr: 0x00000001065eac0c
    sp: 0x000000016ba82b40   pc: 0x00000001065e9b34 cpsr: 0x60001000
   far: 0x87ff0c1ea4a9627e  esr: 0x92000004 (Data Abort) byte read Translation fault

Steps to reproduce:
I am not able to reproduce this crash upon demand. This crash occurred during automated testing using the script below attempting to detect race conditions during shutdown.

  • MPV does not have this problem.

Unknown, but this looks to be specific to IINA.

How often does this happen?
Very rarely.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0