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 stopped responding after quit clicked #4310

Closed
1 task
low-batt opened this issue Mar 31, 2023 · 2 comments · Fixed by #4368
Closed
1 task

IINA stopped responding after quit clicked #4310

low-batt opened this issue Mar 31, 2023 · 2 comments · Fixed by #4368

Comments

@low-batt
Copy link
Contributor

System and IINA version:

  • macOS 13.3
  • IINA 1.3.1

Expected behavior:
After clicking on Quit IINA under the IINA menu the application terminates.

Actual behavior:
Rarely after clicking on Quit IINA IINA does not terminate and becomes unresponsive.

quit-hang-process-sample.txt

Steps to reproduce:
Click on Quit IINA under the IINA menu while a video is playing.

  • MPV does not have this problem.

Unknown.

How often does this happen?
Rarely. Very difficult to reproduce. First time I have seen this.

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

svobs commented Mar 31, 2023

I have seen this happen a couple of times too, but only while running via XCode, so wasn't sure whether it was caused by XCode or its debugger.

@low-batt
Copy link
Contributor Author

Catching me before I have fully analyzed this one, but I suspect it is due to an issue you pointed out, that mpv sends a bunch of events when stopping that we should not be processing. I will be looking into whether this is a delayed forced drawing in reaction to one of those events.

low-batt added a commit that referenced this issue Apr 20, 2023
This commit will:
- Change MPVController to call PlayerCore when certain properties change
- Add checking for shutting down before processing property changes
- Change MPVController.handlePropertyChange to use the value passed in
  the event for the property idleActive
- Move setting of the PlayerCore properties isStopping and isStopped to
  the openMainWindow method

Once the asynchronous quit command has been sent to mpv IINA must not
call certain mpv methods. This is a mpv requirement. Violating this
requirement can result in crashes. Because mpv will still emit property
change events the burden is on IINA to know that mpv has been told to
quit and the property change events should not be processed.

This commit moves code in MPVController that was calling various
PlayerCore methods into PlayerCore and adds checks to ignore the
property changes if IINA is shutting down the mpv core.
@low-batt low-batt linked a pull request Apr 20, 2023 that will close this issue
2 tasks
uiryuu pushed a commit that referenced this issue Apr 22, 2023
This commit will:
- Change MPVController to call PlayerCore when certain properties change
- Add checking for shutting down before processing property changes
- Change MPVController.handlePropertyChange to use the value passed in
  the event for the property idleActive
- Move setting of the PlayerCore properties isStopping and isStopped to
  the openMainWindow method

Once the asynchronous quit command has been sent to mpv IINA must not
call certain mpv methods. This is a mpv requirement. Violating this
requirement can result in crashes. Because mpv will still emit property
change events the burden is on IINA to know that mpv has been told to
quit and the property change events should not be processed.

This commit moves code in MPVController that was calling various
PlayerCore methods into PlayerCore and adds checks to ignore the
property changes if IINA is shutting down the mpv core.
uiryuu pushed a commit that referenced this issue Apr 22, 2023
This commit will:
- Change MPVController to call PlayerCore when certain properties change
- Add checking for shutting down before processing property changes
- Change MPVController.handlePropertyChange to use the value passed in
  the event for the property idleActive
- Move setting of the PlayerCore properties isStopping and isStopped to
  the openMainWindow method

Once the asynchronous quit command has been sent to mpv IINA must not
call certain mpv methods. This is a mpv requirement. Violating this
requirement can result in crashes. Because mpv will still emit property
change events the burden is on IINA to know that mpv has been told to
quit and the property change events should not be processed.

This commit moves code in MPVController that was calling various
PlayerCore methods into PlayerCore and adds checks to ignore the
property changes if IINA is shutting down the mpv core.
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.

2 participants