Sadly, due to how the code currently behaves, it might rarely happen that deallocation triggers such changes on a background thread. Those background changes should not be too harmful in general, and we lived with them since a very long time since they are not easy to fix.
But with the recent introduction of SPM we found that assertions are not stripped from release package products written in Objective-C. I opened a dedicated thread on the Swift forums, but this means that a rare probably unharmful behavior has now turned into a rare crash.
In the thread linked above I propose a simple workaround to fix this issue, either because this is how SPM must behave by design, or while waiting for a fix in an upcoming SPM release.
A main-thread assertion check in the controller helps preventing obvious programming issues which could lead to the playback state being updated on a background thread.
Sadly, due to how the code currently behaves, it might rarely happen that deallocation triggers such changes on a background thread. Those background changes should not be too harmful in general, and we lived with them since a very long time since they are not easy to fix.
But with the recent introduction of SPM we found that assertions are not stripped from release package products written in Objective-C. I opened a dedicated thread on the Swift forums, but this means that a rare probably unharmful behavior has now turned into a rare crash.
In the thread linked above I propose a simple workaround to fix this issue, either because this is how SPM must behave by design, or while waiting for a fix in an upcoming SPM release.