Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game hangs when trying to select a chart with a completely empty measure in the simfile #581

Open
som1sezhi opened this issue Dec 21, 2024 · 0 comments

Comments

@som1sezhi
Copy link

I found out that the Medium chart to Emotions Lost In Time in Kyzentun Doubles contains a completely empty measure (see line ~6470 in the simfile):

...
0000
0000
0000
0000
,
,  // measure 16
0000
0000
0000
0000
...

Upon trying to select this chart in the songwheel, the game hangs.

I believe this is caused by an infinite loop occurring in MinimizeMeasure() when passed an empty table:

while not minimal and #measure % 2 == 0 do

A solution could be to return from MinimizeMeasure() early if the measure is empty. Alternatively, it could emit a single 0000 row so that the chart hashes to the same value as a chart with a proper "empty measure" with four rows of 0000, though I'm not sure if that's the sort of thing we care a lot about. For reference, currently ITGmania seems to interpret this completely-empty measure as a full measure with nothing inside it, so the same as four rows of 0000 (though both this code in NoteDataUtil.cpp and the apparent intent of Emotions Lost In Time's chart seem to indicate that this empty measure should be completely ignored, so I'm not sure what's going on here).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant