ikemen-engine / Ikemen-GO

An open-source fighting game engine that supports MUGEN resources.
https://ikemen-engine.github.io
Other
729 stars 125 forks source link

Crash upon reselecting stage with attached character #1982

Closed Orange-Dolphin closed 2 months ago

Orange-Dolphin commented 2 months ago

Describe the bug

I have run into a crash on the current nightly that seems to be associated with stages using attached characters. If you select a stage with the same attached character 2 times in a row, the game will crash(crash log included below). A few notes from my tests that might be of some help, -It does not require to be the same stage, though it can be, the only requirement is that they share the same attached character -This crash does not occur when selecting a stages with different attached characters -This crash does not occur when selecting the same stage without attached characters -The issue occurs regardless of what the code of the attached character is; The crash occurs even if the attached character has no code.

Ikemen.log

To Reproduce

Enter any mode where you have the option to select a stage, select a stage with an attached character. Return back to the character select and select the same stage again. The engine crashes under these circumstances. For convenience, I have attached a modified version of stage0(Training Room) that uses an empty attached character. This attached character is a blank file. stage0.zip

Expected behavior

The engine should allow stages with the same attached character twice in a row, without any crash.

Screenshots / Video

No response

Engine Version (or source code date)

08-29-24

Operating system

Windows

Extra context or search terms

Attached Character, stages, crash

potsmugen commented 2 months ago

This seems to happen because the attached char has no animations. I'll add some safety checks and take the opportunity to refactor that part a bit.