ManlyMarco / Illusion_BrowserFolders

Add folder support to file browsers in games made by Illusion
https://www.patreon.com/ManlyMarco
GNU General Public License v3.0
31 stars 13 forks source link

BrowserFolders can hang during shutdown or when leaving maker #33

Closed GeBo1 closed 2 years ago

GeBo1 commented 3 years ago

Not sure when this started, but it's not just in the latest version.

Steps to recreate in KK main game:

This is caused by FileSystemWatcher, so easy/temporary fix is make InitFileSystemWatcher just return without doing anything, auto-updating will be disabled, but everything else will work fine.

FileSystemWatcher is IDisposable so any classes storing one as a member needs to also be IDisposable and correctly implement the disposal pattern, and so on up the object tree, but FolderTreeView is kept as a static on most classes, which complicates things.

Probably best to disable the auto-refresh until it's worked out.

ManlyMarco commented 3 years ago

Better to dispose in the game exit event.

GeBo1 commented 3 years ago

That doesn't fix maker exit hanging (and I tried disposing in maker exit event and couldn't make it work). I haven't really tested with the in-game maker or other scenes in game where you select cards yet, since disabling it worked.

ManlyMarco commented 2 years ago

Already solved.