Dn-FamiTracker icon indicating copy to clipboard operation
Dn-FamiTracker copied to clipboard

Hang when running Dn-FT on single-core affinity and loading modules

Open nyanpasu64 opened this issue 1 year ago • 1 comments

devenv_R4s7rIGYJJ

CSoundGen repeatedly unlocks and relocks the CSoundGen mutex, but only blocks on pushing audio while holding the mutex. If the GUI thread cannot run in parallel (eg. on a single-core CPU or affinity, or on some users even on multi-core CPUs), it never has a chance to acquire the mutex, eg. when loading other documents -> LoadMachineSettings().

CSoundGen can be restructured to release the mutex when pushing audio, and we must verify this change does not cause problems. Alternatively, the GUI can interrupt CSoundGen when trying to cancel audio and acquire the mutex.

nyanpasu64 avatar Aug 03 '22 00:08 nyanpasu64

~~deadlock~~ same fuckery, single-stepping through the audio thread can free the gui thread when nothing else can

devenv_nCPyOMVq3c

:(

nyanpasu64 avatar Sep 13 '22 17:09 nyanpasu64