nike4613 / BeatSaber-IPA-Reloaded

A Unity mod injector built for Beat Saber.
https://nike4613.github.io/BeatSaber-IPA-Reloaded/
Other
180 stars 28 forks source link

If there are too many mods, the error loops endlessly #87

Closed rakkyo150 closed 10 months ago

rakkyo150 commented 1 year ago

If there are too many mods, the error loops endlessly.

Looping Error Groups

[ERROR @ 22:57:48 | IPA/Config] Error waiting for in-memory updates
[ERROR @ 22:57:48 | IPA/Config] System.NotSupportedException: The number of WaitHandles must be less than or equal to 64.
[ERROR @ 22:57:48 | IPA/Config]   at System.Threading.WaitHandle.WaitAny (System.Threading.WaitHandle[] waitHandles, System.Int32 millisecondsTimeout, System.Boolean exitContext) [0x00038] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 22:57:48 | IPA/Config]   at System.Threading.WaitHandle.WaitAny (System.Threading.WaitHandle[] waitHandles) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 
[ERROR @ 22:57:48 | IPA/Config]   at IPA.Config.ConfigRuntime.SaveThread () [0x00065] in <85e5e5773585418d89fcc2712ee48bcc>:0 

Error Log

_latest.log

How to reproduce

Use mods with configuration files beyond 64.

Relevant BSIPA section

https://github.com/nike4613/BeatSaber-IPA-Reloaded/blob/c4dc707b6030c54b5c3255a81a2c104bc9582847/IPA.Loader/Config/ConfigRuntime.cs#L221-L241

Suggested workaround

WaitAny while dividing waitHandles so that it does not exceed 64.

Finally

I could not set up the development environment well and have not enough time, so I could not pull request. Sorry if this is hard to read because I wrote this using automatic translation. Thank you very much!