chown2 / lunaticvibesf

Lunatic Vibes F - a BMS client, a Lunatic Rave 2 clone
MIT License
4 stars 0 forks source link

RenderParams::accelType is not checked for unsupported/invalid values in skin parsing #78

Closed chown2 closed 4 months ago

chown2 commented 4 months ago

Transition to spdresult result skin:

/path/to/lunaticvibesf/src/game/graphics/sprite.cpp:154:41: runtime error: load of value 24, which is not a valid value for type 'accelType'
    #0 0x555559a4595e in SpriteBase::updateMotion(lunaticvibes::Time const&) /path/to/lunaticvibesf/src/game/graphics/sprite.cpp:154
    #1 0x555559a47d2a in SpriteBase::update(lunaticvibes::Time const&) /path/to/lunaticvibesf/src/game/graphics/sprite.cpp:197
    #2 0x555559a4ff8c in SpriteSelection::update(lunaticvibes::Time const&) /path/to/lunaticvibesf/src/game/graphics/sprite.cpp:325
    #3 0x555559a517c8 in SpriteAnimated::update(lunaticvibes::Time const&) /path/to/lunaticvibesf/src/game/graphics/sprite.cpp:346
    #4 0x5555594fbc8c in operator() /path/to/lunaticvibesf/src/game/skin/skin.cpp:54
    #5 0x555559504515 in for_each<std::_List_iterator<std::shared_ptr<SpriteBase> >, SkinBase::update()::<lambda(const std::shared_ptr<SpriteBase>&)> > /usr/include/c++/13.2.1/bits/stl_algo.h:3833
    #6 0x555559503760 in __brick_walk1<std::_List_iterator<std::shared_ptr<SpriteBase> >, SkinBase::update()::<lambda(const std::shared_ptr<SpriteBase>&)> > /usr/include/c++/13.2.1/pstl/algorithm_impl.h:94
    #7 0x5555595030a8 in __pattern_walk1<const __pstl::execution::v1::parallel_unsequenced_policy&, std::_List_iterator<std::shared_ptr<SpriteBase> >, SkinBase::update()::<lambda(const std::shared_ptr<SpriteBase>&)>, std::integral_constant<bool, false> > /usr/include/c++/13.2.1/pstl/algorithm_impl.h:111
    #8 0x555559502627 in for_each<const __pstl::execution::v1::parallel_unsequenced_policy&, std::_List_iterator<std::shared_ptr<SpriteBase> >, SkinBase::update()::<lambda(const std::shared_ptr<SpriteBase>&)> > /usr/include/c++/13.2.1/pstl/glue_algorithm_impl.h:59
    #9 0x5555594fc59a in SkinBase::update() /path/to/lunaticvibesf/src/game/skin/skin.cpp:62
    #10 0x5555595df8c3 in SkinLR2::update() /path/to/lunaticvibesf/src/game/skin/skin_lr2.cpp:4315
    #11 0x555558f70fc2 in SceneBase::update() /path/to/lunaticvibesf/src/game/scene/scene.cpp:138
    #12 0x555558dceb9d in mainLoop() /path/to/lunaticvibesf/src/game/game.cpp:392
    #13 0x555558dcc18f in main /path/to/lunaticvibesf/src/game/game.cpp:279
    #14 0x7ffff6e43ccf  (/usr/lib/libc.so.6+0x25ccf) (BuildId: 6542915cee3354fbcf2b3ac5542201faec43b5c9)
    #15 0x7ffff6e43d89 in __libc_start_main (/usr/lib/libc.so.6+0x25d89) (BuildId: 6542915cee3354fbcf2b3ac5542201faec43b5c9)
    #16 0x555558dc4024 in _start (/path/to/LunaticVibesF+0x3870024) (BuildId: ad11c0df7f7c5d6e2d6105dace51f320545a2154)
lunaticvibesf/src/game/graphics/sprite.cpp:51:17: runtime error: load of value 24, which is not a valid value for type 'accelType'