#12618 closed defect (worksforme)

GNAP: Crash when opening inventory

Reported by: eriktorbjorn Owned by: sev-
Priority: high Component: Engine: GNAP
Version: Keywords:
Cc: Game:

Description

Current ScummVM, English version of the game.

I don't know how to reproduce this, but I've had it happen twice now in a short while. In both cases, I was just clicking around on stuff in the very first room, before opening the inventory. The second time, I managed to capture it in a debugger:

#0  0x0000555556acaca0 in READ_UINT32(void const*) (ptr=0x0)
    at ./common/endian.h:259
#1  Gnap::GameSys::blitSurface32(Graphics::Surface*, int, int, Graphics::Surface*, Common::Rect&, bool)
    (this=0x55555c614780, destSurface=0x55555c5f5910, x=333, y=47, sourceSurface=0x55555de96ac0, sourceRect=..., transparent=true)
    at engines/gnap/gamesys.cpp:648
#2  0x0000555556acb514 in Gnap::GameSys::seqDrawStaticFrame(Graphics::Surface*, Gnap::SequenceFrame&, Common::Rect*)
    (this=0x55555c614780, surface=0x55555de96ac0, frame=..., subRect=0x55555c615b60) at engines/gnap/gamesys.cpp:773
#3  0x0000555556acbd49 in Gnap::GameSys::drawSprites() (this=0x55555c614780)
    at engines/gnap/gamesys.cpp:879
#4  0x0000555556ab224b in Gnap::GnapEngine::gameUpdateTick()
    (this=0x55555cdf5570) at engines/gnap/gnap.cpp:328
#5  0x0000555556ab271f in Gnap::GnapEngine::delayTicks(int, int, bool)
    (this=0x55555cdf5570, val=5, idx=0, updateCursor=true)
    at engines/gnap/gnap.cpp:412
#6  0x0000555556ab27d2 in Gnap::GnapEngine::delayTicksCursor(int)
    (this=0x55555cdf5570, val=5) at engines/gnap/gnap.cpp:430
#7  0x0000555556ab933d in Gnap::GnapEngine::runMenu() (this=0x55555cdf5570)
    at engines/gnap/menu.cpp:286
#8  0x0000555556ae2e4f in Gnap::Scene01::run() (this=0x55555d5ffbe0)
    at engines/gnap/scenes/group0.cpp:118
#9  0x0000555556ac0221 in Gnap::GnapEngine::runSceneLogic()
    (this=0x55555cdf5570) at engines/gnap/scenes/scenecore.cpp:423
#10 0x0000555556ab4285 in Gnap::GnapEngine::mainLoop() (this=0x55555cdf5570)
    at engines/gnap/gnap.cpp:811
#11 0x0000555556ab1eec in Gnap::GnapEngine::run() (this=0x55555cdf5570)
    at engines/gnap/gnap.cpp:260
#12 0x0000555555d74d97 in runGame(Plugin const*, Plugin const*, OSystem&, Common::String const&)
    (plugin=0x55555ba0fd70, enginePlugin=0x55555b8a5d70, system=..., debugLevels=...) at base/main.cpp:309
#13 0x0000555555d764e8 in scummvm_main(int, char const* const*)
    (argc=1, argv=0x7fffffffe648) at base/main.cpp:608
#14 0x0000555555d723b9 in main(int, char**) (argc=1, argv=0x7fffffffe648)
    at backends/platform/sdl/posix/posix-main.cpp:45

The surface it's using as the source image is completely blank:

(gdb) print *surface
$17 = {w = 0, h = 0, pitch = 0, pixels = 0x0, format = {
    bytesPerPixel = 0 '\000', rLoss = 0 '\000', gLoss = 0 '\000', 
    bLoss = 0 '\000', aLoss = 0 '\000', rShift = 0 '\000', gShift = 0 '\000', 
    bShift = 0 '\000', aShift = 0 '\000'}}

At this point, it had apparently drawn the inventory. I'm not sure what it was trying to draw next.

I hope this provides a clue to someone.

Change History (5)

comment:1 by eriktorbjorn, 13 months ago

Component: --Unset--Engine: GNAP

comment:2 by sev-, 11 months ago

Priority: normalhigh

This would be nice to get fixed before the release.

comment:3 by sev-, 10 months ago

:( I cannot reproduce. I tried a zillion of things, was clicking the menu button wildly and repeatedly, not crashes or Address Sanitizer complaints...

comment:4 by eriktorbjorn, 10 months ago

At the moment, I can't seem to reproduce it either. Maybe there was some miscompile on my part (that seems to happen very occasionally, but can then be fixed by a clean recompile)? I don't know.

comment:5 by sev-, 10 months ago

Owner: set to sev-
Resolution: worksforme
Status: newclosed

Okay, closing it then. If somebody ever able to reproduce it, we will wait for another bugreport.

Note: See TracTickets for help on using tickets.