Boot loop issue - possible fix
While working on my fork, I might have figured out a bit of the boot loop issue.
My problem : Send a large number of roms while debugging never works while attached to visual studio. Always had to run the exe detached otherwise i get in a bootloop. Even when detached i get bootloop, but much less often.
My actual tech issue : While hakchi is building the kernel, it will build it in chunk. Sometime the chunk ends up too large so it retry with less roms. Doing so, the code try to delete the temp folder. Even though the folder is empty, the Directory.delete call fail saying "Directory is not empty". This is because explorer.exe or Hakchi still have a hook open / not garbage collected on the folder. The whole create patched kernel fail but for some reason execution continue.
Possible fix : 1 - Garbage collect before rebuilding the kernel 2 - retry + sleep mecanism on folder delete. 3 - Prompt user to manually delete the folder if there's exception.
Still not 100% sure this is the root cause of my boot loop, but just wanted to inform you.
Same issues does appear on directory.create
However, ended up not being related to the boot loop. Still trying to figure it out.
Finally figured it out! The mod files that get include in the source, for some reason line break gets converted from UNIX to PC. Using proper mod file fix my issue