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

Cannot apply video filters to multiple windows #4273

Closed
kaieberl opened this issue Mar 17, 2023 · 6 comments · Fixed by #4316
Closed

Cannot apply video filters to multiple windows #4273

kaieberl opened this issue Mar 17, 2023 · 6 comments · Fixed by #4316

Comments

@kaieberl
Copy link

kaieberl commented Mar 17, 2023

macOS 13.2.1, IINA 1.3.1

Behavior:

When I open a video and apply some video filter to it, then open another video in a new window and try to apply any video filters to it, nothing happens in the current window and instead, the filters get applied to the first window.

Steps to reproduce:
Open some video, apply e.g. a crop filter crop=720:::
Then open another video in a new window and try to apply the same or any other filter, e.g. crop=1080:::

@low-batt low-batt added the bug label Mar 17, 2023
@low-batt
Copy link
Contributor

Reproduced for me. Sometimes it works. But I was able to trigger incorrect behavior with multiple windows.

@low-batt low-batt self-assigned this Mar 20, 2023
@low-batt
Copy link
Contributor

Analysis

The primary problem can been seen in this line from FilterWindowController:

func reloadTable() {
  filters = PlayerCore.active.mpv.getFilters(filterType)

The PlayerCore.active property looks like this:

static var active: PlayerCore {
  if let wc = NSApp.mainWindow?.windowController as? MainWindowController {
    return wc.player
  } else {
    return first
  }
}

The problem with FilterWindowController using PlayerCore.active is that the filter window is an independent window. Clicking on the filter window will change NSApp.mainWindow to be the filter window in which will cause the first player core to be returned, which may or may not be appropriate. Other window controllers such as InspectorWindowController use PlayerCore.lastActive to avoid this issue.

There is another way filters can be incorrectly applied. Stopping a mpv player core does not clear filters. IINA caches PlayerCore objects along with their mpv core. If a cached PlayerCore is reused left over filters from the previous video will be applied.

And there is a race condition can that cause a crash if a filter window is open when IINA is quitting. When IINA is terminating player windows are closed, which causes the iinaMainWindowChanged notification to be posted and that results in an observer establisted in FilterWindowController being called which then attempts to refresh the filter window. This can happen after IINA has commanded mpv to shutdown. Once mpv has been told to shutdown mpv APIs must not be called as it can trigger a crash in mpv as seen below.

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

Process:               IINA [12379]
Path:                  /Applications/IINA.app/Contents/MacOS/IINA
Identifier:            com.colliderli.iina
Version:               1.3.1 (133)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               503

Date/Time:             2023-03-17 18:42:27.8204 -0400
OS Version:            macOS 13.2.1 (22D68)
Report Version:        12
Anonymous UUID:        C8F97525-3322-572C-B9CE-A91EB243AC3C

Sleep/Wake UUID:       5129C3DF-B6B9-4042-84B6-6FE8190B35AA

Time Awake Since Boot: 240000 seconds
Time Since Wake:       14782 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000048
Exception Codes:       0x0000000000000001, 0x0000000000000048

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

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

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libmpv.1.dylib                	       0x105b69418 mpv_get_property + 16
1   IINA                          	       0x104c3ddc8 MPVController.getFilters(_:) + 320
2   IINA                          	       0x104c3ddc8 MPVController.getFilters(_:) + 320
3   IINA                          	       0x104b2dff4 FilterWindowController.reloadTable() + 320
4   IINA                          	       0x104b35080 partial apply for closure #1 in FilterWindowController.reloadTableInMainThread() + 20
5   IINA                          	       0x104b4478c thunk for @escaping @callee_guaranteed () -> () + 28
6   libdispatch.dylib             	       0x1af5649dc _dispatch_call_block_and_release + 32
7   libdispatch.dylib             	       0x1af566504 _dispatch_client_callout + 20
8   libdispatch.dylib             	       0x1af574d1c _dispatch_main_queue_drain + 928
9   libdispatch.dylib             	       0x1af57496c _dispatch_main_queue_callback_4CF + 44
10  CoreFoundation                	       0x1af80ed40 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
11  CoreFoundation                	       0x1af7cc7c0 __CFRunLoopRun + 2036
12  CoreFoundation                	       0x1af7cb878 CFRunLoopRunSpecific + 612
13  HIToolbox                     	       0x1b8eabfa0 RunCurrentEventLoopInMode + 292
14  HIToolbox                     	       0x1b8eabde4 ReceiveNextEventCommon + 672
15  HIToolbox                     	       0x1b8eabb2c _BlockUntilNextEventMatchingListInModeWithFilter + 72
16  AppKit                        	       0x1b2a5184c _DPSNextEvent + 632
17  AppKit                        	       0x1b2a509dc -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728
18  AppKit                        	       0x1b2c73d7c -[NSApplication _shouldTerminate] + 700
19  AppKit                        	       0x1b2c6697c -[NSApplication terminate:] + 612
20  AppKit                        	       0x1b2bfac38 -[NSApplication(NSResponder) sendAction:to:from:] + 440
21  AppKit                        	       0x1b2cc7304 -[NSMenuItem _corePerformAction] + 336
22  AppKit                        	       0x1b2cc7080 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 104
23  AppKit                        	       0x1b2d02d58 -[NSMenu performActionForItemAtIndex:] + 200
24  AppKit                        	       0x1b2d02c78 -[NSMenu _internalPerformActionForItemAtIndex:] + 76
25  AppKit                        	       0x1b2d02acc -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 108
26  AppKit                        	       0x1b2caf628 NSSLMMenuEventHandler + 640
27  HIToolbox                     	       0x1b8e844c0 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1092
28  HIToolbox                     	       0x1b8e83940 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 356
29  HIToolbox                     	       0x1b8e99bb8 SendEventToEventTarget + 40
30  HIToolbox                     	       0x1b8ef9338 SendHICommandEvent(unsigned int, HICommand const*, unsigned int, unsigned int, unsigned char, void const*, OpaqueEventTargetRef*, OpaqueEventTargetRef*, OpaqueEventRef**) + 416
31  HIToolbox                     	       0x1b8f1db60 SendMenuCommandWithContextAndModifiers + 56
32  HIToolbox                     	       0x1b8f1daf0 SendMenuItemSelectedEvent + 352
33  HIToolbox                     	       0x1b8f1d91c FinishMenuSelection(SelectionData*, MenuResult*, MenuResult*) + 100
34  HIToolbox                     	       0x1b8f1e2dc MenuSelectCore(MenuData*, Point, double, unsigned int, OpaqueMenuRef**, unsigned short*) + 560
35  HIToolbox                     	       0x1b8f1dffc _HandleMenuSelection2 + 416
36  AppKit                        	       0x1b2ba5048 _NSHandleCarbonMenuEvent + 256
37  AppKit                        	       0x1b2ba4e6c _DPSEventHandledByCarbon + 60
38  AppKit                        	       0x1b2a50fd4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2256
39  AppKit                        	       0x1b2a44e0c -[NSApplication run] + 464
40  AppKit                        	       0x1b2a1c250 NSApplicationMain + 880
41  IINA                          	       0x104a8a428 main + 12
42  dyld                          	       0x1af3c3e50 start + 2544

Thread 1:: caulk.messenger.shared:17
0   libsystem_kernel.dylib        	       0x1af6adfcc semaphore_wait_trap + 8
1   caulk                         	       0x1b8bd2cfc caulk::mach::semaphore::wait_or_error() + 28
2   caulk                         	       0x1b8bb5634 caulk::concurrent::details::worker_thread::run() + 56
3   caulk                         	       0x1b8bb5278 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       	       0x1af6ee06c _pthread_start + 148
5   libsystem_pthread.dylib       	       0x1af6e8e2c thread_start + 8

Thread 2:: com.apple.NSEventThread
0   libsystem_kernel.dylib        	       0x1af6ae050 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x1af6c011c mach_msg2_internal + 80
2   libsystem_kernel.dylib        	       0x1af6b6c24 mach_msg_overwrite + 452
3   libsystem_kernel.dylib        	       0x1af6ae3cc mach_msg + 24
4   CoreFoundation                	       0x1af7cdbb0 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                	       0x1af7cc49c __CFRunLoopRun + 1232
6   CoreFoundation                	       0x1af7cb878 CFRunLoopRunSpecific + 612
7   AppKit                        	       0x1b2b7c19c _NSEventThread + 172
8   libsystem_pthread.dylib       	       0x1af6ee06c _pthread_start + 148
9   libsystem_pthread.dylib       	       0x1af6e8e2c thread_start + 8

Thread 3:: */mpv core
0   libsystem_kernel.dylib        	       0x1af6b184c __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x1af6ee638 _pthread_cond_wait + 1232
2   libmpv.1.dylib                	       0x105b51ad0 mp_dispatch_queue_process + 296
3   libmpv.1.dylib                	       0x105b88ca8 mp_wait_events + 80
4   libmpv.1.dylib                	       0x105b67c60 mp_shutdown_clients + 108
5   libmpv.1.dylib                	       0x105b67f24 core_thread + 80
6   libsystem_pthread.dylib       	       0x1af6ee06c _pthread_start + 148
7   libsystem_pthread.dylib       	       0x1af6e8e2c thread_start + 8

Thread 4:: */log-file
0   libsystem_kernel.dylib        	       0x1af6b184c __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x1af6ee638 _pthread_cond_wait + 1232
2   libmpv.1.dylib                	       0x105b1ab38 log_file_thread + 120
3   libsystem_pthread.dylib       	       0x1af6ee06c _pthread_start + 148
4   libsystem_pthread.dylib       	       0x1af6e8e2c thread_start + 8

Thread 5:: */ipc socket listener
0   libsystem_kernel.dylib        	       0x1af6b6978 poll + 8
1   libmpv.1.dylib                	       0x105b4ef48 ipc_thread + 368
2   libsystem_pthread.dylib       	       0x1af6ee06c _pthread_start + 148
3   libsystem_pthread.dylib       	       0x1af6e8e2c thread_start + 8

Thread 6:: */worker
0   libsystem_kernel.dylib        	       0x1af6b184c __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x1af6ee638 _pthread_cond_wait + 1232
2   libmpv.1.dylib                	       0x105b534e8 worker_thread + 80
3   libsystem_pthread.dylib       	       0x1af6ee06c _pthread_start + 148
4   libsystem_pthread.dylib       	       0x1af6e8e2c thread_start + 8

Thread 7::  Dispatch queue: com.colliderli.iina.controller
0   libsystem_kernel.dylib        	       0x1af6b184c __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x1af6ee638 _pthread_cond_wait + 1232
2   Foundation                    	       0x1b06c89ac -[NSOperation waitUntilFinished] + 512
3   CoreFoundation                	       0x1af793ba8 _CFXNotificationPost + 776
4   IINA                          	       0x104c14924 PlayerCore.postNotification(_:) + 196
5   IINA                          	       0x104c4221c MPVController.handlePropertyChange(_:_:) + 4232
6   IINA                          	       0x104c3fc18 MPVController.handleEvent(_:) + 2064
7   IINA                          	       0x104c49210 partial apply for closure #1 in MPVController.readEvents() + 32
8   IINA                          	       0x104b4478c thunk for @escaping @callee_guaranteed () -> () + 28
9   libdispatch.dylib             	       0x1af5649dc _dispatch_call_block_and_release + 32
10  libdispatch.dylib             	       0x1af566504 _dispatch_client_callout + 20
11  libdispatch.dylib             	       0x1af56dbbc _dispatch_lane_serial_drain + 672
12  libdispatch.dylib             	       0x1af56e708 _dispatch_lane_invoke + 384
13  libdispatch.dylib             	       0x1af57934c _dispatch_workloop_worker_thread + 652
14  libsystem_pthread.dylib       	       0x1af6ea100 _pthread_wqthread + 288
15  libsystem_pthread.dylib       	       0x1af6e8e20 start_wqthread + 8

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

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

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

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

Thread 12:
0   libsystem_pthread.dylib       	       0x1af6e8e18 start_wqthread + 0


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x000060000306dcd0   x2: 0x0000000000000006   x3: 0x000000016b379098
    x4: 0x0000000000000005   x5: 0x0000000000001cb0   x6: 0x0000000000000066   x7: 0x000000016b3778f8
    x8: 0x0000000200000000   x9: 0x000000020b247658  x10: 0x00000001bd8545ec  x11: 0x80000006ffffffff
   x12: 0x0000000000000030  x13: 0x00000000001ff800  x14: 0x00000000000007fb  x15: 0x00000000cea2589a
   x16: 0x0000000105b69408  x17: 0x000000020bd19ca8  x18: 0x0000000000000000  x19: 0x000060000306dcb0
   x20: 0x000000020b247658  x21: 0x000060000306dcd0  x22: 0x0000000000000000  x23: 0xf00000000000001f
   x24: 0x0000000000000000  x25: 0x000000020ac78220  x26: 0x0000600002bac100  x27: 0x000000000000000f
   x28: 0x0000000000000000   fp: 0x000000016b379030   lr: 0x0000000104c3ddc8
    sp: 0x000000016b378fe0   pc: 0x0000000105b69418 cpsr: 0x60001000
   far: 0x0000000000000048  esr: 0x92000006 (Data Abort) byte read Translation fault

Binary Images:
       0x105af8000 -        0x105dd3fff libmpv.1.dylib (*) <e8089b8a-8ba0-3583-a8f2-e724a48fa25f> /Applications/IINA.app/Contents/Frameworks/libmpv.1.dylib
       0x104a84000 -        0x104d33fff com.colliderli.iina (1.3.1) <da58f4cc-7901-3bca-a111-34e5236b0261> /Applications/IINA.app/Contents/MacOS/IINA
       0x1af562000 -        0x1af5a9fff libdispatch.dylib (*) <4d52c3a5-32e6-37a2-9d6c-23c612038354> /usr/lib/system/libdispatch.dylib
       0x1af74c000 -        0x1afc23fff com.apple.CoreFoundation (6.9) <18260df4-69a8-30d3-8175-fb8ae7ae7709> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
       0x1b8e7a000 -        0x1b91adfff com.apple.HIToolbox (2.1.1) <c68fe2e2-e0f3-3caf-ada3-bcc72fba79d0> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
       0x1b2a18000 -        0x1b3923fff com.apple.AppKit (6.9) <88722053-0df0-3d4f-bf55-7e3c2d2c8e29> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
       0x1af3be000 -        0x1af448ba3 dyld (*) <191e84f1-4b95-39c8-b253-1c1ef56c0fa8> /usr/lib/dyld
       0x1af6ad000 -        0x1af6e6feb libsystem_kernel.dylib (*) <3dcd49b9-b3c5-3d90-be40-a3b807cb9cd7> /usr/lib/system/libsystem_kernel.dylib
       0x1b8bb3000 -        0x1b8bdcfff com.apple.audio.caulk (1.0) <41def0d0-3b1f-3029-8e99-2c9304571021> /System/Library/PrivateFrameworks/caulk.framework/Versions/A/caulk
       0x1af6e7000 -        0x1af6f3ffb libsystem_pthread.dylib (*) <9f3b729a-ed04-3e65-adac-d75ad06ebbdc> /usr/lib/system/libsystem_pthread.dylib
       0x1b0679000 -        0x1b10b2fff com.apple.Foundation (6.9) <c62e0110-c636-396a-9cb6-c3c08392b3fa> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???

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: 134
    thread_create: 0
    thread_set_state: 4809

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

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Accelerate framework               256K        2 
Activity Tracing                   256K        1 
CG backing stores                 4032K        4 
CG image                          4720K       67 
ColorSync                          560K       27 
CoreAnimation                     15.1M      167 
CoreGraphics                        32K        2 
CoreImage                           16K        1 
CoreUI image data                 5648K       45 
Foundation                          16K        1 
Kernel Alloc Once                   32K        1 
MALLOC                           846.3M      108 
MALLOC guard page                  192K       10 
MALLOC_MEDIUM (reserved)           1.0G       10         reserved VM address space (unallocated)
MALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)
OpenGL GLSL                        384K        5 
STACK GUARD                       56.2M       13 
Stack                             14.4M       13 
VM_ALLOCATE                       2640K       38 
__AUTH                            1859K      348 
__AUTH_CONST                      24.5M      567 
__CTF                               756        1 
__DATA                            21.8M      631 
__DATA_CONST                      29.9M      641 
__DATA_DIRTY                      1972K      219 
__FONT_DATA                        2352        1 
__GLSLBUILTINS                    5174K        1 
__LINKEDIT                       778.8M       71 
__OBJC_CONST                      4624K      312 
__OBJC_RO                         65.5M        1 
__OBJC_RW                         1988K        1 
__TEXT                           622.3M      662 
dyld private memory                256K        1 
mapped file                      289.5M       54 
shared memory                     1008K       23 
===========                     =======  ======= 
TOTAL                              4.1G     4050 
TOTAL, minus reserved VM space     2.7G     4050 



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

{"app_name":"IINA","timestamp":"2023-03-17 18:42:29.00 -0400","app_version":"1.3.1","slice_uuid":"da58f4cc-7901-3bca-a111-34e5236b0261","build_version":"133","platform":1,"bundleID":"com.colliderli.iina","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 13.2.1 (22D68)","roots_installed":0,"name":"IINA","incident_id":"EEB3415E-868A-41C5-B3CA-CD2EBDE1922E"}
{
  "uptime" : 240000,
  "procRole" : "Foreground",
  "version" : 2,
  "userID" : 503,
  "deployVersion" : 210,
  "modelCode" : "MacBookPro18,2",
  "coalitionID" : 1250,
  "osVersion" : {
    "train" : "macOS 13.2.1",
    "build" : "22D68",
    "releaseType" : "User"
  },
  "captureTime" : "2023-03-17 18:42:27.8204 -0400",
  "incident" : "EEB3415E-868A-41C5-B3CA-CD2EBDE1922E",
  "pid" : 12379,
  "translated" : false,
  "cpuType" : "ARM-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2023-03-17 18:40:04.8457 -0400",
  "procStartAbsTime" : 5955852588534,
  "procExitAbsTime" : 5959283500998,
  "procName" : "IINA",
  "procPath" : "\/Applications\/IINA.app\/Contents\/MacOS\/IINA",
  "bundleInfo" : {"CFBundleShortVersionString":"1.3.1","CFBundleVersion":"133","CFBundleIdentifier":"com.colliderli.iina"},
  "storeInfo" : {"deviceIdentifierForVendor":"58189E81-A70E-5DE5-A0D9-91253EEB4588","thirdParty":true},
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "com.colliderli.iina",
  "crashReporterKey" : "C8F97525-3322-572C-B9CE-A91EB243AC3C",
  "throttleTimeout" : 2147483647,
  "wakeTime" : 14782,
  "sleepWakeUUID" : "5129C3DF-B6B9-4042-84B6-6FE8190B35AA",
  "sip" : "enabled",
  "vmRegionInfo" : "0x48 is not in any region.  Bytes before following region: 105553518919608\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      UNUSED SPACE AT START\n--->  \n      MALLOC_NANO (reserved)   600018000000-600020000000 [128.0M] rw-\/rwx SM=NUL  ...(unallocated)",
  "exception" : {"codes":"0x0000000000000001, 0x0000000000000048","rawCodes":[1,72],"type":"EXC_BAD_ACCESS","signal":"SIGSEGV","subtype":"KERN_INVALID_ADDRESS at 0x0000000000000048"},
  "termination" : {"flags":0,"code":11,"namespace":"SIGNAL","indicator":"Segmentation fault: 11","byProc":"exc handler","byPid":12379},
  "vmregioninfo" : "0x48 is not in any region.  Bytes before following region: 105553518919608\n      REGION TYPE                    START - END         [ VSIZE] PRT\/MAX SHRMOD  REGION DETAIL\n      UNUSED SPACE AT START\n--->  \n      MALLOC_NANO (reserved)   600018000000-600020000000 [128.0M] rw-\/rwx SM=NUL  ...(unallocated)",
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":4809,"task_for_pid":134},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":3022853,"threadState":{"x":[{"value":0},{"value":105553167047888},{"value":6},{"value":6093770904},{"value":5},{"value":7344},{"value":102},{"value":6093764856},{"value":8589934592,"objc-selector":"onmentConfigurationFromRemoteProcess"},{"value":8776873560,"symbolLocation":0,"symbol":"_swiftEmptyArrayStorage"},{"value":7474595308,"symbolLocation":0,"symbol":"_swift_retain_"},{"value":9223372066919546879},{"value":48},{"value":2095104},{"value":2043},{"value":3466746010},{"value":4390818824,"symbolLocation":0,"symbol":"mpv_get_property"},{"value":8788221096},{"value":0},{"value":105553167047856},{"value":8776873560,"symbolLocation":0,"symbol":"_swiftEmptyArrayStorage"},{"value":105553167047888},{"value":0},{"value":17293822569102704671},{"value":0},{"value":8770781728,"symbolLocation":224,"symbol":"_main_thread"},{"value":105553162060032},{"value":15},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":4374912456},"cpsr":{"value":1610616832},"fp":{"value":6093770800},"sp":{"value":6093770720},"esr":{"value":2449473542,"description":"(Data Abort) byte read Translation fault"},"pc":{"value":4390818840,"matchesCrashFrame":1},"far":{"value":72}},"queue":"com.apple.main-thread","frames":[{"imageOffset":463896,"symbol":"mpv_get_property","symbolLocation":16,"imageIndex":0},{"imageOffset":1809864,"symbol":"MPVController.getFilters(_:)","symbolLocation":320,"imageIndex":1},{"imageOffset":1809864,"symbol":"MPVController.getFilters(_:)","symbolLocation":320,"imageIndex":1},{"imageOffset":696308,"symbol":"FilterWindowController.reloadTable()","symbolLocation":320,"imageIndex":1},{"imageOffset":725120,"symbol":"partial apply for closure #1 in FilterWindowController.reloadTableInMainThread()","symbolLocation":20,"imageIndex":1},{"imageOffset":788364,"symbol":"thunk for @escaping @callee_guaranteed () -> ()","symbolLocation":28,"imageIndex":1},{"imageOffset":10716,"symbol":"_dispatch_call_block_and_release","symbolLocation":32,"imageIndex":2},{"imageOffset":17668,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":2},{"imageOffset":77084,"symbol":"_dispatch_main_queue_drain","symbolLocation":928,"imageIndex":2},{"imageOffset":76140,"symbol":"_dispatch_main_queue_callback_4CF","symbolLocation":44,"imageIndex":2},{"imageOffset":798016,"symbol":"__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__","symbolLocation":16,"imageIndex":3},{"imageOffset":526272,"symbol":"__CFRunLoopRun","symbolLocation":2036,"imageIndex":3},{"imageOffset":522360,"symbol":"CFRunLoopRunSpecific","symbolLocation":612,"imageIndex":3},{"imageOffset":204704,"symbol":"RunCurrentEventLoopInMode","symbolLocation":292,"imageIndex":4},{"imageOffset":204260,"symbol":"ReceiveNextEventCommon","symbolLocation":672,"imageIndex":4},{"imageOffset":203564,"symbol":"_BlockUntilNextEventMatchingListInModeWithFilter","symbolLocation":72,"imageIndex":4},{"imageOffset":235596,"symbol":"_DPSNextEvent","symbolLocation":632,"imageIndex":5},{"imageOffset":231900,"symbol":"-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]","symbolLocation":728,"imageIndex":5},{"imageOffset":2473340,"symbol":"-[NSApplication _shouldTerminate]","symbolLocation":700,"imageIndex":5},{"imageOffset":2419068,"symbol":"-[NSApplication terminate:]","symbolLocation":612,"imageIndex":5},{"imageOffset":1977400,"symbol":"-[NSApplication(NSResponder) sendAction:to:from:]","symbolLocation":440,"imageIndex":5},{"imageOffset":2814724,"symbol":"-[NSMenuItem _corePerformAction]","symbolLocation":336,"imageIndex":5},{"imageOffset":2814080,"symbol":"-[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:]","symbolLocation":104,"imageIndex":5},{"imageOffset":3059032,"symbol":"-[NSMenu performActionForItemAtIndex:]","symbolLocation":200,"imageIndex":5},{"imageOffset":3058808,"symbol":"-[NSMenu _internalPerformActionForItemAtIndex:]","symbolLocation":76,"imageIndex":5},{"imageOffset":3058380,"symbol":"-[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:]","symbolLocation":108,"imageIndex":5},{"imageOffset":2717224,"symbol":"NSSLMMenuEventHandler","symbolLocation":640,"imageIndex":5},{"imageOffset":42176,"symbol":"DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*)","symbolLocation":1092,"imageIndex":4},{"imageOffset":39232,"symbol":"SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*)","symbolLocation":356,"imageIndex":4},{"imageOffset":129976,"symbol":"SendEventToEventTarget","symbolLocation":40,"imageIndex":4},{"imageOffset":521016,"symbol":"SendHICommandEvent(unsigned int, HICommand const*, unsigned int, unsigned int, unsigned char, void const*, OpaqueEventTargetRef*, OpaqueEventTargetRef*, OpaqueEventRef**)","symbolLocation":416,"imageIndex":4},{"imageOffset":670560,"symbol":"SendMenuCommandWithContextAndModifiers","symbolLocation":56,"imageIndex":4},{"imageOffset":670448,"symbol":"SendMenuItemSelectedEvent","symbolLocation":352,"imageIndex":4},{"imageOffset":669980,"symbol":"FinishMenuSelection(SelectionData*, MenuResult*, MenuResult*)","symbolLocation":100,"imageIndex":4},{"imageOffset":672476,"symbol":"MenuSelectCore(MenuData*, Point, double, unsigned int, OpaqueMenuRef**, unsigned short*)","symbolLocation":560,"imageIndex":4},{"imageOffset":671740,"symbol":"_HandleMenuSelection2","symbolLocation":416,"imageIndex":4},{"imageOffset":1626184,"symbol":"_NSHandleCarbonMenuEvent","symbolLocation":256,"imageIndex":5},{"imageOffset":1625708,"symbol":"_DPSEventHandledByCarbon","symbolLocation":60,"imageIndex":5},{"imageOffset":233428,"symbol":"-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]","symbolLocation":2256,"imageIndex":5},{"imageOffset":183820,"symbol":"-[NSApplication run]","symbolLocation":464,"imageIndex":5},{"imageOffset":16976,"symbol":"NSApplicationMain","symbolLocation":880,"imageIndex":5},{"imageOffset":25640,"symbol":"main","symbolLocation":12,"imageIndex":1},{"imageOffset":24144,"symbol":"start","symbolLocation":2544,"imageIndex":6}]},{"id":3022949,"name":"caulk.messenger.shared:17","frames":[{"imageOffset":4044,"symbol":"semaphore_wait_trap","symbolLocation":8,"imageIndex":7},{"imageOffset":130300,"symbol":"caulk::mach::semaphore::wait_or_error()","symbolLocation":28,"imageIndex":8},{"imageOffset":9780,"symbol":"caulk::concurrent::details::worker_thread::run()","symbolLocation":56,"imageIndex":8},{"imageOffset":8824,"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":8},{"imageOffset":28780,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":9},{"imageOffset":7724,"symbol":"thread_start","symbolLocation":8,"imageIndex":9}]},{"id":3022986,"name":"com.apple.NSEventThread","frames":[{"imageOffset":4176,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":7},{"imageOffset":78108,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":7},{"imageOffset":39972,"symbol":"mach_msg_overwrite","symbolLocation":452,"imageIndex":7},{"imageOffset":5068,"symbol":"mach_msg","symbolLocation":24,"imageIndex":7},{"imageOffset":531376,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":160,"imageIndex":3},{"imageOffset":525468,"symbol":"__CFRunLoopRun","symbolLocation":1232,"imageIndex":3},{"imageOffset":522360,"symbol":"CFRunLoopRunSpecific","symbolLocation":612,"imageIndex":3},{"imageOffset":1458588,"symbol":"_NSEventThread","symbolLocation":172,"imageIndex":5},{"imageOffset":28780,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":9},{"imageOffset":7724,"symbol":"thread_start","symbolLocation":8,"imageIndex":9}]},{"id":3023428,"name":"*\/mpv core","frames":[{"imageOffset":18508,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":7},{"imageOffset":30264,"symbol":"_pthread_cond_wait","symbolLocation":1232,"imageIndex":9},{"imageOffset":367312,"symbol":"mp_dispatch_queue_process","symbolLocation":296,"imageIndex":0},{"imageOffset":593064,"symbol":"mp_wait_events","symbolLocation":80,"imageIndex":0},{"imageOffset":457824,"symbol":"mp_shutdown_clients","symbolLocation":108,"imageIndex":0},{"imageOffset":458532,"symbol":"core_thread","symbolLocation":80,"imageIndex":0},{"imageOffset":28780,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":9},{"imageOffset":7724,"symbol":"thread_start","symbolLocation":8,"imageIndex":9}]},{"id":3023429,"name":"*\/log-file","frames":[{"imageOffset":18508,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":7},{"imageOffset":30264,"symbol":"_pthread_cond_wait","symbolLocation":1232,"imageIndex":9},{"imageOffset":142136,"symbol":"log_file_thread","symbolLocation":120,"imageIndex":0},{"imageOffset":28780,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":9},{"imageOffset":7724,"symbol":"thread_start","symbolLocation":8,"imageIndex":9}]},{"id":3023433,"name":"*\/ipc socket listener","frames":[{"imageOffset":39288,"symbol":"poll","symbolLocation":8,"imageIndex":7},{"imageOffset":356168,"symbol":"ipc_thread","symbolLocation":368,"imageIndex":0},{"imageOffset":28780,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":9},{"imageOffset":7724,"symbol":"thread_start","symbolLocation":8,"imageIndex":9}]},{"id":3023461,"name":"*\/worker","frames":[{"imageOffset":18508,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":7},{"imageOffset":30264,"symbol":"_pthread_cond_wait","symbolLocation":1232,"imageIndex":9},{"imageOffset":373992,"symbol":"worker_thread","symbolLocation":80,"imageIndex":0},{"imageOffset":28780,"symbol":"_pthread_start","symbolLocation":148,"imageIndex":9},{"imageOffset":7724,"symbol":"thread_start","symbolLocation":8,"imageIndex":9}]},{"id":3023693,"queue":"com.colliderli.iina.controller","frames":[{"imageOffset":18508,"symbol":"__psynch_cvwait","symbolLocation":8,"imageIndex":7},{"imageOffset":30264,"symbol":"_pthread_cond_wait","symbolLocation":1232,"imageIndex":9},{"imageOffset":326060,"symbol":"-[NSOperation waitUntilFinished]","symbolLocation":512,"imageIndex":10},{"imageOffset":293800,"symbol":"_CFXNotificationPost","symbolLocation":776,"imageIndex":3},{"imageOffset":1640740,"symbol":"PlayerCore.postNotification(_:)","symbolLocation":196,"imageIndex":1},{"imageOffset":1827356,"symbol":"MPVController.handlePropertyChange(_:_:)","symbolLocation":4232,"imageIndex":1},{"imageOffset":1817624,"symbol":"MPVController.handleEvent(_:)","symbolLocation":2064,"imageIndex":1},{"imageOffset":1856016,"symbol":"partial apply for closure #1 in MPVController.readEvents()","symbolLocation":32,"imageIndex":1},{"imageOffset":788364,"symbol":"thunk for @escaping @callee_guaranteed () -> ()","symbolLocation":28,"imageIndex":1},{"imageOffset":10716,"symbol":"_dispatch_call_block_and_release","symbolLocation":32,"imageIndex":2},{"imageOffset":17668,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":2},{"imageOffset":48060,"symbol":"_dispatch_lane_serial_drain","symbolLocation":672,"imageIndex":2},{"imageOffset":50952,"symbol":"_dispatch_lane_invoke","symbolLocation":384,"imageIndex":2},{"imageOffset":95052,"symbol":"_dispatch_workloop_worker_thread","symbolLocation":652,"imageIndex":2},{"imageOffset":12544,"symbol":"_pthread_wqthread","symbolLocation":288,"imageIndex":9},{"imageOffset":7712,"symbol":"start_wqthread","symbolLocation":8,"imageIndex":9}]},{"id":3023935,"frames":[{"imageOffset":7704,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":9}]},{"id":3024107,"frames":[{"imageOffset":7704,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":9}]},{"id":3024385,"frames":[{"imageOffset":7704,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":9}]},{"id":3024386,"frames":[{"imageOffset":7704,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":9}]},{"id":3024681,"frames":[{"imageOffset":7704,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":9}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4390354944,
    "size" : 2998272,
    "uuid" : "e8089b8a-8ba0-3583-a8f2-e724a48fa25f",
    "path" : "\/Applications\/IINA.app\/Contents\/Frameworks\/libmpv.1.dylib",
    "name" : "libmpv.1.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4373102592,
    "CFBundleShortVersionString" : "1.3.1",
    "CFBundleIdentifier" : "com.colliderli.iina",
    "size" : 2818048,
    "uuid" : "da58f4cc-7901-3bca-a111-34e5236b0261",
    "path" : "\/Applications\/IINA.app\/Contents\/MacOS\/IINA",
    "name" : "IINA",
    "CFBundleVersion" : "133"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7236624384,
    "size" : 294912,
    "uuid" : "4d52c3a5-32e6-37a2-9d6c-23c612038354",
    "path" : "\/usr\/lib\/system\/libdispatch.dylib",
    "name" : "libdispatch.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7238631424,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.CoreFoundation",
    "size" : 5079040,
    "uuid" : "18260df4-69a8-30d3-8175-fb8ae7ae7709",
    "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
    "name" : "CoreFoundation",
    "CFBundleVersion" : "1953.300"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7397154816,
    "CFBundleShortVersionString" : "2.1.1",
    "CFBundleIdentifier" : "com.apple.HIToolbox",
    "size" : 3358720,
    "uuid" : "c68fe2e2-e0f3-3caf-ada3-bcc72fba79d0",
    "path" : "\/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/HIToolbox.framework\/Versions\/A\/HIToolbox",
    "name" : "HIToolbox"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7291895808,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.AppKit",
    "size" : 15777792,
    "uuid" : "88722053-0df0-3d4f-bf55-7e3c2d2c8e29",
    "path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit",
    "name" : "AppKit",
    "CFBundleVersion" : "2299.40.118"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7234904064,
    "size" : 568228,
    "uuid" : "191e84f1-4b95-39c8-b253-1c1ef56c0fa8",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7237980160,
    "size" : 237548,
    "uuid" : "3dcd49b9-b3c5-3d90-be40-a3b807cb9cd7",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7394242560,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "com.apple.audio.caulk",
    "size" : 172032,
    "uuid" : "41def0d0-3b1f-3029-8e99-2c9304571021",
    "path" : "\/System\/Library\/PrivateFrameworks\/caulk.framework\/Versions\/A\/caulk",
    "name" : "caulk"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7238217728,
    "size" : 53244,
    "uuid" : "9f3b729a-ed04-3e65-adac-d75ad06ebbdc",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7254544384,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.Foundation",
    "size" : 10723328,
    "uuid" : "c62e0110-c636-396a-9cb6-c3c08392b3fa",
    "path" : "\/System\/Library\/Frameworks\/Foundation.framework\/Versions\/C\/Foundation",
    "name" : "Foundation",
    "CFBundleVersion" : "1953.300"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  }
],
  "sharedCache" : {
  "base" : 7234256896,
  "size" : 3447455744,
  "uuid" : "835716ae-b363-3187-b065-cf94139bfc85"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=1.4G resident=0K(0%) swapped_out_or_unallocated=1.4G(100%)\nWritable regions: Total=2.3G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=2.3G(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nAccelerate framework               256K        2 \nActivity Tracing                   256K        1 \nCG backing stores                 4032K        4 \nCG image                          4720K       67 \nColorSync                          560K       27 \nCoreAnimation                     15.1M      167 \nCoreGraphics                        32K        2 \nCoreImage                           16K        1 \nCoreUI image data                 5648K       45 \nFoundation                          16K        1 \nKernel Alloc Once                   32K        1 \nMALLOC                           846.3M      108 \nMALLOC guard page                  192K       10 \nMALLOC_MEDIUM (reserved)           1.0G       10         reserved VM address space (unallocated)\nMALLOC_NANO (reserved)           384.0M        1         reserved VM address space (unallocated)\nOpenGL GLSL                        384K        5 \nSTACK GUARD                       56.2M       13 \nStack                             14.4M       13 \nVM_ALLOCATE                       2640K       38 \n__AUTH                            1859K      348 \n__AUTH_CONST                      24.5M      567 \n__CTF                               756        1 \n__DATA                            21.8M      631 \n__DATA_CONST                      29.9M      641 \n__DATA_DIRTY                      1972K      219 \n__FONT_DATA                        2352        1 \n__GLSLBUILTINS                    5174K        1 \n__LINKEDIT                       778.8M       71 \n__OBJC_CONST                      4624K      312 \n__OBJC_RO                         65.5M        1 \n__OBJC_RW                         1988K        1 \n__TEXT                           622.3M      662 \ndyld private memory                256K        1 \nmapped file                      289.5M       54 \nshared memory                     1008K       23 \n===========                     =======  ======= \nTOTAL                              4.1G     4050 \nTOTAL, minus reserved VM space     2.7G     4050 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "610d52e1fc54bc3389840408",
      "factorPackIds" : {
        "SIRI_UNDERSTANDING_ASR_ASSISTANT" : "640a648c12e6873bd9175801",
        "SIRI_UNDERSTANDING_MORPHUN" : "62ec7220c682040ba94e6a20"
      },
      "deploymentId" : 240000663
    },
    {
      "rolloutId" : "63582c5f8a53461413999550",
      "factorPackIds" : {

      },
      "deploymentId" : 240000002
    }
  ],
  "experiments" : [

  ]
}
}

Model: MacBookPro18,2, BootROM 8419.80.7, proc 10:8:2 processors, 64 GB, SMC 
Graphics: Apple M1 Max, Apple M1 Max, Built-In
Display: Color LCD, 3456 x 2234 Retina, Main, MirrorOff, Online
Memory Module: LPDDR5, Hynix
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4387), wl0: Nov 30 2022 02:17:16 version 20.10.965.13.8.7.131 FWID 01-1251c18d
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.

Although the crash had the potential to occur before, the changes to properly wait for mpv to shutdown has made it more likely for this crash to occur. For that reason I'm going to label this as a regression.

Continuing to investigate…

low-batt added a commit that referenced this issue Mar 23, 2023
This commit will:
- Change FilterWindowController to use the active PlayerCore
- Change FilterWindowController.reloadTable to check if the active
  PlayerCore is shutting down
- Disable the ability to add a filter if the active core is stopping
- Change PlayerCore.playbackStopped to clear all audio and video filters
@low-batt low-batt linked a pull request Mar 23, 2023 that will close this issue
2 tasks
@low-batt
Copy link
Contributor

low-batt commented Mar 23, 2023

Fixing

The commit in the pull request will:

  • Change FilterWindowController to use the active PlayerCore
  • Change FilterWindowController.reloadTable to check if the active PlayerCore is shutting down
  • Disable the ability to add a filter if the active core is stopping
  • Change PlayerCore.playbackStopped to clear all audio and video filters

@svobs
Copy link
Contributor

svobs commented Mar 24, 2023

Let me first say that I generally agree with using the "last active" player when grabbing the list of filters for the "static" UI. I ended up settling on this approach when working with / displaying key bindings.

Couple thoughts though:

  1. Is there any reason to ever use PlayerCore.active? It kinda sounds like PlayerCore.lastActive should always be used.
  2. Along the same lines, it looks like PlayerCore.first could/should be changed to private. It has no reason for being called outside that class. Its only two uses outside that class are for grabbing version information, but those can be changed to PlayerCore.lastActive with no change to the end result.

low-batt added a commit that referenced this issue Mar 30, 2023
This commit will:
- Change FilterWindowController to use the active PlayerCore
- Change FilterWindowController.reloadTable to check if the active
  PlayerCore is shutting down
- Disable the ability to add a filter if the active core is stopping
  if IINA is configured to support multiple windows
- Change PlayerCore.playbackStopped to clear all audio and video filters
  if IINA is configured to support multiple windows
low-batt added a commit that referenced this issue Apr 1, 2023
This commit will:
- Change FilterWindowController to use the active PlayerCore
- Change FilterWindowController.reloadTable to check if the active
  PlayerCore is shutting down
@low-batt low-batt linked a pull request Apr 1, 2023 that will close this issue
2 tasks
uiryuu pushed a commit that referenced this issue Apr 2, 2023
This commit will:
- Change FilterWindowController to use the active PlayerCore
- Change FilterWindowController.reloadTable to check if the active
  PlayerCore is shutting down
@uiryuu uiryuu reopened this Apr 2, 2023
@low-batt
Copy link
Contributor

low-batt commented Apr 2, 2023

Investigation into this issue uncovered multiple problems. A fix for two of the serious problems raised by this issue has been merged into the develop branch. The other problems will be addressed in separate issues.

@low-batt
Copy link
Contributor

low-batt commented Jan 2, 2024

Two of the serious problems are fixed in the released version of IINA. The others are being handled as separate issues.

@low-batt low-batt closed this as completed Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants