Open rylid-umil opened 1 month ago
Please provide a clear step-by-step procedure of how to reproduce this, along with all files and code modifications you made. Otherwise, (1) we have literally no way to debug this, and (2) it could be that the issue is with the code you made.
Step by step instruction to reproduce:
https://github.com/user-attachments/assets/b27a75cb-e7b2-4ee2-a471-49a4338922ef
It seems to happen in the clearAllMarks function. SO maybe a highlight was placed at 32768? Or maybe the length 32768 is so long it bugs out sorts (like FlammerSort), but if a highlight was placed at 32768 (out of bounds) the Highlights.markArray(1, 32768); would've thrown an out of bounds error at me but it didn't. it was the clear all marks function.
I'm confused, isn't there clearly an out-of-bounds error displayed in an error popup before you check the console? Anyway, the error occurs while the sort is still running, so it seems like it's an issue with your own sort.
What could the issue be then? Also, before i did the recording, there was no error message that popped up. If it was a Highlights.markArray(1, 32768);, it would have shown an out of bounds error originating from a markArray, but here it shows from a clearAllMarks.
I've traced down the reason, described in this PR #101
So it is a problem with my sort, but it doesn't throw an exception early due to this.
This probably also is the case with FlammerSort, but it doesn't seem to happen with lengths < 32768 (it works just fine no errors in console or in program)
When a sort ended on length 32768 length, the visual freezes, highlights and sound are frozen, but not cause of a freeze bug, it was beacuse it seemed when it tried to end the sort, the clear all marks bugged out.
I dont know why, but i didnt edit the highlight code, so it must be the same from my to your fork. It happens when i disable "End sweep anim", and when i am using a custom sort "Adaptive Sort" i made but not when i am using any other sorts. I do not get why it does not work, as if it was a mark index that was out of bounds (example Highlights.markArray(1, 32768) at 32768 length) it would've thrown an error at me, but it didn't. Yes, i tested importing my sort into your fork (with the added importation of MathExtra from the code) but it did not work.