Skip to content

Crash in mpv_set_property during termination #3596

@low-batt

Description

@low-batt

System and IINA version:

  • macOS 12.1
  • IINA 1.2.0 + changes

Expected behavior:
IINA quits without crashing.

Actual behavior:
If IINA is running in full-screen mode it may crash when quitting.

This issue filed against IINA-Plus: CarterLi#11 reports a crash during shutdown. IINA-Plus already contains the changes in this IINA PR #3591 which cause IINA to properly wait for mpv to shutdown. This makes it more likely that existing issues with coordination of threads in the shutdown process will be exposed. Therefore this same crash may be possible in IINA, just currently less likely.

The full crash report is available in the IINA-Plus issue, so I have only included the top of the stack off the crashing thread here.

Crash report:
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

Steps to reproduce:
This is an event / thread race condition, so very difficult to reproduce.

I have already reproduced the problem. I will post an analysis and proposed fix shortly.

  • MPV does not have this problem.

This is an IINA problem.

How often does this happen?
If the fix to wait for mpv to shutdown is applied it is not hard to reproduce.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions