nicoco007 / BeatSaberCustomAvatars

Beat Saber mod that allows the use of custom player avatars for in-game body presence.
GNU Lesser General Public License v3.0
262 stars 41 forks source link

CRITICAL errors occur in chain notes composed of elements only (no head notes), and the notes cannot be cut. #167

Open rynan4818 opened 6 days ago

rynan4818 commented 6 days ago

Describe the bug CRITICAL error occurs in the chain notes made up of only elements near 27 seconds in the Lawless Expert+ map below. https://beatsaver.com/maps/40908 There are other maps with the same problem.

The error occurs in the following line of the source code: InvalidOperationException: Sequence contains no matching element.

https://github.com/nicoco007/BeatSaberCustomAvatars/blob/main/Source/CustomAvatar/Utilities/BeatmapObjectEventFilter.cs#L148

Because the processing that combines the occurrence of Chain Notes events is based on BurstSliderHead, if BurstSliderElement is the first element in the Map, an error will occur because Head cannot be found.

As I couldn't think of a way to fix it properly, I made a simple patch to suppress the CRITICAL error for the time being.

https://github.com/rynan4818/CustomAvatarsGetHeadNotePatch/releases

Also, I think there are many users who are using BS1.29.1, so please also fix it for 5.3.2.

nicoco007 commented 5 days ago

Thanks for the report! I'll see what I can do.