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

IINA crashes with 'Code Signature Invalid' #3551

Closed
1 task done
CarterLi opened this issue Nov 28, 2021 · 14 comments
Closed
1 task done

IINA crashes with 'Code Signature Invalid' #3551

CarterLi opened this issue Nov 28, 2021 · 14 comments

Comments

@CarterLi
Copy link
Contributor

System and IINA version:

  • macOS 12.0.1
  • IINA 1.2.0

Expected behavior:
Don't crash

Actual behavior:

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

Process:               IINA [417]
Path:                  /Applications/IINA.app/Contents/MacOS/IINA
Identifier:            com.colliderli.iina
Version:               1.2.0 (129)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2021-11-29 01:22:07.7488 +0800
OS Version:            macOS 12.0.1 (21A559)
Report Version:        12
Anonymous UUID:        6B003244-78E0-07F2-4173-072C2FD1A758


Time Awake Since Boot: 26 seconds

System Integrity Protection: enabled

Crashed Thread:        14  mpv/lua script (stats)

Exception Type:        EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid))
Exception Codes:       UNKNOWN_0x32 at 0x0000000106efbe7c
Exception Codes:       0x0000000000000032, 0x0000000106efbe7c
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace CODESIGNING, Code 2 

VM Region Info: 0x106efbe7c is in 0x106eec000-0x106efc000;  bytes after start: 65148  bytes before end: 387
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      VM_ALLOCATE                 106ecc000-106eec000    [  128K] rw-/rwx SM=PRV  
--->  VM_ALLOCATE                 106eec000-106efc000    [   64K] r-x/rwx SM=PRV  
      GAP OF 0x4000 BYTES
      MALLOC_TINY                 106f00000-107000000    [ 1024K] rw-/rwx SM=PRV  

Thread 0::  Dispatch queue: com.apple.main-thread
0   Foundation                    	       0x1c7f2a93c -[NSPlaceholderMutableString initWithString:] + 108
1   Foundation                    	       0x1c7f4fd3c -[NSString stringByReplacingOccurrencesOfString:withString:options:range:] + 80
2   libswiftFoundation.dylib      	       0x1d837a528 StringProtocol.replacingOccurrences<A, B>(of:with:options:range:) + 680
3   IINA                          	       0x10447b17c closure #1 in KeyMapping.init(key:rawAction:isIINACommand:comment:) + 60 (KeyMapping.swift:92) [inlined]
4   IINA                          	       0x10447b17c thunk for @callee_guaranteed (@guaranteed String) -> (@error @owned Error) + 60 [inlined]
5   IINA                          	       0x10447b17c specialized Sequence.forEach(_:) + 60 [inlined]
6   IINA                          	       0x10447b17c specialized KeyMapping.init(key:rawAction:isIINACommand:comment:) + 248 (KeyMapping.swift:91)
7   IINA                          	       0x10447bef0 KeyMapping.init(key:rawAction:isIINACommand:comment:) + 32 [inlined]
8   IINA                          	       0x10447bef0 KeyMapping.__allocating_init(key:rawAction:isIINACommand:comment:) + 32 (KeyMapping.swift:88) [inlined]
9   IINA                          	       0x10447bef0 specialized static KeyMapping.parseInputConf(at:) + 2136 (KeyMapping.swift:139)
10  IINA                          	       0x10445e438 static KeyMapping.parseInputConf(at:) + 12 [inlined]
11  IINA                          	       0x10445e438 specialized static PlayerCore.loadKeyBindings() + 808 (PlayerCore.swift:360)
12  IINA                          	       0x1043c868c static PlayerCore.loadKeyBindings() + 4 [inlined]
13  IINA                          	       0x1043c868c AppDelegate.getReady() + 4 (AppDelegate.swift:83) [inlined]
14  IINA                          	       0x1043c868c AppDelegate.applicationDidFinishLaunching(_:) + 724 (AppDelegate.swift:184)
15  IINA                          	       0x1043c94c8 @objc AppDelegate.applicationWillFinishLaunching(_:) + 120
16  CoreFoundation                	       0x1c70a1160 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28
17  CoreFoundation                	       0x1c7144ae4 ___CFXRegistrationPost_block_invoke + 52
18  CoreFoundation                	       0x1c7144a50 _CFXRegistrationPost + 456
19  CoreFoundation                	       0x1c706fe10 _CFXNotificationPost + 720
20  Foundation                    	       0x1c7f295e0 -[NSNotificationCenter postNotificationName:object:userInfo:] + 96
21  AppKit                        	       0x1c9c087fc -[NSApplication _postDidFinishNotification] + 340
22  AppKit                        	       0x1c9c08514 -[NSApplication _sendFinishLaunchingNotification] + 236
23  AppKit                        	       0x1c9c05f14 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 580
24  AppKit                        	       0x1c9c05afc -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 780
25  Foundation                    	       0x1c7f56834 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 344
26  Foundation                    	       0x1c7f56670 _NSAppleEventManagerGenericHandler + 96
27  AE                            	       0x1cd83075c 0x1cd824000 + 51036
28  AE                            	       0x1cd8300b4 0x1cd824000 + 49332
29  AE                            	       0x1cd828f84 aeProcessAppleEvent + 488
30  HIToolbox                     	       0x1cfc31dfc AEProcessAppleEvent + 68
31  AppKit                        	       0x1c9bffed8 _DPSNextEvent + 1848
32  AppKit                        	       0x1c9bfe390 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1332
33  AppKit                        	       0x1c9bf03b0 -[NSApplication run] + 596
34  AppKit                        	       0x1c9bc1a84 NSApplicationMain + 1064
35  IINA                          	       0x104323d8c main + 12 (AppDelegate.swift:22)
36  dyld                          	       0x1048650f4 start + 520

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

Thread 2::  Dispatch queue: app exceptions timeout queue
0   libsystem_kernel.dylib        	       0x1c6fa765c kevent_qos + 8
1   libdispatch.dylib             	       0x1c6e45b58 _dispatch_kq_poll + 172
2   libdispatch.dylib             	       0x1c6e45724 _dispatch_kq_drain + 188
3   libdispatch.dylib             	       0x1c6e450a8 _dispatch_event_loop_poke + 160
4   LaunchServices                	       0x1c758cdcc __31+[_LSExceptions sharedInstance]_block_invoke_2 + 32
5   libdispatch.dylib             	       0x1c6e20e60 _dispatch_call_block_and_release + 32
6   libdispatch.dylib             	       0x1c6e22bac _dispatch_client_callout + 20
7   libdispatch.dylib             	       0x1c6e2a330 _dispatch_lane_serial_drain + 672
8   libdispatch.dylib             	       0x1c6e2aed8 _dispatch_lane_invoke + 444
9   libdispatch.dylib             	       0x1c6e35708 _dispatch_workloop_worker_thread + 656
10  libsystem_pthread.dylib       	       0x1c6fdd5b0 _pthread_wqthread + 288
11  libsystem_pthread.dylib       	       0x1c6fdc2c4 start_wqthread + 8

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

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

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

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

Thread 7:
0   libsystem_pthread.dylib       	       0x1c6fdc2bc start_wqthread + 0

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

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

Thread 10::  Dispatch queue: Background Recent Document Resolution (QOS: UNSPECIFIED)
0   libsystem_kernel.dylib        	       0x1c6fa63d4 __open + 8
1   libsystem_kernel.dylib        	       0x1c6fb06f0 open + 64
2   FileProvider                  	       0x1d8e0c268 -[NSURL(FPAdditions) fp_isInSyncableRootFast] + 96
3   FileProvider                  	       0x1d8e0c1c0 -[NSURL(FPAdditions) fp_matchesFileProviderHeuristics:] + 248
4   FileProvider                  	       0x1d8e0c0bc FPURLMightBeInFileProvider + 44
5   FileProviderOverride          	       0x106d6d520 0x106d68000 + 21792
6   CoreFoundation                	       0x1c708db34 __invoking___ + 148
7   CoreFoundation                	       0x1c708d9ac -[NSInvocation invoke] + 468
8   CoreFoundation                	       0x1c70c1128 -[NSInvocation invokeWithTarget:] + 80
9   FileProvider                  	       0x1d8e0bec0 -[FPFrameworkOverridesIterator callNextOverrides] + 392
10  FileProvider                  	       0x1d8e6f464 __FPCFCopyAttributeValuesForItem_block_invoke.80 + 164
11  CloudDocsFileProvider         	       0x106d8e300 0x106d8c000 + 8960
12  CoreFoundation                	       0x1c708db34 __invoking___ + 148
13  CoreFoundation                	       0x1c708d9ac -[NSInvocation invoke] + 468
14  CoreFoundation                	       0x1c70c1128 -[NSInvocation invokeWithTarget:] + 80
15  FileProvider                  	       0x1d8e0bec0 -[FPFrameworkOverridesIterator callNextOverrides] + 392
16  FileProvider                  	       0x1d8e0bcb4 -[FPFrameworkOverridesIterator forwardInvocation:] + 96
17  CoreFoundation                	       0x1c708bfc8 ___forwarding___ + 968
18  CoreFoundation                	       0x1c708bb40 _CF_forwarding_prep_0 + 96
19  FileProvider                  	       0x1d8e0ae9c FPCFCopyAttributeValuesForItem + 328
20  CoreServicesInternal          	       0x1c9a2c98c CopyFromFileProvider(__CFURL const*, void const*, void const**, __CFError**) + 88
21  CoreServicesInternal          	       0x1c9a2c888 ExternalProviderPrepareValues(__CFURL const*, __FileCache*, __CFString const* const*, void const**, long, void const*, __CFError**) + 372
22  CoreServicesInternal          	       0x1c9a13070 prepareValuesForBitmap(__CFURL const*, __FileCache*, _FilePropertyBitmap*, __CFError**) + 412
23  CoreServicesInternal          	       0x1c9a100c8 _FSURLCopyResourcePropertyForKeyInternal(__CFURL const*, __CFString const*, void*, void*, __CFError**, unsigned char) + 232
24  CoreFoundation                	       0x1c707e9fc CFURLCopyResourcePropertyForKey + 140
25  CoreFoundation                	       0x1c7095d24 -[NSURL getResourceValue:forKey:error:] + 120
26  Foundation                    	       0x1c8007a90 -[NSFileManager isUbiquitousItemAtURL:] + 72
27  Foundation                    	       0x1c80077f8 -[NSFileManager _URLForTrashingItemAtURL:create:error:] + 76
28  SharedFileList                	       0x1ce4b1650 -[NSURL(SFLAdditions) __sfl_isInTrash] + 100
29  SharedFileList                	       0x1ce4afdd8 +[SFLResolveResult resultByResolvingBookmarkData:options:relativeToURL:] + 188
30  SharedFileList                	       0x1ce4a6418 __47-[_SFLItemWrapper initWithItem:listIdentifier:]_block_invoke + 104
31  SharedFileList                	       0x1ce4a5f98 -[SFLBookmark resolveWithOptions:relativeToURL:error:] + 144
32  SharedFileList                	       0x1ce4a5da0 +[SFLList(LSSharedFileListSupport) resolveItem:resolutionFlags:error:] + 100
33  SharedFileList                	       0x1ce4a5ad0 +[SFLList(LSSharedFileListSupport) resolveItem:resolutionFlags:URL:fsRef:] + 108
34  SharedFileList                	       0x1ce4a5958 LSSharedFileListItemResolve + 160
35  AppKit                        	       0x1c9e9c028 __85-[_NSRecentDocumentInfo resolveByMountingVolumesIfNecessary:queue:completionHandler:]_block_invoke + 92
36  Foundation                    	       0x1c7f64600 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 24
37  Foundation                    	       0x1c7f644a8 -[NSBlockOperation main] + 104
38  Foundation                    	       0x1c7f64438 __NSOPERATION_IS_INVOKING_MAIN__ + 24
39  Foundation                    	       0x1c7f6367c -[NSOperation start] + 804
40  Foundation                    	       0x1c7f63350 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 24
41  Foundation                    	       0x1c7f63204 __NSOQSchedule_f + 184
42  libdispatch.dylib             	       0x1c6e31990 _dispatch_block_async_invoke2 + 148
43  libdispatch.dylib             	       0x1c6e22bac _dispatch_client_callout + 20
44  libdispatch.dylib             	       0x1c6e26080 _dispatch_continuation_pop + 504
45  libdispatch.dylib             	       0x1c6e256dc _dispatch_async_redirect_invoke + 596
46  libdispatch.dylib             	       0x1c6e3431c _dispatch_root_queue_drain + 396
47  libdispatch.dylib             	       0x1c6e34b58 _dispatch_worker_thread2 + 164
48  libsystem_pthread.dylib       	       0x1c6fdd574 _pthread_wqthread + 228
49  libsystem_pthread.dylib       	       0x1c6fdc2c4 start_wqthread + 8

Thread 11:
0   libsystem_pthread.dylib       	       0x1c6fdc2bc start_wqthread + 0

Thread 12:: mpv/mpv core
0   libsystem_kernel.dylib        	       0x1c6fa90c0 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x1c6fe1ab4 _pthread_cond_wait + 1228
2   libmpv.1.dylib                	       0x1070b3120 mp_dispatch_queue_process + 292
3   libmpv.1.dylib                	       0x107107b40 mp_wait_events + 1040
4   libmpv.1.dylib                	       0x10710f964 mp_idle + 352
5   libmpv.1.dylib                	       0x1070faa70 mp_play_files + 396
6   libmpv.1.dylib                	       0x1070d1ab0 core_thread + 120
7   libsystem_pthread.dylib       	       0x1c6fe14ec _pthread_start + 148
8   libsystem_pthread.dylib       	       0x1c6fdc2d0 thread_start + 8

Thread 13:: mpv/lua script (ytdl_hook)
0   libsystem_kernel.dylib        	       0x1c6fa90c0 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x1c6fe1ab4 _pthread_cond_wait + 1228
2   libmpv.1.dylib                	       0x1070ce7dc wait_wakeup + 300
3   libmpv.1.dylib                	       0x1070d1d68 mpv_wait_event + 572
4   libmpv.1.dylib                	       0x107101d24 script_raw_wait_event + 124
5   libluajit-5.1.2.dylib         	       0x105088b74 lj_BC_FUNCC + 44
6   libluajit-5.1.2.dylib         	       0x1050954fc lua_pcall + 148
7   libluajit-5.1.2.dylib         	       0x105088b74 lj_BC_FUNCC + 44
8   libmpv.1.dylib                	       0x1071001dc load_scripts + 456
9   libluajit-5.1.2.dylib         	       0x105088b74 lj_BC_FUNCC + 44
10  libluajit-5.1.2.dylib         	       0x1050954fc lua_pcall + 148
11  libluajit-5.1.2.dylib         	       0x105088b74 lj_BC_FUNCC + 44
12  libluajit-5.1.2.dylib         	       0x10509553c lua_cpcall + 28
13  libmpv.1.dylib                	       0x1071120f4 run_script + 124
14  libmpv.1.dylib                	       0x10711217c script_thread + 32
15  libsystem_pthread.dylib       	       0x1c6fe14ec _pthread_start + 148
16  libsystem_pthread.dylib       	       0x1c6fdc2d0 thread_start + 8

Thread 14 Crashed:: mpv/lua script (stats)
0   ???                           	       0x106efbe7c ???
1   libmpv.1.dylib                	       0x1070ffc9c load_builtin + 400
2   libluajit-5.1.2.dylib         	       0x105088b74 lj_BC_FUNCC + 44
3   libluajit-5.1.2.dylib         	       0x1050d4260 lj_cf_package_require + 524
4   libmpv.1.dylib                	       0x1071002cc require + 180
5   libmpv.1.dylib                	       0x10710008c load_scripts + 120
6   libluajit-5.1.2.dylib         	       0x105088b74 lj_BC_FUNCC + 44
7   libluajit-5.1.2.dylib         	       0x1050954fc lua_pcall + 148
8   libluajit-5.1.2.dylib         	       0x105088b74 lj_BC_FUNCC + 44
9   libluajit-5.1.2.dylib         	       0x10509553c lua_cpcall + 28
10  libmpv.1.dylib                	       0x1071120f4 run_script + 124
11  libmpv.1.dylib                	       0x10711217c script_thread + 32
12  libsystem_pthread.dylib       	       0x1c6fe14ec _pthread_start + 148
13  libsystem_pthread.dylib       	       0x1c6fdc2d0 thread_start + 8

Thread 15:: mpv/lua script (console)
0   libass.9.dylib                	       0x104be16f0 DYLD-STUB$$calloc + 0
1   libass.9.dylib                	       0x104bc9c58 ass_library_init + 20
2   libmpv.1.dylib                	       0x10711d170 mp_ass_init + 132
3   libmpv.1.dylib                	       0x1071252fc create_ass_track + 280
4   libmpv.1.dylib                	       0x1070dcac4 cmd_osd_overlay + 980
5   libmpv.1.dylib                	       0x1070d7748 run_command + 2356
6   libmpv.1.dylib                	       0x1070cf1b0 run_client_command + 448
7   libmpv.1.dylib                	       0x107102434 script_command_native.5602 + 160
8   libluajit-5.1.2.dylib         	       0x105088b74 lj_BC_FUNCC + 44
9   libluajit-5.1.2.dylib         	       0x1050954fc lua_pcall + 148
10  libluajit-5.1.2.dylib         	       0x105088b74 lj_BC_FUNCC + 44
11  libmpv.1.dylib                	       0x1071001dc load_scripts + 456
12  libluajit-5.1.2.dylib         	       0x105088b74 lj_BC_FUNCC + 44
13  libluajit-5.1.2.dylib         	       0x1050954fc lua_pcall + 148
14  libluajit-5.1.2.dylib         	       0x105088b74 lj_BC_FUNCC + 44
15  libluajit-5.1.2.dylib         	       0x10509553c lua_cpcall + 28
16  libmpv.1.dylib                	       0x1071120f4 run_script + 124
17  libmpv.1.dylib                	       0x10711217c script_thread + 32
18  libsystem_pthread.dylib       	       0x1c6fe14ec _pthread_start + 148
19  libsystem_pthread.dylib       	       0x1c6fdc2d0 thread_start + 8

Thread 16:: AMCP Logging Spool
0   libsystem_kernel.dylib        	       0x1c6fa5990 semaphore_wait_trap + 8
1   caulk                         	       0x1cf9958ac caulk::mach::semaphore::wait_or_error() + 28
2   caulk                         	       0x1cf97865c caulk::concurrent::details::worker_thread::run() + 56
3   caulk                         	       0x1cf97827c 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       	       0x1c6fe14ec _pthread_start + 148
5   libsystem_pthread.dylib       	       0x1c6fdc2d0 thread_start + 8


Thread 14 crashed with ARM Thread State (64-bit):
    x0: 0x0000000106db3c28   x1: 0x0000000000000000   x2: 0x000000010b4b6a98   x3: 0x000000010b4b69d0
    x4: 0x00000000000004d0   x5: 0x0000000000000008   x6: 0x656c62616b656573   x7: 0x0000000000000000
    x8: 0x000000010508898c   x9: 0x000000010b4b6a98  x10: 0x00000000000003c6  x11: 0x000000010b4a1b50
   x12: 0x0000000106dab020  x13: 0x0000000105088810  x14: 0x0000000000000064  x15: 0x0000000080000002
   x16: 0x0000000000011954  x17: 0x0000000000000002  x18: 0x0000000000000000  x19: 0x000000010b4b69d0
   x20: 0x000000010b4b7848  x21: 0x000000010b4b7234  x22: 0x0000000106da03f0  x23: 0x0000000106da0380
   x24: 0xfff9000000000000  x25: 0x00000000fff90000  x26: 0xffffffffffffffff  x27: 0x0000000106efbe7c
   x28: 0x000000010b4b40a8   fp: 0x000000016c2867a0   lr: 0x0000000105088b74
    sp: 0x000000016c286790   pc: 0x0000000106efbe7c cpsr: 0x80001000
   far: 0x0000000106efbe7c  esr: 0x8200000f (Instruction Abort) Permission fault

Binary Images:
       0x1c7f1f000 -        0x1c830cfff com.apple.Foundation (6.9) <de039f1b-ffe5-3644-a8cf-7ba52c32cd73> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
       0x1d8372000 -        0x1d86e1fff libswiftFoundation.dylib (*) <5cf9fdc3-9a59-30eb-a96d-9c5747e36074> /usr/lib/swift/libswiftFoundation.dylib
       0x10431c000 -        0x10454ffff com.colliderli.iina (1.2.0) <b44a6e68-1172-30f9-b69f-7f426e732262> /Applications/IINA.app/Contents/MacOS/IINA
       0x1c7028000 -        0x1c756bfff com.apple.CoreFoundation (6.9) <b2ff96d0-ae99-31ef-9014-fc9964b4f3e0> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
       0x1c9bbe000 -        0x1caa6ffff com.apple.AppKit (6.9) <518f4e68-c324-320f-9d7f-85c224eae972> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
       0x1cd824000 -        0x1cd895fff com.apple.AE (924) <ace6e13c-98f1-383f-8df5-987ff5f75b71> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
       0x1cfbf0000 -        0x1cff1ffff com.apple.HIToolbox (2.1.1) <98ea191e-b6f8-3036-b267-eeadb5f03c7d> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
       0x104860000 -        0x1048bffff dyld (*) <86a8ba48-8bb4-3b30-9cda-051f73c74f44> /usr/lib/dyld
       0x1c6fda000 -        0x1c6fe6fff libsystem_pthread.dylib (*) <4786e19a-9312-38e6-80ef-9c1394548118> /usr/lib/system/libsystem_pthread.dylib
       0x1c6fa4000 -        0x1c6fd9fff libsystem_kernel.dylib (*) <c8524c02-b14f-30bd-a228-c44b4a448e68> /usr/lib/system/libsystem_kernel.dylib
       0x1c6e1f000 -        0x1c6e65fff libdispatch.dylib (*) <3d7a56a3-23bf-3077-b5c6-9ce65ce7333e> /usr/lib/system/libdispatch.dylib
       0x1c756c000 -        0x1c77ccfff com.apple.LaunchServices (1141.1) <69f720dc-0686-3aa0-87d3-dedf9449dadb> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
       0x1d8e09000 -        0x1d8f88fff com.apple.FileProvider (378.41.3) <2832fe3f-5b11-39e3-ac09-e8a71e62955b> /System/Library/Frameworks/FileProvider.framework/Versions/A/FileProvider
       0x106d68000 -        0x106d6ffff com.apple.FileProviderOverride (378.41.3) <8e2f579a-0efb-355b-954a-a7f422e1cfe7> /System/Library/Frameworks/FileProvider.framework/OverrideBundles/FileProviderOverride.bundle/Contents/MacOS/FileProviderOverride
       0x106d8c000 -        0x106d8ffff com.apple.CloudDocsFileProvider (1.0) <a973b79b-1a20-3770-b835-2ef01576c302> /System/Library/Frameworks/FileProvider.framework/OverrideBundles/CloudDocsFileProvider.bundle/Contents/MacOS/CloudDocsFileProvider
       0x1c9a0f000 -        0x1c9a4bfff com.apple.CoreServicesInternal (484) <00857513-c942-3ef8-b1b6-f21e575b43e3> /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal
       0x1ce49f000 -        0x1ce4c5fff com.apple.coreservices.SharedFileList (155) <905295e1-4055-3120-93c4-de8313611724> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList
       0x107044000 -        0x10735bfff libmpv.1.dylib (*) <9beead58-d963-39e6-ab83-092c9fa097e1> /Applications/IINA.app/Contents/Frameworks/libmpv.1.dylib
       0x105084000 -        0x1050ebfff libluajit-5.1.2.dylib (*) <e1334923-d0c5-3c80-a627-706bd131e8ea> /Applications/IINA.app/Contents/Frameworks/libluajit-5.1.2.dylib
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
       0x104bc0000 -        0x104be3fff libass.9.dylib (*) <05d14723-d6ed-39a2-ae08-5bfd3c41deb3> /Applications/IINA.app/Contents/Frameworks/libass.9.dylib
       0x1cf976000 -        0x1cf99dfff com.apple.audio.caulk (1.0) <c8b77e54-af14-37e1-8a72-6437f54c6fd1> /System/Library/PrivateFrameworks/caulk.framework/Versions/A/caulk

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=1.0G resident=0K(0%) swapped_out_or_unallocated=1.0G(100%)
Writable regions: Total=1.5G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.5G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        1 
ColorSync                          496K       24 
CoreGraphics                        16K        1 
CoreServices                        96K        1 
Kernel Alloc Once                   32K        1 
MALLOC                           275.3M       44 
MALLOC guard page                  192K       11 
MALLOC_MEDIUM (reserved)         840.0M        7         reserved VM address space (unallocated)
MALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)
STACK GUARD                       56.3M       17 
Stack                             16.5M       17 
VM_ALLOCATE                        1.0G       14 
__AUTH                            2306K      261 
__AUTH_CONST                      17.8M      441 
__DATA                            20.1M      458 
__DATA_CONST                      17.6M      483 
__DATA_DIRTY                      1513K      172 
__FONT_DATA                          4K        1 
__LINKEDIT                       574.4M       40 
__OBJC_CONST                      2825K      217 
__OBJC_RO                         81.8M        1 
__OBJC_RW                         3088K        1 
__TEXT                           451.0M      499 
__UNICODE                          588K        1 
dyld private memory               1024K        1 
mapped file                      132.3M       12 
shared memory                      848K       13 
===========                     =======  ======= 
TOTAL                              3.8G     2740 
TOTAL, minus reserved VM space     2.6G     2740 



-----------
Full Report
-----------

{"app_name":"IINA","timestamp":"2021-11-29 01:22:17.00 +0800","app_version":"1.2.0","slice_uuid":"b44a6e68-1172-30f9-b69f-7f426e732262","build_version":"129","platform":1,"bundleID":"com.colliderli.iina","share_with_app_devs":1,"is_first_party":0,"bug_type":"309","os_version":"macOS 12.0.1 (21A559)","incident_id":"7D34F584-FD1F-44F4-84F0-51A9CBB2DFE9","name":"IINA"}
{
  "uptime" : 26,
  "procLaunch" : "2021-11-29 01:22:02.1825 +0800",
  "procRole" : "Foreground",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "MacBookPro18,1",
  "procStartAbsTime" : 499146185,
  "coalitionID" : 427,
  "osVersion" : {
    "train" : "macOS 12.0.1",
    "build" : "21A559",
    "releaseType" : "User"
  },
  "captureTime" : "2021-11-29 01:22:07.7488 +0800",
  "incident" : "7D34F584-FD1F-44F4-84F0-51A9CBB2DFE9",
  "bug_type" : "309",
  "pid" : 417,
  "procExitAbsTime" : 541834609,
  "translated" : false,
  "cpuType" : "ARM-64",
  "procName" : "IINA",
  "procPath" : "\/Applications\/IINA.app\/Contents\/MacOS\/IINA",
  "bundleInfo" : {"CFBundleShortVersionString":"1.2.0","CFBundleVersion":"129","CFBundleIdentifier":"com.colliderli.iina"},
  "storeInfo" : {"deviceIdentifierForVendor":"BA2B650C-C1D8-5E34-B5E6-8D591C22D631","thirdParty":true},
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "com.colliderli.iina",
  "crashReporterKey" : "6B003244-78E0-07F2-4173-072C2FD1A758",
  "sip" : "enabled",
  "vmRegionInfo" : "0x106efbe7c is in 0x106eec000-0x106efc000;  bytes after start: 65148  bytes before end: 387\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      VM_ALLOCATE                 106ecc000-106eec000    [  128K] rw-\/rwx SM=PRV  \n--->  VM_ALLOCATE                 106eec000-106efc000    [   64K] r-x\/rwx SM=PRV  \n      GAP OF 0x4000 BYTES\n      MALLOC_TINY                 106f00000-107000000    [ 1024K] rw-\/rwx SM=PRV  ",
  "isCorpse" : 1,
  "exception" : {"codes":"0x0000000000000032, 0x0000000106efbe7c","rawCodes":[50,4411342460],"type":"EXC_BAD_ACCESS","signal":"SIGKILL (Code Signature Invalid)","subtype":"UNKNOWN_0x32 at 0x0000000106efbe7c"},
  "termination" : {"namespace":"CODESIGNING","flags":0,"code":2},
  "vmregioninfo" : "0x106efbe7c is in 0x106eec000-0x106efc000;  bytes after start: 65148  bytes before end: 387\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      VM_ALLOCATE                 106ecc000-106eec000    [  128K] rw-\/rwx SM=PRV  \n--->  VM_ALLOCATE                 106eec000-106efc000    [   64K] r-x\/rwx SM=PRV  \n      GAP OF 0x4000 BYTES\n      MALLOC_TINY                 106f00000-107000000    [ 1024K] rw-\/rwx SM=PRV  ",
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 14,
  "threads" : [{"id":3946,"queue":"com.apple.main-thread","frames":[{"imageOffset":47420,"symbol":"-[NSPlaceholderMutableString initWithString:]","symbolLocation":108,"imageIndex":0},{"imageOffset":199996,"symbol":"-[NSString stringByReplacingOccurrencesOfString:withString:options:range:]","symbolLocation":80,"imageIndex":0},{"imageOffset":34088,"symbol":"StringProtocol.replacingOccurrences<A, B>(of:with:options:range:)","symbolLocation":680,"imageIndex":1},{"symbol":"closure #1 in KeyMapping.init(key:rawAction:isIINACommand:comment:)","inline":true,"imageIndex":2,"imageOffset":1438076,"symbolLocation":60,"sourceLine":92,"sourceFile":"KeyMapping.swift"},{"imageOffset":1438076,"sourceFile":"<compiler-generated>","symbol":"thunk for @callee_guaranteed (@guaranteed String) -> (@error @owned Error)","imageIndex":2,"symbolLocation":60,"inline":true},{"imageOffset":1438076,"sourceFile":"<compiler-generated>","symbol":"specialized Sequence.forEach(_:)","imageIndex":2,"symbolLocation":60,"inline":true},{"imageOffset":1438076,"sourceLine":91,"sourceFile":"KeyMapping.swift","symbol":"specialized KeyMapping.init(key:rawAction:isIINACommand:comment:)","imageIndex":2,"symbolLocation":248},{"imageOffset":1441520,"sourceFile":"<compiler-generated>","symbol":"KeyMapping.init(key:rawAction:isIINACommand:comment:)","imageIndex":2,"symbolLocation":32,"inline":true},{"symbol":"KeyMapping.__allocating_init(key:rawAction:isIINACommand:comment:)","inline":true,"imageIndex":2,"imageOffset":1441520,"symbolLocation":32,"sourceLine":88,"sourceFile":"KeyMapping.swift"},{"imageOffset":1441520,"sourceLine":139,"sourceFile":"KeyMapping.swift","symbol":"specialized static KeyMapping.parseInputConf(at:)","imageIndex":2,"symbolLocation":2136},{"imageOffset":1319992,"sourceFile":"<compiler-generated>","symbol":"static KeyMapping.parseInputConf(at:)","imageIndex":2,"symbolLocation":12,"inline":true},{"imageOffset":1319992,"sourceLine":360,"sourceFile":"PlayerCore.swift","symbol":"specialized static PlayerCore.loadKeyBindings()","imageIndex":2,"symbolLocation":808},{"imageOffset":706188,"sourceFile":"<compiler-generated>","symbol":"static PlayerCore.loadKeyBindings()","imageIndex":2,"symbolLocation":4,"inline":true},{"symbol":"AppDelegate.getReady()","inline":true,"imageIndex":2,"imageOffset":706188,"symbolLocation":4,"sourceLine":83,"sourceFile":"AppDelegate.swift"},{"imageOffset":706188,"sourceLine":184,"sourceFile":"AppDelegate.swift","symbol":"AppDelegate.applicationDidFinishLaunching(_:)","imageIndex":2,"symbolLocation":724},{"imageOffset":709832,"symbol":"@objc AppDelegate.applicationWillFinishLaunching(_:)","symbolLocation":120,"imageIndex":2},{"imageOffset":495968,"symbol":"__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__","symbolLocation":28,"imageIndex":3},{"imageOffset":1166052,"symbol":"___CFXRegistrationPost_block_invoke","symbolLocation":52,"imageIndex":3},{"imageOffset":1165904,"symbol":"_CFXRegistrationPost","symbolLocation":456,"imageIndex":3},{"imageOffset":294416,"symbol":"_CFXNotificationPost","symbolLocation":720,"imageIndex":3},{"imageOffset":42464,"symbol":"-[NSNotificationCenter postNotificationName:object:userInfo:]","symbolLocation":96,"imageIndex":0},{"imageOffset":305148,"symbol":"-[NSApplication _postDidFinishNotification]","symbolLocation":340,"imageIndex":4},{"imageOffset":304404,"symbol":"-[NSApplication _sendFinishLaunchingNotification]","symbolLocation":236,"imageIndex":4},{"imageOffset":294676,"symbol":"-[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:]","symbolLocation":580,"imageIndex":4},{"imageOffset":293628,"symbol":"-[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:]","symbolLocation":780,"imageIndex":4},{"imageOffset":227380,"symbol":"-[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:]","symbolLocation":344,"imageIndex":0},{"imageOffset":226928,"symbol":"_NSAppleEventManagerGenericHandler","symbolLocation":96,"imageIndex":0},{"imageOffset":51036,"imageIndex":5},{"imageOffset":49332,"imageIndex":5},{"imageOffset":20356,"symbol":"aeProcessAppleEvent","symbolLocation":488,"imageIndex":5},{"imageOffset":269820,"symbol":"AEProcessAppleEvent","symbolLocation":68,"imageIndex":6},{"imageOffset":270040,"symbol":"_DPSNextEvent","symbolLocation":1848,"imageIndex":4},{"imageOffset":263056,"symbol":"-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]","symbolLocation":1332,"imageIndex":4},{"imageOffset":205744,"symbol":"-[NSApplication run]","symbolLocation":596,"imageIndex":4},{"imageOffset":14980,"symbol":"NSApplicationMain","symbolLocation":1064,"imageIndex":4},{"imageOffset":32140,"sourceLine":22,"sourceFile":"AppDelegate.swift","symbol":"main","imageIndex":2,"symbolLocation":12},{"imageOffset":20724,"symbol":"start","symbolLocation":520,"imageIndex":7}]},{"id":4360,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":8}]},{"id":4361,"queue":"app exceptions timeout queue","frames":[{"imageOffset":13916,"symbol":"kevent_qos","symbolLocation":8,"imageIndex":9},{"imageOffset":158552,"symbol":"_dispatch_kq_poll","symbolLocation":172,"imageIndex":10},{"imageOffset":157476,"symbol":"_dispatch_kq_drain","symbolLocation":188,"imageIndex":10},{"imageOffset":155816,"symbol":"_dispatch_event_loop_poke","symbolLocation":160,"imageIndex":10},{"imageOffset":134604,"symbol":"__31+[_LSExceptions sharedInstance]_block_invoke_2","symbolLocation":32,"imageIndex":11},{"imageOffset":7776,"symbol":"_dispatch_call_block_and_release","symbolLocation":32,"imageIndex":10},{"imageOffset":15276,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":10},{"imageOffset":45872,"symbol":"_dispatch_lane_serial_drain","symbolLocation":672,"imageIndex":10},{"imageOffset":48856,"symbol":"_dispatch_lane_invoke","symbolLocation":444,"imageIndex":10},{"imageOffset":91912,"symbol":"_dispatch_workloop_worker_thread","symbolLocation":656,"imageIndex":10},{"imageOffset":13744,"symbol":"_pthread_wqthread","symbolLocation":288,"imageIndex":8},{"imageOffset":8900,"symbol":"start_wqthread","symbolLocation":8,"imageIndex":8}]},{"id":4370,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":8}]},{"id":4371,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":8}]},{"id":4524,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":8}]},{"id":4528,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":8}]},{"id":4530,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":8}]},{"id":4534,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":8}]},{"id":4535,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":8}]},{"id":4536,"queue":"Background Recent Document Resolution (QOS: UNSPECIFIED)","frames":[{"imageOffset":9172,"symbol":"__open","symbolLocation":8,"imageIndex":9},{"imageOffset":50928,"symbol":"open","symbolLocation":64,"imageIndex":9},{"imageOffset":12904,"symbol":"-[NSURL(FPAdditions) fp_isInSyncableRootFast]","symbolLocation":96,"imageIndex":12},{"imageOffset":12736,"symbol":"-[NSURL(FPAdditions) fp_matchesFileProviderHeuristics:]","symbolLocation":248,"imageIndex":12},{"imageOffset":12476,"symbol":"FPURLMightBeInFileProvider","symbolLocation":44,"imageIndex":12},{"imageOffset":21792,"imageIndex":13},{"imageOffset":416564,"symbol":"__invoking___","symbolLocation":148,"imageIndex":3},{"imageOffset":416172,"symbol":"-[NSInvocation invoke]","symbolLocation":468,"imageIndex":3},{"imageOffset":626984,"symbol":"-[NSInvocation invokeWithTarget:]","symbolLocation":80,"imageIndex":3},{"imageOffset":11968,"symbol":"-[FPFrameworkOverridesIterator callNextOverrides]","symbolLocation":392,"imageIndex":12},{"imageOffset":418916,"symbol":"__FPCFCopyAttributeValuesForItem_block_invoke.80","symbolLocation":164,"imageIndex":12},{"imageOffset":8960,"imageIndex":14},{"imageOffset":416564,"symbol":"__invoking___","symbolLocation":148,"imageIndex":3},{"imageOffset":416172,"symbol":"-[NSInvocation invoke]","symbolLocation":468,"imageIndex":3},{"imageOffset":626984,"symbol":"-[NSInvocation invokeWithTarget:]","symbolLocation":80,"imageIndex":3},{"imageOffset":11968,"symbol":"-[FPFrameworkOverridesIterator callNextOverrides]","symbolLocation":392,"imageIndex":12},{"imageOffset":11444,"symbol":"-[FPFrameworkOverridesIterator forwardInvocation:]","symbolLocation":96,"imageIndex":12},{"imageOffset":409544,"symbol":"___forwarding___","symbolLocation":968,"imageIndex":3},{"imageOffset":408384,"symbol":"_CF_forwarding_prep_0","symbolLocation":96,"imageIndex":3},{"imageOffset":7836,"symbol":"FPCFCopyAttributeValuesForItem","symbolLocation":328,"imageIndex":12},{"imageOffset":121228,"symbol":"CopyFromFileProvider(__CFURL const*, void const*, void const**, __CFError**)","symbolLocation":88,"imageIndex":15},{"imageOffset":120968,"symbol":"ExternalProviderPrepareValues(__CFURL const*, __FileCache*, __CFString const* const*, void const**, long, void const*, __CFError**)","symbolLocation":372,"imageIndex":15},{"imageOffset":16496,"symbol":"prepareValuesForBitmap(__CFURL const*, __FileCache*, _FilePropertyBitmap*, __CFError**)","symbolLocation":412,"imageIndex":15},{"imageOffset":4296,"symbol":"_FSURLCopyResourcePropertyForKeyInternal(__CFURL const*, __CFString const*, void*, void*, __CFError**, unsigned char)","symbolLocation":232,"imageIndex":15},{"imageOffset":354812,"symbol":"CFURLCopyResourcePropertyForKey","symbolLocation":140,"imageIndex":3},{"imageOffset":449828,"symbol":"-[NSURL getResourceValue:forKey:error:]","symbolLocation":120,"imageIndex":3},{"imageOffset":952976,"symbol":"-[NSFileManager isUbiquitousItemAtURL:]","symbolLocation":72,"imageIndex":0},{"imageOffset":952312,"symbol":"-[NSFileManager _URLForTrashingItemAtURL:create:error:]","symbolLocation":76,"imageIndex":0},{"imageOffset":75344,"symbol":"-[NSURL(SFLAdditions) __sfl_isInTrash]","symbolLocation":100,"imageIndex":16},{"imageOffset":69080,"symbol":"+[SFLResolveResult resultByResolvingBookmarkData:options:relativeToURL:]","symbolLocation":188,"imageIndex":16},{"imageOffset":29720,"symbol":"__47-[_SFLItemWrapper initWithItem:listIdentifier:]_block_invoke","symbolLocation":104,"imageIndex":16},{"imageOffset":28568,"symbol":"-[SFLBookmark resolveWithOptions:relativeToURL:error:]","symbolLocation":144,"imageIndex":16},{"imageOffset":28064,"symbol":"+[SFLList(LSSharedFileListSupport) resolveItem:resolutionFlags:error:]","symbolLocation":100,"imageIndex":16},{"imageOffset":27344,"symbol":"+[SFLList(LSSharedFileListSupport) resolveItem:resolutionFlags:URL:fsRef:]","symbolLocation":108,"imageIndex":16},{"imageOffset":26968,"symbol":"LSSharedFileListItemResolve","symbolLocation":160,"imageIndex":16},{"imageOffset":3006504,"symbol":"__85-[_NSRecentDocumentInfo resolveByMountingVolumesIfNecessary:queue:completionHandler:]_block_invoke","symbolLocation":92,"imageIndex":4},{"imageOffset":284160,"symbol":"__NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__","symbolLocation":24,"imageIndex":0},{"imageOffset":283816,"symbol":"-[NSBlockOperation main]","symbolLocation":104,"imageIndex":0},{"imageOffset":283704,"symbol":"__NSOPERATION_IS_INVOKING_MAIN__","symbolLocation":24,"imageIndex":0},{"imageOffset":280188,"symbol":"-[NSOperation start]","symbolLocation":804,"imageIndex":0},{"imageOffset":279376,"symbol":"__NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__","symbolLocation":24,"imageIndex":0},{"imageOffset":279044,"symbol":"__NSOQSchedule_f","symbolLocation":184,"imageIndex":0},{"imageOffset":76176,"symbol":"_dispatch_block_async_invoke2","symbolLocation":148,"imageIndex":10},{"imageOffset":15276,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":10},{"imageOffset":28800,"symbol":"_dispatch_continuation_pop","symbolLocation":504,"imageIndex":10},{"imageOffset":26332,"symbol":"_dispatch_async_redirect_invoke","symbolLocation":596,"imageIndex":10},{"imageOffset":86812,"symbol":"_dispatch_root_queue_drain","symbolLocation":396,"imageIndex":10},{"imageOffset":88920,"symbol":"_dispatch_worker_thread2","symbolLocation":164,"imageIndex":10},{"imageOffset":13684,"symbol":"_pthread_wqthread","symbolLocation":228,"imageIndex":8},{"imageOffset":8900,"symbol":"start_wqthread","symbolLocation":8,"imageIndex":8}]},{"id":4537,"frames":[{"imageOffset":8892,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":8}]},{"id":4538,"name":"mpv\/mpv core","frames":[{"imageOffset":20672,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":9},{"imageOffset":31412,"symbol":"_pthread_cond_wait","symbolLocation":1228,"imageIndex":8},{"imageOffset":454944,"symbol":"mp_dispatch_queue_process","symbolLocation":292,"imageIndex":17},{"imageOffset":801600,"symbol":"mp_wait_events","symbolLocation":1040,"imageIndex":17},{"imageOffset":833892,"symbol":"mp_idle","symbolLocation":352,"imageIndex":17},{"imageOffset":748144,"symbol":"mp_play_files","symbolLocation":396,"imageIndex":17},{"imageOffset":580272,"symbol":"core_thread","symbolLocation":120,"imageIndex":17},{"imageOffset":29932,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":8},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":8}]},{"id":4544,"name":"mpv\/lua script (ytdl_hook)","frames":[{"imageOffset":20672,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":9},{"imageOffset":31412,"symbol":"_pthread_cond_wait","symbolLocation":1228,"imageIndex":8},{"imageOffset":567260,"symbol":"wait_wakeup","symbolLocation":300,"imageIndex":17},{"imageOffset":580968,"symbol":"mpv_wait_event","symbolLocation":572,"imageIndex":17},{"imageOffset":777508,"symbol":"script_raw_wait_event","symbolLocation":124,"imageIndex":17},{"imageOffset":19316,"symbol":"lj_BC_FUNCC","symbolLocation":44,"imageIndex":18},{"imageOffset":70908,"symbol":"lua_pcall","symbolLocation":148,"imageIndex":18},{"imageOffset":19316,"symbol":"lj_BC_FUNCC","symbolLocation":44,"imageIndex":18},{"imageOffset":770524,"symbol":"load_scripts","symbolLocation":456,"imageIndex":17},{"imageOffset":19316,"symbol":"lj_BC_FUNCC","symbolLocation":44,"imageIndex":18},{"imageOffset":70908,"symbol":"lua_pcall","symbolLocation":148,"imageIndex":18},{"imageOffset":19316,"symbol":"lj_BC_FUNCC","symbolLocation":44,"imageIndex":18},{"imageOffset":70972,"symbol":"lua_cpcall","symbolLocation":28,"imageIndex":18},{"imageOffset":844020,"symbol":"run_script","symbolLocation":124,"imageIndex":17},{"imageOffset":844156,"symbol":"script_thread","symbolLocation":32,"imageIndex":17},{"imageOffset":29932,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":8},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":8}]},{"triggered":true,"id":4545,"name":"mpv\/lua script (stats)","threadState":{"x":[{"value":4409998376},{"value":0},{"value":4484459160},{"value":4484458960},{"value":1232},{"value":8},{"value":7308324465868629363},{"value":0},{"value":4379412876,"symbolLocation":0,"symbol":"lj_BC_JITERL"},{"value":4484459160},{"value":966},{"value":4484373328},{"value":4409962528},{"value":4379412496,"symbolLocation":0,"symbol":"lj_BC_FORL"},{"value":100},{"value":2147483650},{"value":72020},{"value":2},{"value":0},{"value":4484458960},{"value":4484462664},{"value":4484461108},{"value":4409918448},{"value":4409918336},{"value":18444773748872577024},{"value":4294508544},{"value":18446744073709551615},{"value":4411342460},{"value":4484448424}],"flavor":"ARM_THREAD_STATE64","lr":{"value":4379413364},"cpsr":{"value":2147487744},"fp":{"value":6109554592},"sp":{"value":6109554576},"esr":{"value":2181038095,"description":"(Instruction Abort) Permission fault"},"pc":{"value":4411342460,"matchesCrashFrame":1},"far":{"value":4411342460}},"frames":[{"imageOffset":4411342460,"imageIndex":19},{"imageOffset":769180,"symbol":"load_builtin","symbolLocation":400,"imageIndex":17},{"imageOffset":19316,"symbol":"lj_BC_FUNCC","symbolLocation":44,"imageIndex":18},{"imageOffset":328288,"symbol":"lj_cf_package_require","symbolLocation":524,"imageIndex":18},{"imageOffset":770764,"symbol":"require","symbolLocation":180,"imageIndex":17},{"imageOffset":770188,"symbol":"load_scripts","symbolLocation":120,"imageIndex":17},{"imageOffset":19316,"symbol":"lj_BC_FUNCC","symbolLocation":44,"imageIndex":18},{"imageOffset":70908,"symbol":"lua_pcall","symbolLocation":148,"imageIndex":18},{"imageOffset":19316,"symbol":"lj_BC_FUNCC","symbolLocation":44,"imageIndex":18},{"imageOffset":70972,"symbol":"lua_cpcall","symbolLocation":28,"imageIndex":18},{"imageOffset":844020,"symbol":"run_script","symbolLocation":124,"imageIndex":17},{"imageOffset":844156,"symbol":"script_thread","symbolLocation":32,"imageIndex":17},{"imageOffset":29932,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":8},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":8}]},{"id":4546,"name":"mpv\/lua script (console)","frames":[{"imageOffset":136944,"symbol":"DYLD-STUB$$calloc","symbolLocation":0,"imageIndex":20},{"imageOffset":40024,"symbol":"ass_library_init","symbolLocation":20,"imageIndex":20},{"imageOffset":889200,"symbol":"mp_ass_init","symbolLocation":132,"imageIndex":17},{"imageOffset":922364,"symbol":"create_ass_track","symbolLocation":280,"imageIndex":17},{"imageOffset":625348,"symbol":"cmd_osd_overlay","symbolLocation":980,"imageIndex":17},{"imageOffset":603976,"symbol":"run_command","symbolLocation":2356,"imageIndex":17},{"imageOffset":569776,"symbol":"run_client_command","symbolLocation":448,"imageIndex":17},{"imageOffset":779316,"symbol":"script_command_native.5602","symbolLocation":160,"imageIndex":17},{"imageOffset":19316,"symbol":"lj_BC_FUNCC","symbolLocation":44,"imageIndex":18},{"imageOffset":70908,"symbol":"lua_pcall","symbolLocation":148,"imageIndex":18},{"imageOffset":19316,"symbol":"lj_BC_FUNCC","symbolLocation":44,"imageIndex":18},{"imageOffset":770524,"symbol":"load_scripts","symbolLocation":456,"imageIndex":17},{"imageOffset":19316,"symbol":"lj_BC_FUNCC","symbolLocation":44,"imageIndex":18},{"imageOffset":70908,"symbol":"lua_pcall","symbolLocation":148,"imageIndex":18},{"imageOffset":19316,"symbol":"lj_BC_FUNCC","symbolLocation":44,"imageIndex":18},{"imageOffset":70972,"symbol":"lua_cpcall","symbolLocation":28,"imageIndex":18},{"imageOffset":844020,"symbol":"run_script","symbolLocation":124,"imageIndex":17},{"imageOffset":844156,"symbol":"script_thread","symbolLocation":32,"imageIndex":17},{"imageOffset":29932,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":8},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":8}]},{"id":4548,"name":"AMCP Logging Spool","frames":[{"imageOffset":6544,"symbol":"semaphore_wait_trap","symbolLocation":8,"imageIndex":9},{"imageOffset":129196,"symbol":"caulk::mach::semaphore::wait_or_error()","symbolLocation":28,"imageIndex":21},{"imageOffset":9820,"symbol":"caulk::concurrent::details::worker_thread::run()","symbolLocation":56,"imageIndex":21},{"imageOffset":8828,"symbol":"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*)","symbolLocation":96,"imageIndex":21},{"imageOffset":29932,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":8},{"imageOffset":8912,"symbol":"thread_start","symbolLocation":8,"imageIndex":8}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7649488896,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.Foundation",
    "size" : 4120576,
    "uuid" : "de039f1b-ffe5-3644-a8cf-7ba52c32cd73",
    "path" : "\/System\/Library\/Frameworks\/Foundation.framework\/Versions\/C\/Foundation",
    "name" : "Foundation",
    "CFBundleVersion" : "1855.105"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7922458624,
    "size" : 3604480,
    "uuid" : "5cf9fdc3-9a59-30eb-a96d-9c5747e36074",
    "path" : "\/usr\/lib\/swift\/libswiftFoundation.dylib",
    "name" : "libswiftFoundation.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4365336576,
    "CFBundleShortVersionString" : "1.2.0",
    "CFBundleIdentifier" : "com.colliderli.iina",
    "size" : 2310144,
    "uuid" : "b44a6e68-1172-30f9-b69f-7f426e732262",
    "path" : "\/Applications\/IINA.app\/Contents\/MacOS\/IINA",
    "name" : "IINA",
    "CFBundleVersion" : "129"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7633797120,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.CoreFoundation",
    "size" : 5521408,
    "uuid" : "b2ff96d0-ae99-31ef-9014-fc9964b4f3e0",
    "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
    "name" : "CoreFoundation",
    "CFBundleVersion" : "1855.105"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7679500288,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.AppKit",
    "size" : 15409152,
    "uuid" : "518f4e68-c324-320f-9d7f-85c224eae972",
    "path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit",
    "name" : "AppKit",
    "CFBundleVersion" : "2113"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7742832640,
    "CFBundleShortVersionString" : "924",
    "CFBundleIdentifier" : "com.apple.AE",
    "size" : 466944,
    "uuid" : "ace6e13c-98f1-383f-8df5-987ff5f75b71",
    "path" : "\/System\/Library\/Frameworks\/CoreServices.framework\/Versions\/A\/Frameworks\/AE.framework\/Versions\/A\/AE",
    "name" : "AE",
    "CFBundleVersion" : "924"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7780368384,
    "CFBundleShortVersionString" : "2.1.1",
    "CFBundleIdentifier" : "com.apple.HIToolbox",
    "size" : 3342336,
    "uuid" : "98ea191e-b6f8-3036-b267-eeadb5f03c7d",
    "path" : "\/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/HIToolbox.framework\/Versions\/A\/HIToolbox",
    "name" : "HIToolbox"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4370857984,
    "size" : 393216,
    "uuid" : "86a8ba48-8bb4-3b30-9cda-051f73c74f44",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7633477632,
    "size" : 53248,
    "uuid" : "4786e19a-9312-38e6-80ef-9c1394548118",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7633256448,
    "size" : 221184,
    "uuid" : "c8524c02-b14f-30bd-a228-c44b4a448e68",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7631663104,
    "size" : 290816,
    "uuid" : "3d7a56a3-23bf-3077-b5c6-9ce65ce7333e",
    "path" : "\/usr\/lib\/system\/libdispatch.dylib",
    "name" : "libdispatch.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7639318528,
    "CFBundleShortVersionString" : "1141.1",
    "CFBundleIdentifier" : "com.apple.LaunchServices",
    "size" : 2494464,
    "uuid" : "69f720dc-0686-3aa0-87d3-dedf9449dadb",
    "path" : "\/System\/Library\/Frameworks\/CoreServices.framework\/Versions\/A\/Frameworks\/LaunchServices.framework\/Versions\/A\/LaunchServices",
    "name" : "LaunchServices",
    "CFBundleVersion" : "1141.1"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7933562880,
    "CFBundleShortVersionString" : "378.41.3",
    "CFBundleIdentifier" : "com.apple.FileProvider",
    "size" : 1572864,
    "uuid" : "2832fe3f-5b11-39e3-ac09-e8a71e62955b",
    "path" : "\/System\/Library\/Frameworks\/FileProvider.framework\/Versions\/A\/FileProvider",
    "name" : "FileProvider",
    "CFBundleVersion" : "378.41.3"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4409688064,
    "CFBundleShortVersionString" : "378.41.3",
    "CFBundleIdentifier" : "com.apple.FileProviderOverride",
    "size" : 32768,
    "uuid" : "8e2f579a-0efb-355b-954a-a7f422e1cfe7",
    "path" : "\/System\/Library\/Frameworks\/FileProvider.framework\/OverrideBundles\/FileProviderOverride.bundle\/Contents\/MacOS\/FileProviderOverride",
    "name" : "FileProviderOverride",
    "CFBundleVersion" : "378.41.3"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4409835520,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "com.apple.CloudDocsFileProvider",
    "size" : 16384,
    "uuid" : "a973b79b-1a20-3770-b835-2ef01576c302",
    "path" : "\/System\/Library\/Frameworks\/FileProvider.framework\/OverrideBundles\/CloudDocsFileProvider.bundle\/Contents\/MacOS\/CloudDocsFileProvider",
    "name" : "CloudDocsFileProvider",
    "CFBundleVersion" : "902.41.2"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7677734912,
    "CFBundleShortVersionString" : "484",
    "CFBundleIdentifier" : "com.apple.CoreServicesInternal",
    "size" : 249856,
    "uuid" : "00857513-c942-3ef8-b1b6-f21e575b43e3",
    "path" : "\/System\/Library\/PrivateFrameworks\/CoreServicesInternal.framework\/Versions\/A\/CoreServicesInternal",
    "name" : "CoreServicesInternal",
    "CFBundleVersion" : "484"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7755919360,
    "CFBundleShortVersionString" : "155",
    "CFBundleIdentifier" : "com.apple.coreservices.SharedFileList",
    "size" : 159744,
    "uuid" : "905295e1-4055-3120-93c4-de8313611724",
    "path" : "\/System\/Library\/Frameworks\/CoreServices.framework\/Versions\/A\/Frameworks\/SharedFileList.framework\/Versions\/A\/SharedFileList",
    "name" : "SharedFileList",
    "CFBundleVersion" : "155"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4412686336,
    "size" : 3244032,
    "uuid" : "9beead58-d963-39e6-ab83-092c9fa097e1",
    "path" : "\/Applications\/IINA.app\/Contents\/Frameworks\/libmpv.1.dylib",
    "name" : "libmpv.1.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4379394048,
    "size" : 425984,
    "uuid" : "e1334923-d0c5-3c80-a627-706bd131e8ea",
    "path" : "\/Applications\/IINA.app\/Contents\/Frameworks\/libluajit-5.1.2.dylib",
    "name" : "libluajit-5.1.2.dylib"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4374396928,
    "size" : 147456,
    "uuid" : "05d14723-d6ed-39a2-ae08-5bfd3c41deb3",
    "path" : "\/Applications\/IINA.app\/Contents\/Frameworks\/libass.9.dylib",
    "name" : "libass.9.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7777771520,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "com.apple.audio.caulk",
    "size" : 163840,
    "uuid" : "c8b77e54-af14-37e1-8a72-6437f54c6fd1",
    "path" : "\/System\/Library\/PrivateFrameworks\/caulk.framework\/Versions\/A\/caulk",
    "name" : "caulk"
  }
],
  "sharedCache" : {
  "base" : 7630307328,
  "size" : 3072180224,
  "uuid" : "a6162d66-93e3-3251-93cc-b11f7c8c830e"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=1.0G resident=0K(0%) swapped_out_or_unallocated=1.0G(100%)\nWritable regions: Total=1.5G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.5G(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nActivity Tracing                   256K        1 \nColorSync                          496K       24 \nCoreGraphics                        16K        1 \nCoreServices                        96K        1 \nKernel Alloc Once                   32K        1 \nMALLOC                           275.3M       44 \nMALLOC guard page                  192K       11 \nMALLOC_MEDIUM (reserved)         840.0M        7         reserved VM address space (unallocated)\nMALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)\nSTACK GUARD                       56.3M       17 \nStack                             16.5M       17 \nVM_ALLOCATE                        1.0G       14 \n__AUTH                            2306K      261 \n__AUTH_CONST                      17.8M      441 \n__DATA                            20.1M      458 \n__DATA_CONST                      17.6M      483 \n__DATA_DIRTY                      1513K      172 \n__FONT_DATA                          4K        1 \n__LINKEDIT                       574.4M       40 \n__OBJC_CONST                      2825K      217 \n__OBJC_RO                         81.8M        1 \n__OBJC_RW                         3088K        1 \n__TEXT                           451.0M      499 \n__UNICODE                          588K        1 \ndyld private memory               1024K        1 \nmapped file                      132.3M       12 \nshared memory                      848K       13 \n===========                     =======  ======= \nTOTAL                              3.8G     2740 \nTOTAL, minus reserved VM space     2.6G     2740 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "name" : "mpv\/lua script (stats)"
  }
},
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "60da5e84ab0ca017dace9abf",
      "factorPackIds" : {

      },
      "deploymentId" : 240000008
    },
    {
      "rolloutId" : "607844aa04477260f58a8077",
      "factorPackIds" : {
        "SIRI_MORPHUN_ASSETS" : "6103050cbfe6dc472e1c982a"
      },
      "deploymentId" : 240000066
    },
    {
      "rolloutId" : "5ffde50ce2aacd000d47a95f",
      "factorPackIds" : {

      },
      "deploymentId" : 240000076
    },
    {
      "rolloutId" : "602ad4dac86151000cf27e46",
      "factorPackIds" : {
        "SIRI_DICTATION_ASSETS" : "6181ebb28763315b9604755e"
      },
      "deploymentId" : 240000271
    },
    {
      "rolloutId" : "5fc94383418129005b4e9ae0",
      "factorPackIds" : {

      },
      "deploymentId" : 240000162
    },
    {
      "rolloutId" : "601d9415f79519000ccd4b69",
      "factorPackIds" : {
        "SIRI_TEXT_TO_SPEECH" : "6194416dea7ed64a7812a429"
      },
      "deploymentId" : 240000322
    }
  ],
  "experiments" : [

  ]
}
}

Model: MacBookPro18,1, BootROM 7429.41.5, proc 10:8:2 processors, 16 GB, SMC 
Graphics: Apple M1 Pro, Apple M1 Pro, Built-In
Display: Color LCD, 3456 x 2234 Retina, Main, MirrorOff, Online
Memory Module: LPDDR5
AirPort: Wi-Fi, wl0: Sep 24 2021 15:49:44 version 20.10.853.23.8.7.106 FWID 01-78e271b2
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: USB31Bus
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.

mpv log:
N/A

Steps to reproduce:

Just run IINA and it may crash when starting

  • MPV does not have this problem.

How often does this happen?
Some time. I can't reproduce it consistently

@low-batt
Copy link
Contributor

low-batt commented Dec 3, 2021

I have encountered this as well with development builds using Xcode 13.1 under macOS 12.0.1 on a MacBook Pro with the M1 Max chip. Because it was during development I made a mental note to look at it later. When I saw this issue I decided I'd keep an eye out for it. Just crashed on me again. The crashed thread shows the same location as in the crash report posted above:

Thread 14 Crashed:: mpv/lua script (stats)
0   ???                           	       0x1044b7e7c ???
1   libmpv.1.dylib                	       0x1053fe294 load_builtin + 400
2   libluajit-5.1.2.dylib         	       0x103d80b74 lj_BC_FUNCC + 44

This was running a debug build outside of Xcode. I don't remember having encountered this while running from Xcode. I was running iina-cli from terminal. I just executed the same command line again and IINA worked.

A "Code Signature Invalid" under Monterey issue has recently been filed against Node: nodejs/node#40827 Similar behavior of not consistently failing.

In poking around the net I also found a report of Wireshark crashing with such an error running under a Monterey Beta version.

This is smelling like some sort of thread race condition in Apple's checking of code signatures.

Checking the signing of the official IINA 1.2.0 release under Monterey shows no errors.

Validating Code Signatures
low-batt@gag ~$ spctl --assess --type exec --verbose=2 /Applications/IINA.app
/Applications/IINA.app: accepted
source=Notarized Developer ID

low-batt@gag ~$ codesign -dv --verbose=4 /Applications/IINA.app
Executable=/Applications/IINA.app/Contents/MacOS/IINA
Identifier=com.colliderli.iina
Format=app bundle with Mach-O universal (x86_64 arm64)
CodeDirectory v=20500 size=42399 flags=0x10000(runtime) hashes=1314+7 location=embedded
VersionPlatform=1
VersionMin=720896
VersionSDK=721152
Hash type=sha256 size=32
CandidateCDHash sha1=3dd38b5fd5d2e8f251e0e7fbdcbd97301ea62629
CandidateCDHashFull sha1=3dd38b5fd5d2e8f251e0e7fbdcbd97301ea62629
CandidateCDHash sha256=6d09a2ec8dbded5683832d8464a4672d1aa8d5a0
CandidateCDHashFull sha256=6d09a2ec8dbded5683832d8464a4672d1aa8d5a022c25e56bacc5fcc1f59f87a
Hash choices=sha1,sha256
CMSDigest=0ad18510b1f7fa6eca3fff4e2e05daa9cdaea92a7fe9cd9dd1ed5c74d486af11
CMSDigestType=2
Executable Segment base=0
Executable Segment limit=1851392
Executable Segment flags=0x1
Page size=4096
CDHash=6d09a2ec8dbded5683832d8464a4672d1aa8d5a0
Signature size=8999
Authority=Developer ID Application: HeChen LI (67CQ77V27R)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=Jan 20, 2021 at 10:16:47 PM
Info.plist entries=34
TeamIdentifier=67CQ77V27R
Runtime Version=11.1.0
Sealed Resources version=2 rules=13 files=859
Internal requirements count=1 size=212

low-batt@gag ~$ codesign --display --strict --verbose=4 --verify /Applications/IINA.app
--prepared:/Applications/IINA.app/Contents/MacOS/youtube-dl
--validated:/Applications/IINA.app/Contents/MacOS/youtube-dl
--prepared:/Applications/IINA.app/Contents/PlugIns/OpenInIINA.appex
--validated:/Applications/IINA.app/Contents/PlugIns/OpenInIINA.appex
--prepared:/Applications/IINA.app/Contents/MacOS/iina-cli
--validated:/Applications/IINA.app/Contents/MacOS/iina-cli
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftAppKit.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftAppKit.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftObjectiveC.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftObjectiveC.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftCoreImage.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftCoreImage.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libpostproc.55.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libpostproc.55.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libgraphite2.3.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libgraphite2.3.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libgnutls.30.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libgnutls.30.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libp11-kit.0.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libp11-kit.0.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libpcre.1.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libpcre.1.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libmujs.so
--validated:/Applications/IINA.app/Contents/Frameworks/libmujs.so
--prepared:/Applications/IINA.app/Contents/Frameworks/libdav1d.5.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libdav1d.5.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftXPC.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftXPC.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftCoreGraphics.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftCoreGraphics.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftSafariServices.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftSafariServices.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftCore.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftCore.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswresample.3.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswresample.3.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libtasn1.6.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libtasn1.6.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libidn2.0.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libidn2.0.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswscale.5.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswscale.5.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/liblept.5.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/liblept.5.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/Sparkle.framework/Versions/Current/.
--validated:/Applications/IINA.app/Contents/Frameworks/Sparkle.framework/Versions/Current/.
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftMetal.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftMetal.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftDispatch.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftDispatch.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftCoreData.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftCoreData.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libavformat.58.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libavformat.58.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libavfilter.7.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libavfilter.7.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libopenjp2.7.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libopenjp2.7.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libglib-2.0.0.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libglib-2.0.0.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/liblua.5.1.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/liblua.5.1.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/liblcms2.2.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/liblcms2.2.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/Just.framework/Versions/Current/.
--validated:/Applications/IINA.app/Contents/Frameworks/Just.framework/Versions/Current/.
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftos.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftos.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftCoreFoundation.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftCoreFoundation.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftCloudKit.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftCloudKit.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftDarwin.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftDarwin.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libpng16.16.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libpng16.16.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftContacts.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftContacts.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libssl.1.1.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libssl.1.1.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libfreetype.6.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libfreetype.6.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/Gzip.framework/Versions/Current/.
--validated:/Applications/IINA.app/Contents/Frameworks/Gzip.framework/Versions/Current/.
--prepared:/Applications/IINA.app/Contents/Frameworks/Mustache.framework/Versions/Current/.
--validated:/Applications/IINA.app/Contents/Frameworks/Mustache.framework/Versions/Current/.
--prepared:/Applications/IINA.app/Contents/Frameworks/libharfbuzz.0.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libharfbuzz.0.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libavutil.56.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libavutil.56.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libgif.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libgif.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libmpv.1.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libmpv.1.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftQuartzCore.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftQuartzCore.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libavresample.4.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libavresample.4.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libjpeg.9.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libjpeg.9.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libuchardet.0.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libuchardet.0.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libhogweed.6.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libhogweed.6.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/librubberband.2.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/librubberband.2.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libintl.8.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libintl.8.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libsoxr.0.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libsoxr.0.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/PromiseKit.framework/Versions/Current/.
--validated:/Applications/IINA.app/Contents/Frameworks/PromiseKit.framework/Versions/Current/.
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftCoreAudio.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftCoreAudio.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftIOKit.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftIOKit.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftAVFoundation.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftAVFoundation.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libavdevice.58.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libavdevice.58.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libwebp.7.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libwebp.7.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libnettle.8.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libnettle.8.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libass.9.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libass.9.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libfribidi.0.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libfribidi.0.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libfontconfig.1.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libfontconfig.1.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libwebpmux.3.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libwebpmux.3.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libvidstab.1.1.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libvidstab.1.1.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libffi.7.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libffi.7.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/liblz4.1.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/liblz4.1.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftCoreMedia.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftCoreMedia.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftFoundation.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftFoundation.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftCoreLocation.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftCoreLocation.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libspeex.1.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libspeex.1.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/liblzma.5.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/liblzma.5.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libsnappy.1.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libsnappy.1.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libunistring.2.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libunistring.2.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libtiff.5.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libtiff.5.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libzstd.1.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libzstd.1.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libarchive.13.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libarchive.13.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libcrypto.1.1.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libcrypto.1.1.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/librtmp.1.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/librtmp.1.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libbluray.2.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libbluray.2.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libswiftsimd.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libswiftsimd.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libb2.1.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libb2.1.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libgmp.10.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libgmp.10.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libtesseract.4.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libtesseract.4.dylib
--prepared:/Applications/IINA.app/Contents/Frameworks/libavcodec.58.dylib
--validated:/Applications/IINA.app/Contents/Frameworks/libavcodec.58.dylib
/Applications/IINA.app: valid on disk
/Applications/IINA.app: satisfies its Designated Requirement
low-batt@gag ~$ 

@low-batt
Copy link
Contributor

low-batt commented Dec 3, 2021

I dug into this some today and came up empty. This is what I checked.

In the crashed thread the LuaJIT library is calling the mpv method load_file:

static void load_file(lua_State *L, const char *fname)
{
    struct script_ctx *ctx = get_ctx(L);
    MP_DBG(ctx, "loading file %s\n", fname);
    struct bstr s = stream_read_file(fname, ctx, ctx->mpctx->global, 100000000);
    if (!s.start)
        luaL_error(L, "Could not read file.\n");
    if (luaL_loadbuffer(L, s.start, s.len, fname))
        lua_error(L);
    lua_call(L, 0, 1);
    talloc_free(s.start);
}

I believe this stacktrace from the crashing thread:

0   ???                           	       0x1044b7e7c ???
1   libmpv.1.dylib                	       0x1053fe294 load_builtin + 400

Indicates load_builtin called lua_call which adjusted the stack and called into code generated on the fly from the Lua script. Use of plugins and just-in-time compilation requires an application to have special entitlements as compiled plugin code is not code signed. IINA is already configured with the required entitlements:

This Apple document: Porting Just-In-Time Compilers to Apple Silicon

Discusses requirements that are also required on Intel Macs. But there is this new requirement for Apple silicon:

Always call sys_icache_invalidate(::) before you execute the machine instructions on a recently updated memory page. On Apple silicon, the instruction caches aren’t coherent with data caches, and unexpected results may occur if you execute instructions without invalidating the caches. It’s also safe to call the sys_icache_invalidate(::) function on Intel-based Mac computers, where the function does nothing.

Could that be an issue? Does Luajit handle that? This is the Luajit code:

/* Synchronize data/instruction cache. */
void lj_mcode_sync(void *start, void *end)
{
#ifdef LUAJIT_USE_VALGRIND
  VALGRIND_DISCARD_TRANSLATIONS(start, (char *)end-(char *)start);
#endif
#if LJ_TARGET_X86ORX64
  UNUSED(start); UNUSED(end);
#elif LJ_TARGET_IOS
  sys_icache_invalidate(start, (char *)end-(char *)start);
#elif LJ_TARGET_PPC
  lj_vm_cachesync(start, end);
#elif defined(__GNUC__) || defined(__clang__)
  __clear_cache(start, end);
#else
#error "Missing builtin to flush instruction cache"
#endif
}

For macOS __clang__ should be defined, so Luajit should be calling __clear_cache and of course the LLVM runtimes handle this correctly. From clear_cache.c:

#if __APPLE__
  // On Darwin, sys_icache_invalidate() provides this functionality
  sys_icache_invalidate(start, end - start);

I didn't find anything that could explain the random "Code Signature Invalid" failures.

@CarterLi
Copy link
Contributor Author

CarterLi commented Dec 5, 2021

Got this 4 times today. I'll test if building mpv with regular lua instead of luajit helps

@low-batt
Copy link
Contributor

low-batt commented Dec 5, 2021

That sounds like a good experiment.
I have asked in the Telegram group if anyone else is experiencing this crash.

CarterLi added a commit to CarterLi/iina that referenced this issue Dec 6, 2021
CarterLi added a commit to CarterLi/iina that referenced this issue Dec 14, 2021
@su-thomas
Copy link

Running codesign --force -s - IINA.app/Contents/MacOS/IINA resolved the issue for me.

@low-batt
Copy link
Contributor

@su-thomas Thanks very much for reporting your experience. Unfortunately your report adds to the confusion surrounding this failure.

Did you encounter this under macOS 12, or some other version?
Which Mac model do you have?

I'm still looking into this one but I keep finding other problems while trying to reproduce it. I wasn't quite ready to post an analysis as I still can't explain why this failure has popped up now. Here is what I know so far...

The analysis of the crash above appears to indicate that macOS is rejecting the execution of Lua code that has been compiled on the fly by OpenResty's LuaJIT library. That should have to do with the application's entitlements. IINA is built with the Allow Execution of JIT-compiled Code Entitlement, com.apple.security.cs.allow-jit. From Apple's documentation of that entitlement:

A Boolean value that indicates whether the app may create writable and executable memory using the MAP_JIT flag.

The MAP_JIT flag is also mentioned in Porting Just-In-Time Compilers to Apple Silicon.

@saagarjha has pointed out that the OpenResty LuaJIT library is not using the MAP_JIT flag.

This Firefox bug report, macOS startup crash "Code Signature Invalid", indicates a different entitlement is required if MAP_JIT is not used:

<!-- Firefox does not use MAP_JIT for executable mappings -->
<key>com.apple.security.cs.allow-jit</key><false/>

<!-- Firefox needs to create executable pages (without MAP_JIT) -->
<key>com.apple.security.cs.allow-unsigned-executable-memory</key><true/>

Apple's documentation for the Allow Unsigned Executable Memory Entitlement, com.apple.security.cs.allow-unsigned-executable-memory, says:

A Boolean value that indicates whether the app may create writable and executable memory without the restrictions imposed by using the MAP_JIT flag.

This Apple forum thread: App not launching after signing with hardened runtime, involves Lua and in the second post the user appears to have encountered the same failure as being discussed here. The solution that worked was to use the com.apple.security.cs.allow-unsigned-executable-memory entitlement.

Apple developer relations commented on this thread that it is highly desirable to follow the Apple recommended JIT techniques so that the com.apple.security.cs.allow-jit entitlement can be used.

I was hoping to gather a little more evidence before asking the LuaJIT project for their thoughts on this issue.

Given all that I'm confused as to why resigning the application cleared the problem for you.

@su-thomas
Copy link

su-thomas commented Dec 21, 2021

@low-batt My apologies for the lack of context.

I was having the same issue (crash message Code Signature Invalid) on every launch. However this is on macOS 11, MBP 13" 2020 (Intel) and with a build with MPV 0.34.0.

Crashed Thread:        8  mpv/lua script (stats)

Exception Type:        EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes:       0x0000000000000032, 0x0000000111ff9e59
Exception Note:        EXC_CORPSE_NOTIFY

After resigning the application, the app launches without crash.

@low-batt
Copy link
Contributor

Interesting.
You are building locally with Xcode and upgraded dependencies?

If you building locally can you rebuild, not sign, and confirm you still experience the crash. If so, then subsitute this file for "iina/IINA.entitlements":

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
	<true/>
	<key>com.apple.security.cs.disable-library-validation</key>
	<true/>
</dict>
</plist>

Rebuild. Not sign. See if the crash still reproduces.

I replaced the key com.apple.security.cs.allow-jit with com.apple.security.cs.allow-unsigned-executable-memory. Interested in whether with that change you can run without having to resign the application.

When editing entitlements inside Xcode that is shown as "Allow Unsigned Executable Memory".

@su-thomas
Copy link

su-thomas commented Dec 22, 2021

@low-batt yes, building locally with upgraded mpv deps.
That seems to have also solved the issue I was having, thanks!

@low-batt
Copy link
Contributor

Thank YOU for running that test! That appears to confirm some of the above findings. Still some aspects of this behavior are confusing, like why has this come up now, and why does resigning also clear the problem? I will dig into it a bit more to see if I can explain any of that.

I will be asking the OpenResty LuaJIT project about following Apple's best practices and adding use of the MAP_JIT flag.

low-batt added a commit to low-batt/iina that referenced this issue Dec 23, 2021
This commit will replace the entitlement "com.apple.security.cs.allow-jit" with
"com.apple.security.cs.allow-unsigned-executable-memory" in the
IINA.entitlements file.

This is required because the OpenResty LuaJIT library is not following Apple's
best practices for JIT compilers that allow use of the more restrictive
entitlement. This has been reported in this LuaJIT issue:

Code Signature Invalid crash using com.apple.security.cs.allow-jit
openresty/luajit2#145
low-batt added a commit to CarterLi/iina that referenced this issue Dec 23, 2021
This commit will replace the entitlement "com.apple.security.cs.allow-jit" with
"com.apple.security.cs.allow-unsigned-executable-memory" in the
IINA.entitlements file.

This is required because the OpenResty LuaJIT library is not following Apple's
best practices for JIT compilers that allow use of the more restrictive
entitlement. This has been reported in this LuaJIT issue:

Code Signature Invalid crash using com.apple.security.cs.allow-jit
openresty/luajit2#145
CarterLi added a commit to CarterLi/iina that referenced this issue Jan 19, 2022
CarterLi pushed a commit to CarterLi/iina that referenced this issue Jan 19, 2022
This commit will replace the entitlement "com.apple.security.cs.allow-jit" with
"com.apple.security.cs.allow-unsigned-executable-memory" in the
IINA.entitlements file.

This is required because the OpenResty LuaJIT library is not following Apple's
best practices for JIT compilers that allow use of the more restrictive
entitlement. This has been reported in this LuaJIT issue:

Code Signature Invalid crash using com.apple.security.cs.allow-jit
openresty/luajit2#145
CarterLi added a commit to CarterLi/iina that referenced this issue Jan 21, 2022
CarterLi pushed a commit to CarterLi/iina that referenced this issue Jan 21, 2022
This commit will replace the entitlement "com.apple.security.cs.allow-jit" with
"com.apple.security.cs.allow-unsigned-executable-memory" in the
IINA.entitlements file.

This is required because the OpenResty LuaJIT library is not following Apple's
best practices for JIT compilers that allow use of the more restrictive
entitlement. This has been reported in this LuaJIT issue:

Code Signature Invalid crash using com.apple.security.cs.allow-jit
openresty/luajit2#145
low-batt pushed a commit to CarterLi/iina that referenced this issue Jan 21, 2022
low-batt added a commit to CarterLi/iina that referenced this issue Jan 21, 2022
This commit will replace the entitlement "com.apple.security.cs.allow-jit" with
"com.apple.security.cs.allow-unsigned-executable-memory" in the
IINA.entitlements file.

This is required because the OpenResty LuaJIT library is not following Apple's
best practices for JIT compilers that allow use of the more restrictive
entitlement. This has been reported in this LuaJIT issue:

Code Signature Invalid crash using com.apple.security.cs.allow-jit
openresty/luajit2#145
CarterLi added a commit to CarterLi/iina that referenced this issue Feb 18, 2022
CarterLi pushed a commit to CarterLi/iina that referenced this issue Feb 18, 2022
This commit will replace the entitlement "com.apple.security.cs.allow-jit" with
"com.apple.security.cs.allow-unsigned-executable-memory" in the
IINA.entitlements file.

This is required because the OpenResty LuaJIT library is not following Apple's
best practices for JIT compilers that allow use of the more restrictive
entitlement. This has been reported in this LuaJIT issue:

Code Signature Invalid crash using com.apple.security.cs.allow-jit
openresty/luajit2#145
CarterLi added a commit to CarterLi/iina that referenced this issue Feb 21, 2022
CarterLi pushed a commit to CarterLi/iina that referenced this issue Feb 21, 2022
This commit will replace the entitlement "com.apple.security.cs.allow-jit" with
"com.apple.security.cs.allow-unsigned-executable-memory" in the
IINA.entitlements file.

This is required because the OpenResty LuaJIT library is not following Apple's
best practices for JIT compilers that allow use of the more restrictive
entitlement. This has been reported in this LuaJIT issue:

Code Signature Invalid crash using com.apple.security.cs.allow-jit
openresty/luajit2#145
CarterLi added a commit to CarterLi/iina that referenced this issue Feb 28, 2022
CarterLi pushed a commit to CarterLi/iina that referenced this issue Feb 28, 2022
This commit will replace the entitlement "com.apple.security.cs.allow-jit" with
"com.apple.security.cs.allow-unsigned-executable-memory" in the
IINA.entitlements file.

This is required because the OpenResty LuaJIT library is not following Apple's
best practices for JIT compilers that allow use of the more restrictive
entitlement. This has been reported in this LuaJIT issue:

Code Signature Invalid crash using com.apple.security.cs.allow-jit
openresty/luajit2#145
@xilin
Copy link

xilin commented Mar 5, 2022

@low-batt
Copy link
Contributor

low-batt commented Mar 5, 2022

The Apple article Updating Mac Software cited is related in that it is discussing a way to trigger a "Code Signature Invalid" failure, the failure at the root cause of this issue. However that article is about how to avoid triggering this failure when updating an application. That is not the case at hand.

IINA is a user interface for the command line movie player mpv. Both mpv and IINA support the ability to customize the behavior of the player by embedding scripts written in the programming language Lua. See the LUA SCRIPTING section of the mpv manual for details. Even if an IINA user does not customize IINA with such scripts Lua is still being used because the mpv player library implements some operations using Lua scripts.

Applications can execute scripts using a software Interpreter. Using a software interpreter is a fine approach for scripts that are not frequently executed. However if a script is going to be run many times it is more efficient to use Just-in-time compilation. IINA is using OpenResty's LuaJIT library to compile Lua scripts at runtime.

This means that IINA through the LuaJIT library is generating unsigned code at runtime. Special requirements related to code signing for applications that use JIT are discussed in the Apple article Porting Just-In-Time Compilers to Apple Silicon. As per that document IINA is using Allow Execution of JIT-compiled Code Entitlement. The failure occurs because the LuaJIT library is not following the requirements specified in that Apple document. This has been reported against the LuaJIT library in issue openresty/luajit2#145.

Until the LuaJIT library is fixed IINA will have to use Allow Unsigned Executable Memory Entitlement. That proposed change is in PR #3592. Although that PR has not been merged yet it is considered a must fix for the next release.

CarterLi added a commit to CarterLi/iina that referenced this issue Apr 23, 2022
CarterLi pushed a commit to CarterLi/iina that referenced this issue Apr 23, 2022
This commit will replace the entitlement "com.apple.security.cs.allow-jit" with
"com.apple.security.cs.allow-unsigned-executable-memory" in the
IINA.entitlements file.

This is required because the OpenResty LuaJIT library is not following Apple's
best practices for JIT compilers that allow use of the more restrictive
entitlement. This has been reported in this LuaJIT issue:

Code Signature Invalid crash using com.apple.security.cs.allow-jit
openresty/luajit2#145
low-batt pushed a commit to CarterLi/iina that referenced this issue Apr 23, 2022
low-batt added a commit to CarterLi/iina that referenced this issue Apr 23, 2022
This commit will replace the entitlement "com.apple.security.cs.allow-jit" with
"com.apple.security.cs.allow-unsigned-executable-memory" in the
IINA.entitlements file.

This is required because the OpenResty LuaJIT library is not following Apple's
best practices for JIT compilers that allow use of the more restrictive
entitlement. This has been reported in this LuaJIT issue:

Code Signature Invalid crash using com.apple.security.cs.allow-jit
openresty/luajit2#145
low-batt pushed a commit to CarterLi/iina that referenced this issue Apr 24, 2022
low-batt added a commit to CarterLi/iina that referenced this issue Apr 24, 2022
This commit will replace the entitlement "com.apple.security.cs.allow-jit" with
"com.apple.security.cs.allow-unsigned-executable-memory" in the
IINA.entitlements file.

This is required because the OpenResty LuaJIT library is not following Apple's
best practices for JIT compilers that allow use of the more restrictive
entitlement. This has been reported in this LuaJIT issue:

Code Signature Invalid crash using com.apple.security.cs.allow-jit
openresty/luajit2#145
low-batt pushed a commit to CarterLi/iina that referenced this issue Apr 27, 2022
low-batt added a commit to CarterLi/iina that referenced this issue Apr 27, 2022
This commit will replace the entitlement "com.apple.security.cs.allow-jit" with
"com.apple.security.cs.allow-unsigned-executable-memory" in the
IINA.entitlements file.

This is required because the OpenResty LuaJIT library is not following Apple's
best practices for JIT compilers that allow use of the more restrictive
entitlement. This has been reported in this LuaJIT issue:

Code Signature Invalid crash using com.apple.security.cs.allow-jit
openresty/luajit2#145
CarterLi added a commit to CarterLi/iina that referenced this issue Apr 28, 2022
CarterLi pushed a commit to CarterLi/iina that referenced this issue Apr 28, 2022
This commit will replace the entitlement "com.apple.security.cs.allow-jit" with
"com.apple.security.cs.allow-unsigned-executable-memory" in the
IINA.entitlements file.

This is required because the OpenResty LuaJIT library is not following Apple's
best practices for JIT compilers that allow use of the more restrictive
entitlement. This has been reported in this LuaJIT issue:

Code Signature Invalid crash using com.apple.security.cs.allow-jit
openresty/luajit2#145
lhc70000 pushed a commit that referenced this issue Apr 30, 2022
This commit will replace the entitlement "com.apple.security.cs.allow-jit" with
"com.apple.security.cs.allow-unsigned-executable-memory" in the
IINA.entitlements file.

This is required because the OpenResty LuaJIT library is not following Apple's
best practices for JIT compilers that allow use of the more restrictive
entitlement. This has been reported in this LuaJIT issue:

Code Signature Invalid crash using com.apple.security.cs.allow-jit
openresty/luajit2#145
@low-batt
Copy link
Contributor

The fix (a workaround) in PR #3592 has been merged into the develop branch.

low-batt pushed a commit to CarterLi/iina that referenced this issue May 1, 2022
CarterLi added a commit to CarterLi/iina that referenced this issue May 5, 2022
CarterLi added a commit to CarterLi/iina that referenced this issue May 9, 2022
CarterLi added a commit to CarterLi/iina that referenced this issue May 17, 2022
low-batt pushed a commit to CarterLi/iina that referenced this issue May 28, 2022
@low-batt
Copy link
Contributor

Closing. Fixed in IINA 1.3.0.

CarterLi added a commit to CarterLi/iina that referenced this issue Jun 8, 2022
CarterLi added a commit to CarterLi/iina that referenced this issue Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants