Menu

#5911 BASS: Crash when using GMM and control panel

Beneath a Steel Sky
closed-fixed
digitall
None
5
2012-04-08
2011-12-02
No

When opening the GMM with Ctrl-F5 while the regular F5 menu is open, you can load a game. Doing so will instantly crash scummvm.

(Current git, Linux)

Discussion

  • Willem Jan Palenstijn

    Loading while the screen is scrolling also has interesting effects.

     
  • digitall

    digitall - 2011-12-02

    Replicated crash, reran with Valgrind. This is due to accessing freed memory. Relevant trace follows:
    ==18141== Invalid read of size 2
    ==18141== at 0x80D40BA: Sky::ConResource::isMouseOver(unsigned int, unsigned
    int) (control.cpp:61)
    ==18141== by 0x80D689A: Sky::Control::doControlPanel() (control.cpp:490)
    ==18141== by 0x80CDCB8: Sky::SkyEngine::handleKey() (sky.cpp:145)
    ==18141== by 0x80CE0EB: Sky::SkyEngine::go() (sky.cpp:211)
    ==18141== by 0x80CF28E: Sky::SkyEngine::run() (sky.h:108)
    ==18141== by 0x804F708: runGame(PluginSubclass<MetaEngine> const*, OSystem&,
    Common::String const&) (main.cpp:210)
    ==18141== by 0x8050322: scummvm_main (main.cpp:423)
    ==18141== by 0x804E582: main (posix-main.cpp:45)
    ==18141== Address 0x6927ee0 is 16 bytes inside a block of size 36 free'd
    ==18141== at 0x40252EC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
    ==18141== by 0x80DAB45: Sky::ConResource::~ConResource() (control.h:138)
    ==18141== by 0x80D4D64: Sky::Control::removePanel() (control.cpp:227)
    ==18141== by 0x80DA65E: Sky::Control::quickXRestore(unsigned short) (control.cpp:1461)
    ==18141== by 0x80CD21D: Sky::SkyEngine::loadGameState(int) (detection.cpp:279)
    ==18141== by 0x8150810: Engine::openMainMenuDialog() (engine.cpp:426)
    ==18141== by 0x81320AD: DefaultEventManager::pollEvent(Common::Event&) (default-events.cpp:127)
    ==18141== by 0x80DA88D: Sky::Control::delay(unsigned int) (control.cpp:1490)
    ==18141== by 0x80D6827: Sky::Control::doControlPanel() (control.cpp:482)
    ==18141== by 0x80CDCB8: Sky::SkyEngine::handleKey() (sky.cpp:145)
    ==18141== by 0x80CE0EB: Sky::SkyEngine::go() (sky.cpp:211)
    ==18141== by 0x80CF28E: Sky::SkyEngine::run() (sky.h:108)
    ==18141==

    Many similar invalid accesses occur and outside of Valgrind, cause a segfault...

     
  • digitall

    digitall - 2011-12-02

    According to fuzzie:
    The problem is that doControlPanel() doesn't disable save/load and yet assumes that a game won't get loaded from underneath it..

     
  • digitall

    digitall - 2012-04-08
    • assigned_to: nobody --> tdhs
    • status: open --> closed-fixed
     
  • digitall

    digitall - 2012-04-08

    This bug was fixed by commit 2fe60082e87ecc2c2d2f433f73e7c70e988e90d0 from Eric Culp, one of our GSoC applicants. Closing.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.