-
Notifications
You must be signed in to change notification settings - Fork 88
Description
When I hot reload a lot I get error "too many threads" and then the game crashes.
my memory is vague. I don't remember if I was swapping the DLL while the previous one was being loaded.
This doesn't happen too often though.
might be related to https://github.com/CitiesSkylinesMods/TMPE/pull/640/files/5a3ef25473a3696012317422aafbbd4e3bad59c2#r375479944 and #640 (comment)
we need to check stack trace and look for thread leak.
unloading DLL only calls OnDisable. It does not call the OnRelease() of loading extension. What does it do to threading extension? In any case the OnRelease() override of our threading extension is empty so I am not sure if that makes a difference. I thinl the game no longer calls overrides from old threading extension DLL ... I hope.
EDIT:
Fixing this is not so important in itself but it might help us improve our code and hunt down some other hidden bugs.