Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

IIna freezes/crashes video frame freeze when playback is fast and then paused and unpaused #11

Open
ViRo3 opened this issue Dec 29, 2021 · 23 comments
Labels
bug Something isn't working

Comments

@ViRo3
Copy link

ViRo3 commented Dec 29, 2021

When watching a video if video playback is fast (2x/4x) and then paused/rewinded and upaused. The frame freezes and and on completion of playback Iina crashes
IINA-2021-12-28-174354.ips.txt

PS : title bar issues when fullscreen to minimised/not fullscreen

@CarterLi
Copy link
Owner

@low-batt Can you please have a look at this issue?

@low-batt
Copy link
Collaborator

@ViRo3 Thank you for reporting this.

I will try and reproduce the freeze. Need a spindump of IINA when it is frozen.

@CarterLi Are IINA=Plus releases built without including symbols? The stack trace from the crash report does not contain method names:

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libmpv.1.dylib                	       0x10553410c mpv_set_property + 28
1   IINA                          	       0x10269219c 0x10261c000 + 483740
2   IINA                          	       0x10269219c 0x10261c000 + 483740
3   IINA                          	       0x10269e490 0x10261c000 + 533648
4   IINA                          	       0x1026a16d0 0x10261c000 + 546512
5   CoreFoundation                	       0x1bdd45200 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28

So we know IINA was notifiied about something it was observing and tried to update mpv. My guess is that during shutdown observers are not being released before shutting down mpv. I will look into that.

@low-batt
Copy link
Collaborator

@ViRo3 Just noticed the PS title issue. Which version of macOS? Do you have the preference "Use legacy full screen" enabled? Can you say a little more about the behavior you are seeing? Are you experiencing the title issue in both IINA and IINA-Plus?

The only window title issue I am aware of is issue iina#3543 which only happens when legacy full screen is used when running under Big Sur and Monterey. That is a defect in AppKit. IINA-Plus has a fix (workaround) for that involving setting the title in a different way. That fix is not in the released version of IINA which normally crashes as described in that issue.

@CarterLi
Copy link
Owner

@ViRo3 Thank you for reporting this.

I will try and reproduce the freeze. Need a spindump of IINA when it is frozen.

@CarterLi Are IINA=Plus releases built without including symbols? The stack trace from the crash report does not contain method names:

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libmpv.1.dylib                	       0x10553410c mpv_set_property + 28
1   IINA                          	       0x10269219c 0x10261c000 + 483740
2   IINA                          	       0x10269219c 0x10261c000 + 483740
3   IINA                          	       0x10269e490 0x10261c000 + 533648
4   IINA                          	       0x1026a16d0 0x10261c000 + 546512
5   CoreFoundation                	       0x1bdd45200 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28

So we know IINA was notifiied about something it was observing and tried to update mpv. My guess is that during shutdown observers are not being released before shutting down mpv. I will look into that.

I did get method names on the stack trace when I was encountering the Code Signature Invalid issue

@low-batt
Copy link
Collaborator

@CarterLi Have you been able to reproduce the freeze or the title issue? Please see if you can reproduce it and if so, take a spindump. I've tried this sequence:

  • Speed up playback 2x, 4x (I've tried both, plus faster)
  • Pause
  • Rewind
  • Unpause

So far I've not generated a freeze. Tried a couple of different movie files. I was only able to generate these warnings from mpv:

22:28:24.694 [iina][w] mpv log: [cplayer] warn: Audio/Video desynchronisation detected! Possible reasons include too slow
22:28:24.694 [iina][w] mpv log: [cplayer] warn: hardware, temporary CPU spikes, broken drivers, and broken files. Audio
22:28:24.694 [iina][w] mpv log: [cplayer] warn: position will not match to the video (see A-V status field).

I have successfully reproduced a crash in mpv_set_property, very likely the one in the crash report. Another issue with lack of coordination during shutdown. I'm working on a fix.

I also encountered an issue with legacy full screen where the black window that blacks out the area around the camera housing was not closed. I will be fixing that as well.

Might not get these fixes done until Friday.

The crash does not look to be related to the freeze or the title issue.

My guess on why the crash report does not contain symbols is that this crash occurred late in the application termination process and macOS was in the process of unloading code and symbols from memory. But that is just a guess.

@ViRo3
Copy link
Author

ViRo3 commented Dec 30, 2021

Here's a video of the title menu issue :

Screen.Recording.2021-12-30.at.12.27.56.PM.mov

(my bad but the title menu issue is separate and in hindsight I should have set it separately)

low-batt added a commit that referenced this issue Dec 30, 2021
This was also reported against IINA in issue iina#3596

The commit in the pull request will:
- Rename the PlayerCore property isMpvTerminated to isMpvTerminating to
  reflect that termination has been initiated and being processed
  asynchronously
- Change existing references to  isMpvTerminated  to use new name
- Change PlayerCore.terminateMPV to set isMpvTerminating to true right
  before starting the termination process
- Change PlayerCore.syncUI to do nothing if mpv is terminating
- Change MPVController.mpvQuit to remove observers MPVController
  registered before sending the quit command to mpv
- Change many MPVController methods to check to see if mpv is being
  terminated
@low-batt
Copy link
Collaborator

I have reported the crash against IINA in issue iina#3596.
I have submitted a proposed fix in PR iina#3597
I have made that same fix in IINA-Plus and pushed it in.

That leaves two other problems, freeze and title. The "frame freezes" is more concerning. Is the IINA application freezing, as in macOS shows the spinning beachball wait cursor? Or is it that IINA acts like it is still playing the movie, with the progress slider still moving, but the picture is frozen?

If it is the former we need a spin dump. If it is the later then this may be an issue with mpv. It may be sensitive to the format of the particular movie being played and the type of Mac hardware it is being played on and the version of macOS. Logs may provide a clue, especially the mpv log.

The title issue is that when going from full screen to windowed most of the window shrinks back to the previous size, but while that is happening the title part doesn't animate and remains the full width of the screen? That is what it looked like from the posted movie. That is definitely odd and looks broken.

@ViRo3
Copy link
Author

ViRo3 commented Dec 31, 2021

Screen.Recording.2021-12-31.at.5.59.52.AM.mov

Attached is a screen recording of the freeze.
And attached below are the spin dump for it and for when it crashes.
freeze.txt
crassh.txt
Spindump_3.txt
final.txt

@low-batt
Copy link
Collaborator

@ViRo3: Thanks again for your help with these issues.

Good news. My guesses on the freeze were totally wrong. From a quick look this seems to be related to a recent IINA fix, not mpv.
Bad news. No symbols for IINA in the spindump. In this case I really need symbols to be able to figure out what is wrong.

@CarterLi: We must resolve the issue with missing debug symbols. I downloaded the latest IINA-Plus release and confirmed I see the same issue of not getting symbols in the spindump. If I run IINA I do get symbols.

I looked into this a little. The Xcode project for both IINA and IINA-Plus is configured for "DWARF with dSYM File" for release builds. Which means debug symbols end up in a separate file. I didn't see a separate symbol file in either application directory trees but I could have missed it. How are you building IINA-Plus for release?

@CarterLi
Copy link
Owner

@low-batt
Copy link
Collaborator

I was able to successfully build an archive using the Xcode line from the Makefile. This is what I see in the archive:

low-batt@gag archive.xcarchive$ ls
Info.plist	Products	SwiftSupport	dSYMs
low-batt@gag dSYMs$ ls
IINA.app.dSYM		OpenInIINA.appex.dSYM	Sparkle.framework.dSYM	iina-cli.dSYM

The debug symbols are not included in the executables in IINA.app and are instead separated out into these files. This is why names of methods are missing from crash reports and spin dumps. It might work on the machine upon which the build was done as macOS will search the local machine for dSYM files using spotlight.

The idea behind this is that some creators of propritary software do not want to make it easy for hackers to decode. They don't want the hackers to know the names of modules and methods of their software. There is also a tiny performance advantage as the symbols add to the size of the executable. That used to be an important issue. Probably not signifcant these days.

I've not found where IINA keeps its build script that creates the release, only the homebrew scripts for building dependencies. My guess it that they are not using the release configuration we see in the Xcode project, or somehow overriding the debug symbol handling.

In Xcode open the project and go to the Build Settings tab. Then look for the "Debug Information Format" section. Under that you will see configuration for Debug and Release. Debug is just "DWARF" whereas Release is "DWARF with dSYM File". That is what is causing the symbols to not be included. Change that to just "DWARF" like it is for Debug.

We need a build with working symbols that ViRo3 can use to generate another spindump, this time with symbols.

@CarterLi
Copy link
Owner

I'm pretty sure that we have debuging symbols compiled in now

image

Please check the latest release

@ViRo3
Copy link
Author

ViRo3 commented Dec 31, 2021

1.txt
2.txt
3.txt

1 - frame freeze
2 = non responsive after quitting
3 - after trying to open a file

@low-batt
Copy link
Collaborator

Just FYI, that gives me the info I needed. Currently researching this a lot to make sure the next fix works.

low-batt added a commit that referenced this issue Jan 1, 2022
The commit changes the order of acquiring locks in both of the ViewLayer draw
methods to first lock the OpenGL context before locking uninitLock.
@low-batt
Copy link
Collaborator

low-batt commented Jan 1, 2022

@ViRo3, @CarterLi, Thank you both for all the help on the freeze.
@ViRo3 Apologies for all the trouble!

The short story on this one is that I added locking and setting of the OpenGL context that was missing from one of the ViewLayer.draw methods. In doing so I matched the order of acquiring locks seen in the other draw method which locked another lock first. But it appears the Apple parent class had already locked the OpenGL context. I say "appears" because the Apple documentation is silent on this, so I'm basing it on behavior. I have pushed a fix that reverses the order of acquiring locks. I was finally able to reproduce the problem and with the fix it doesn't reproduce for me anymore. Details on the issue below. The other spindumps showed variations on the same problem.

Let's see if this fixes for ViRo3. I'm keeping my fingers crossed.

I have not forgotten about the title issue.
Or the legacy full screen issue I found investigating this issue.

Reproducing

This is a thread race condition so you have to try reproducing it over and over again until you get lucky. The way to do that is to play a video and set a very short A-B loop so that playback is quickly restarted over and over again and just let it run until it hangs.

Analysis

From the spin dump 1.txt we can see the controller thread is stopped in ViewLayer.draw(inCGLContext:pixelFormat:forLayerTime:displayTime:) waiting for a lock:

  Thread 0x189a05    DispatchQueue "com.colliderli.iina.controller"(174)    329 samples (1-329)    priority 47 (base 47)
  329  start_wqthread + 8 (libsystem_pthread.dylib + 8216) [0x19ecb0018]
    329  _pthread_wqthread + 288 (libsystem_pthread.dylib + 13060) [0x19ecb1304]
      329  _dispatch_workloop_worker_thread + 656 (libdispatch.dylib + 91912) [0x19eb09708]
        329  _dispatch_lane_invoke + 392 (libdispatch.dylib + 48804) [0x19eafeea4]
          329  _dispatch_lane_serial_drain + 672 (libdispatch.dylib + 45872) [0x19eafe330]
            329  _dispatch_client_callout + 20 (libdispatch.dylib + 15276) [0x19eaf6bac]
              329  _dispatch_call_block_and_release + 32 (libdispatch.dylib + 7776) [0x19eaf4e60]
                329  thunk for @escaping @callee_guaranteed () -> () + 20 (IINA + 1382188) [0x10233172c]
                  329  partial apply for closure #1 in MPVController.readEvents() + 32 (IINA + 1431144) [0x10233d668]
                    329  MPVController.handleEvent(_:) + 3172 (IINA + 1403756) [0x102336b6c]
                      329  PlayerCore.playbackRestarted() + 208 (IINA + 1254384) [0x1023123f0]
                        329  @objc ViewLayer.display() + 60 (IINA + 1015944) [0x1022d8088]
                          329  -[CAOpenGLLayer _display] + 584 (QuartzCore + 747340) [0x1a5c7274c]
                            329  CAOpenGLLayerDraw(CAOpenGLLayer*, double, CVTimeStamp const*, unsigned int) + 1516 (QuartzCore + 749348) [0x1a5c72f24]
                              329  @objc ViewLayer.draw(inCGLContext:pixelFormat:forLayerTime:displayTime:) + 40 (IINA + 1014944) [0x1022d7ca0]
                                329  specialized ViewLayer.draw(inCGLContext:pixelFormat:forLayerTime:displayTime:) + 212 (IINA + 1020620) [0x1022d92cc]
                                  329  _pthread_mutex_firstfit_lock_slow + 240 (libsystem_pthread.dylib + 7320) [0x19ecafc98]
                                    329  __psynch_mutexwait + 8 (libsystem_kernel.dylib + 17856) [0x19ec7c5c0]
                                     *329  psynch_mtxcontinue + 0 (pthread + 10036) [0xfffffe000a59a034] (blocked by turnstile waiting for IINA [19911] thread 0x187e11)

That must be this call to lock:

override func draw(inCGLContext ctx: CGLContextObj, pixelFormat pf: CGLPixelFormatObj, forLayerTime t: CFTimeInterval, displayTime ts: UnsafePointer<CVTimeStamp>?) {
  let mpv = videoView.player.mpv!
  needsMPVRender = false

  videoView.uninitLock.lock()

The mpvgl thread is stopped in ViewLayer.draw(forced:) waiting for access to the OpenGL context:

  Thread 0x187e11    DispatchQueue "com.colliderli.iina.mpvgl"(746)    329 samples (1-329)    priority 47 (base 47)
  329  start_wqthread + 8 (libsystem_pthread.dylib + 8216) [0x19ecb0018]
    329  _pthread_wqthread + 288 (libsystem_pthread.dylib + 13060) [0x19ecb1304]
      329  _dispatch_workloop_worker_thread + 656 (libdispatch.dylib + 91912) [0x19eb09708]
        329  _dispatch_lane_invoke + 392 (libdispatch.dylib + 48804) [0x19eafeea4]
          329  _dispatch_lane_serial_drain + 672 (libdispatch.dylib + 45872) [0x19eafe330]
            329  _dispatch_client_callout + 20 (libdispatch.dylib + 15276) [0x19eaf6bac]
              329  _dispatch_call_block_and_release + 32 (libdispatch.dylib + 7776) [0x19eaf4e60]
                329  thunk for @escaping @callee_guaranteed () -> () + 20 (IINA + 1382188) [0x10233172c]
                  329  partial apply for closure #1 in mpvUpdateCallback(_:) + 24 (IINA + 1437024) [0x10233ed60]
                    329  ViewLayer.draw(forced:) + 484 (IINA + 1015448) [0x1022d7e98]
                      329  CGLLockContext + 40 (OpenGL + 42248) [0x2000c7508]
                        329  _pthread_mutex_firstfit_lock_slow + 240 (libsystem_pthread.dylib + 7320) [0x19ecafc98]
                          329  __psynch_mutexwait + 8 (libsystem_kernel.dylib + 17856) [0x19ec7c5c0]
                           *329  psynch_mtxcontinue + 0 (pthread + 10036) [0xfffffe000a59a034] (blocked by turnstile waiting for IINA [19911] thread 0x189a05)

That is the call to lockAndSetOpenGLContext:

  func draw(forced: Bool = false) {
    needsMPVRender = true
    if forced { forceRender = true }
    display()
    if forced {
      forceRender = false
      return
    }
    if needsMPVRender {
      videoView.uninitLock.lock()
      // draw(inCGLContext:) is not called, needs a skip render
      if !videoView.isUninited, let renderContext = videoView.player.mpv?.mpvRenderContext {
        videoView.player.mpv?.lockAndSetOpenGLContext()

The attempt to lock the OpenGL context happens after locking the uninitLock. So this thread is blocking the controller thread while it waits for access to the OpenGL context.

So which thread has the OpenGL context?

The Apple documentation is terrible. This is the documentation for the draw method the controller thread is stopped in: draw(inCGLContext:pixelFormat:forLayerTime:displayTime:)

What is the status of the OpenGL context in the ctx parameter? Is it current for the thread? Did CAOpenGLLayer lock it? No discussion of this in the documentation for the class either: CAOpenGLLayer

This example from CALayerEssentials:

// 4)   [Required] Implement this message in order to actually draw anything.
//      Typically you will do the following when you recieve this message:
//      1. Draw your OpenGL content! (the current context has already been set)
//      2. call [super drawInContext:pixelFormat:forLayerTime:displayTime:] to finalize the layer content, or call glFlush().
//      NOTE: The viewport has already been set correctly by the time this message is sent, so you do not need to set it yourself.
//      The viewport is automatically updated whenever the layer is displayed (that is, when the -display message is sent).
//      This is arranged for when you send the -setNeedsDisplay message, or when the needsDisplayOnBoundsChange property is set to YES
//      and the layer's size changes.
-(void)drawInCGLContext:(CGLContextObj)glContext pixelFormat:(CGLPixelFormatObj)pixelFormat forLayerTime:(CFTimeInterval)timeInterval displayTime:(const CVTimeStamp *)timeStamp
{
    // Set the current context to the one given to us.
    CGLSetCurrentContext(glContext);

Says "(the current context has already been set)" in the header comment and then the first line of the code calls CGLSetCurrentContext.

I am thinking code in CAOpenGLLayer locked and set the OpenGL context before calling draw. This would explain the deadlock.

I was able to find this statement in OpenGL Programming Guide for Mac:

You can use CGLLockContext recursively.

So it is possible for ViewLayer.draw(inCGLContext:pixelFormat:forLayerTime:displayTime:) to lock the OpenGL context a second time without deadlocking on itself.

The change that introduced this problem was the addition of proper OpenGL context management to the method ViewLayer.draw(forced:) . In adding that I followed the locking order present in ViewLayer.draw(inCGLContext:pixelFormat:forLayerTime:displayTime:) which locks uninitLock first before locking the OpenGL context. But if the context in ctx has already been locked then the order of locking in ViewLayer.draw(forced:) is wrong and this would explain the deadlock.

Fixing

The fix for the fix changes the order of locking in both draw methods to first lock the OpenGL context before locking uninitLock. With this change I've not been able to generate a freeze using the short A-B loop.

@ViRo3
Copy link
Author

ViRo3 commented Jan 1, 2022

No problem! And Happy New Year @CarterLi @low-batt ! Hope the best year for you!

But here's additional log for a crash that came without the freeze
Spindump.txt

low-batt added a commit that referenced this issue Jan 1, 2022
This commit will add locking of the OpenGL context to the VideoView.uninit
method in order to match the order of lock acquisition the ViewLayer.draw
methods use.
@low-batt
Copy link
Collaborator

low-batt commented Jan 1, 2022

My bad yet again. I did a bunch of testing before pushing that last fix, but for whatever reason the timing of thread interaction on my Mac is not picking up these problems.

The latest spindump shows the main thread blocked in VideoView.uninit():

343  specialized AppDelegate.applicationShouldTerminate(_:) + 624 (IINA + 739796) [0x1022b49d4]
  343  VideoView.uninit() + 236 (IINA + 1043808) [0x1022fed60]
    343  CGLLockContext + 40 (OpenGL + 42248) [0x2000c7508]
      343  _pthread_mutex_firstfit_lock_slow + 240 (libsystem_pthread.dylib + 7320) [0x19ecafc98]
        343  __psynch_mutexwait + 8 (libsystem_kernel.dylib + 17856) [0x19ec7c5c0]
         *343  psynch_mtxcontinue + 0 (pthread + 10036) [0xfffffe000a59a034]

With the controller thread blocked in ViewLayer.canDraw:

343  ViewLayer.draw(forced:) + 112 (IINA + 1015076) [0x1022f7d24]
  343  @objc ViewLayer.display() + 60 (IINA + 1015944) [0x1022f8088]
    343  -[CAOpenGLLayer _display] + 584 (QuartzCore + 747340) [0x1a5c7274c]
      343  CAOpenGLLayerDraw(CAOpenGLLayer*, double, CVTimeStamp const*, unsigned int) + 688 (QuartzCore + 748520) [0x1a5c72be8]
        343  @objc ViewLayer.canDraw(inCGLContext:pixelFormat:forLayerTime:displayTime:) + 28 (IINA + 1014664) [0x1022f7b88]
          343  specialized ViewLayer.canDraw(inCGLContext:pixelFormat:forLayerTime:displayTime:) + 124 (IINA + 1019948) [0x1022f902c]
            343  _pthread_mutex_firstfit_lock_slow + 240 (libsystem_pthread.dylib + 7320) [0x19ecafc98]
            343  __psynch_mutexwait + 8 (libsystem_kernel.dylib + 17856) [0x19ec7c5c0]
             *343  psynch_mtxcontinue + 0 (pthread + 10036) [0xfffffe000a59a034] (blocked by turnstile with priority 47 waiting for IINA [26080] thread 0x1eb256)

I'm thinking the CAOpenGLLayer class has already locked the OpenGL context before it calls ViewLayer.canDraw, which is trying to lock uninitLock. But the main thread has already obtained that lock.

The VideoView.uninit method must be updated to match the change in the order of lock acquisition the ViewLayer.draw methods use.

I have made that change. A little worried about whether there are other issues due to this change in lock ordering. I have just done two 500 test runs using this script:

#!/bin/bash
for ((i = 1 ; i <= 500 ; i++)); do
  echo "Run $i"
  ./iina-cli --keep-running ~/Movies/issue-3331.mp4
  if [ $? -ne 0 ]; then
    echo "FAILED"
  fi
done

No crashes. No hangs. But with thread race conditions that doesn't mean a problem can't appear on another Mac.

@CarterLi
Copy link
Owner

CarterLi commented Jan 3, 2022

IINA hung several times today when playing network resources.

image

I didn't change playback speed or pause / unpause quickly. I just played the video normally.

Don't know whether it relates to this issue or not.

@low-batt
Copy link
Collaborator

low-batt commented Jan 3, 2022

Always need a full spin dump to investigate hangs. This tells us mpv for some reason blocked a call to getDouble. But without seeing what all the other threads are doing it harder to diagnose.

The call to syncUI tells me this is the change made for iina#3601 which was fairly simple. So this is not related to the original problems in issue 11, although it is clearly a freeze. I was sure not expecting the fairly simple change for iina#3601 to cause a hang. My best guess is that syncUI is being called too early and the previous code was getting away with it.

I will see if I can reproduce.

@low-batt
Copy link
Collaborator

low-batt commented Jan 3, 2022

I was unable to reproduce the problem. My guess is that syncUITime is being called before mpv has finished loading the video. I have pushed a change to check to see if loading has completed. If this does not work I may have to just back out this fix. If it does hang please try and capture a full spin dump.

I'm going to hold off pushing any more changes for now so we can be sure IINA-Plus has been stabilized.

CarterLi pushed a commit that referenced this issue Jan 19, 2022
This was also reported against IINA in issue iina#3596

The commit in the pull request will:
- Rename the PlayerCore property isMpvTerminated to isMpvTerminating to
  reflect that termination has been initiated and being processed
  asynchronously
- Change existing references to  isMpvTerminated  to use new name
- Change PlayerCore.terminateMPV to set isMpvTerminating to true right
  before starting the termination process
- Change PlayerCore.syncUI to do nothing if mpv is terminating
- Change MPVController.mpvQuit to remove observers MPVController
  registered before sending the quit command to mpv
- Change many MPVController methods to check to see if mpv is being
  terminated
CarterLi pushed a commit that referenced this issue Jan 19, 2022
The commit changes the order of acquiring locks in both of the ViewLayer draw
methods to first lock the OpenGL context before locking uninitLock.
CarterLi pushed a commit that referenced this issue Jan 19, 2022
This commit will add locking of the OpenGL context to the VideoView.uninit
method in order to match the order of lock acquisition the ViewLayer.draw
methods use.
CarterLi pushed a commit that referenced this issue Jan 21, 2022
This was also reported against IINA in issue iina#3596

The commit in the pull request will:
- Rename the PlayerCore property isMpvTerminated to isMpvTerminating to
  reflect that termination has been initiated and being processed
  asynchronously
- Change existing references to  isMpvTerminated  to use new name
- Change PlayerCore.terminateMPV to set isMpvTerminating to true right
  before starting the termination process
- Change PlayerCore.syncUI to do nothing if mpv is terminating
- Change MPVController.mpvQuit to remove observers MPVController
  registered before sending the quit command to mpv
- Change many MPVController methods to check to see if mpv is being
  terminated
CarterLi pushed a commit that referenced this issue Jan 21, 2022
The commit changes the order of acquiring locks in both of the ViewLayer draw
methods to first lock the OpenGL context before locking uninitLock.
CarterLi pushed a commit that referenced this issue Jan 21, 2022
This commit will add locking of the OpenGL context to the VideoView.uninit
method in order to match the order of lock acquisition the ViewLayer.draw
methods use.
CarterLi pushed a commit that referenced this issue Feb 21, 2022
This commit will add locking of the OpenGL context to the VideoView.uninit
method in order to match the order of lock acquisition the ViewLayer.draw
methods use.
CarterLi pushed a commit that referenced this issue Feb 28, 2022
This was also reported against IINA in issue iina#3596

The commit in the pull request will:
- Rename the PlayerCore property isMpvTerminated to isMpvTerminating to
  reflect that termination has been initiated and being processed
  asynchronously
- Change existing references to  isMpvTerminated  to use new name
- Change PlayerCore.terminateMPV to set isMpvTerminating to true right
  before starting the termination process
- Change PlayerCore.syncUI to do nothing if mpv is terminating
- Change MPVController.mpvQuit to remove observers MPVController
  registered before sending the quit command to mpv
- Change many MPVController methods to check to see if mpv is being
  terminated
CarterLi pushed a commit that referenced this issue Feb 28, 2022
The commit changes the order of acquiring locks in both of the ViewLayer draw
methods to first lock the OpenGL context before locking uninitLock.
CarterLi pushed a commit that referenced this issue Feb 28, 2022
This commit will add locking of the OpenGL context to the VideoView.uninit
method in order to match the order of lock acquisition the ViewLayer.draw
methods use.
CarterLi pushed a commit that referenced this issue Apr 23, 2022
This was also reported against IINA in issue iina#3596

The commit in the pull request will:
- Rename the PlayerCore property isMpvTerminated to isMpvTerminating to
  reflect that termination has been initiated and being processed
  asynchronously
- Change existing references to  isMpvTerminated  to use new name
- Change PlayerCore.terminateMPV to set isMpvTerminating to true right
  before starting the termination process
- Change PlayerCore.syncUI to do nothing if mpv is terminating
- Change MPVController.mpvQuit to remove observers MPVController
  registered before sending the quit command to mpv
- Change many MPVController methods to check to see if mpv is being
  terminated
CarterLi pushed a commit that referenced this issue Apr 23, 2022
The commit changes the order of acquiring locks in both of the ViewLayer draw
methods to first lock the OpenGL context before locking uninitLock.
CarterLi pushed a commit that referenced this issue Apr 23, 2022
This commit will add locking of the OpenGL context to the VideoView.uninit
method in order to match the order of lock acquisition the ViewLayer.draw
methods use.
low-batt added a commit that referenced this issue Apr 23, 2022
This was also reported against IINA in issue iina#3596

The commit in the pull request will:
- Rename the PlayerCore property isMpvTerminated to isMpvTerminating to
  reflect that termination has been initiated and being processed
  asynchronously
- Change existing references to  isMpvTerminated  to use new name
- Change PlayerCore.terminateMPV to set isMpvTerminating to true right
  before starting the termination process
- Change PlayerCore.syncUI to do nothing if mpv is terminating
- Change MPVController.mpvQuit to remove observers MPVController
  registered before sending the quit command to mpv
- Change many MPVController methods to check to see if mpv is being
  terminated
low-batt added a commit that referenced this issue Apr 23, 2022
The commit changes the order of acquiring locks in both of the ViewLayer draw
methods to first lock the OpenGL context before locking uninitLock.
low-batt added a commit that referenced this issue Apr 23, 2022
This commit will add locking of the OpenGL context to the VideoView.uninit
method in order to match the order of lock acquisition the ViewLayer.draw
methods use.
low-batt added a commit that referenced this issue Apr 24, 2022
This was also reported against IINA in issue iina#3596

The commit in the pull request will:
- Rename the PlayerCore property isMpvTerminated to isMpvTerminating to
  reflect that termination has been initiated and being processed
  asynchronously
- Change existing references to  isMpvTerminated  to use new name
- Change PlayerCore.terminateMPV to set isMpvTerminating to true right
  before starting the termination process
- Change PlayerCore.syncUI to do nothing if mpv is terminating
- Change MPVController.mpvQuit to remove observers MPVController
  registered before sending the quit command to mpv
- Change many MPVController methods to check to see if mpv is being
  terminated
low-batt added a commit that referenced this issue Apr 24, 2022
Resolved merge conflicts.

The commit changes the order of acquiring locks in both of the ViewLayer draw
methods to first lock the OpenGL context before locking uninitLock.
low-batt added a commit that referenced this issue Apr 27, 2022
This was also reported against IINA in issue iina#3596

The commit in the pull request will:
- Rename the PlayerCore property isMpvTerminated to isMpvTerminating to
  reflect that termination has been initiated and being processed
  asynchronously
- Change existing references to  isMpvTerminated  to use new name
- Change PlayerCore.terminateMPV to set isMpvTerminating to true right
  before starting the termination process
- Change PlayerCore.syncUI to do nothing if mpv is terminating
- Change MPVController.mpvQuit to remove observers MPVController
  registered before sending the quit command to mpv
- Change many MPVController methods to check to see if mpv is being
  terminated
low-batt added a commit that referenced this issue Apr 27, 2022
Resolved merge conflicts.

The commit changes the order of acquiring locks in both of the ViewLayer draw
methods to first lock the OpenGL context before locking uninitLock.
CarterLi pushed a commit that referenced this issue Apr 28, 2022
This was also reported against IINA in issue iina#3596

The commit in the pull request will:
- Rename the PlayerCore property isMpvTerminated to isMpvTerminating to
  reflect that termination has been initiated and being processed
  asynchronously
- Change existing references to  isMpvTerminated  to use new name
- Change PlayerCore.terminateMPV to set isMpvTerminating to true right
  before starting the termination process
- Change PlayerCore.syncUI to do nothing if mpv is terminating
- Change MPVController.mpvQuit to remove observers MPVController
  registered before sending the quit command to mpv
- Change many MPVController methods to check to see if mpv is being
  terminated
CarterLi pushed a commit that referenced this issue Apr 28, 2022
Resolved merge conflicts.

The commit changes the order of acquiring locks in both of the ViewLayer draw
methods to first lock the OpenGL context before locking uninitLock.
low-batt added a commit that referenced this issue May 1, 2022
This was also reported against IINA in issue iina#3596

The commit in the pull request will:
- Rename the PlayerCore property isMpvTerminated to isMpvTerminating to
  reflect that termination has been initiated and being processed
  asynchronously
- Change existing references to  isMpvTerminated  to use new name
- Change PlayerCore.terminateMPV to set isMpvTerminating to true right
  before starting the termination process
- Change PlayerCore.syncUI to do nothing if mpv is terminating
- Change MPVController.mpvQuit to remove observers MPVController
  registered before sending the quit command to mpv
- Change many MPVController methods to check to see if mpv is being
  terminated
low-batt added a commit that referenced this issue May 1, 2022
Resolved merge conflicts.

The commit changes the order of acquiring locks in both of the ViewLayer draw
methods to first lock the OpenGL context before locking uninitLock.
CarterLi pushed a commit that referenced this issue May 5, 2022
This was also reported against IINA in issue iina#3596

The commit in the pull request will:
- Rename the PlayerCore property isMpvTerminated to isMpvTerminating to
  reflect that termination has been initiated and being processed
  asynchronously
- Change existing references to  isMpvTerminated  to use new name
- Change PlayerCore.terminateMPV to set isMpvTerminating to true right
  before starting the termination process
- Change PlayerCore.syncUI to do nothing if mpv is terminating
- Change MPVController.mpvQuit to remove observers MPVController
  registered before sending the quit command to mpv
- Change many MPVController methods to check to see if mpv is being
  terminated
CarterLi pushed a commit that referenced this issue May 5, 2022
Resolved merge conflicts.

The commit changes the order of acquiring locks in both of the ViewLayer draw
methods to first lock the OpenGL context before locking uninitLock.
CarterLi pushed a commit that referenced this issue May 9, 2022
This was also reported against IINA in issue iina#3596

The commit in the pull request will:
- Rename the PlayerCore property isMpvTerminated to isMpvTerminating to
  reflect that termination has been initiated and being processed
  asynchronously
- Change existing references to  isMpvTerminated  to use new name
- Change PlayerCore.terminateMPV to set isMpvTerminating to true right
  before starting the termination process
- Change PlayerCore.syncUI to do nothing if mpv is terminating
- Change MPVController.mpvQuit to remove observers MPVController
  registered before sending the quit command to mpv
- Change many MPVController methods to check to see if mpv is being
  terminated
CarterLi pushed a commit that referenced this issue May 9, 2022
Resolved merge conflicts.

The commit changes the order of acquiring locks in both of the ViewLayer draw
methods to first lock the OpenGL context before locking uninitLock.
CarterLi pushed a commit that referenced this issue May 17, 2022
This was also reported against IINA in issue iina#3596

The commit in the pull request will:
- Rename the PlayerCore property isMpvTerminated to isMpvTerminating to
  reflect that termination has been initiated and being processed
  asynchronously
- Change existing references to  isMpvTerminated  to use new name
- Change PlayerCore.terminateMPV to set isMpvTerminating to true right
  before starting the termination process
- Change PlayerCore.syncUI to do nothing if mpv is terminating
- Change MPVController.mpvQuit to remove observers MPVController
  registered before sending the quit command to mpv
- Change many MPVController methods to check to see if mpv is being
  terminated
CarterLi pushed a commit that referenced this issue May 17, 2022
Resolved merge conflicts.

The commit changes the order of acquiring locks in both of the ViewLayer draw
methods to first lock the OpenGL context before locking uninitLock.
low-batt added a commit that referenced this issue May 28, 2022
This was also reported against IINA in issue iina#3596

The commit in the pull request will:
- Rename the PlayerCore property isMpvTerminated to isMpvTerminating to
  reflect that termination has been initiated and being processed
  asynchronously
- Change existing references to  isMpvTerminated  to use new name
- Change PlayerCore.terminateMPV to set isMpvTerminating to true right
  before starting the termination process
- Change PlayerCore.syncUI to do nothing if mpv is terminating
- Change MPVController.mpvQuit to remove observers MPVController
  registered before sending the quit command to mpv
- Change many MPVController methods to check to see if mpv is being
  terminated
low-batt added a commit that referenced this issue May 28, 2022
Resolved merge conflicts.

The commit changes the order of acquiring locks in both of the ViewLayer draw
methods to first lock the OpenGL context before locking uninitLock.
CarterLi pushed a commit that referenced this issue Jun 8, 2022
This was also reported against IINA in issue iina#3596

The commit in the pull request will:
- Rename the PlayerCore property isMpvTerminated to isMpvTerminating to
  reflect that termination has been initiated and being processed
  asynchronously
- Change existing references to  isMpvTerminated  to use new name
- Change PlayerCore.terminateMPV to set isMpvTerminating to true right
  before starting the termination process
- Change PlayerCore.syncUI to do nothing if mpv is terminating
- Change MPVController.mpvQuit to remove observers MPVController
  registered before sending the quit command to mpv
- Change many MPVController methods to check to see if mpv is being
  terminated
CarterLi pushed a commit that referenced this issue Jun 8, 2022
Resolved merge conflicts.

The commit changes the order of acquiring locks in both of the ViewLayer draw
methods to first lock the OpenGL context before locking uninitLock.
CarterLi pushed a commit that referenced this issue Jun 13, 2022
This was also reported against IINA in issue iina#3596

The commit in the pull request will:
- Rename the PlayerCore property isMpvTerminated to isMpvTerminating to
  reflect that termination has been initiated and being processed
  asynchronously
- Change existing references to  isMpvTerminated  to use new name
- Change PlayerCore.terminateMPV to set isMpvTerminating to true right
  before starting the termination process
- Change PlayerCore.syncUI to do nothing if mpv is terminating
- Change MPVController.mpvQuit to remove observers MPVController
  registered before sending the quit command to mpv
- Change many MPVController methods to check to see if mpv is being
  terminated
CarterLi pushed a commit that referenced this issue Jun 13, 2022
Resolved merge conflicts.

The commit changes the order of acquiring locks in both of the ViewLayer draw
methods to first lock the OpenGL context before locking uninitLock.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants