Opened 14 years ago

Closed 14 years ago

Last modified 12 months ago

#2005 closed defect (fixed)

GOB1: Occasional crash when loading level

Reported by: eriktorbjorn Owned by: eriktorbjorn
Priority: normal Component: Engine: Gob
Keywords: Cc:
Game: Gobliiins

Description

I know it's not really supported yet, but I don't know
if I'll be able to capture this in a debugger again so...

Latest ScummVM CVS snapshot
Gobliiins 1 CD

Sometimes - quite rarely - when going to a new level
ScummVM crashes. Today I finally managed to catch it in
GDB. At the time, I had compiled ScummVM with Electric
Fence, but I don't think that affects the test
negatively. Here's the backtrace:

#0 Gob::game_loadExtData (itemId=-29998,
pResWidth=0x0, pResHeight=0x0)
at gob/game.cpp:107
#1 0x08202f76 in Gob::scen_loadStatic (search=-8 'ř')
at gob/scenery.cpp:136
#2 0x081fcf40 in Gob::inter_drawOperations () at
gob/inter.cpp:400
#3 0x081fe41d in Gob::inter_funcBlock (retFlag=2) at
gob/inter.cpp:1292
#4 0x081fe729 in Gob::inter_callSub (retFlag=2) at
gob/inter.cpp:1524
#5 0x081fe22e in Gob::inter_funcBlock (retFlag=2) at
gob/inter.cpp:1180
#6 0x081fe729 in Gob::inter_callSub (retFlag=2) at
gob/inter.cpp:1524
#7 0x081fc502 in Gob::game_playTot (skipPlay=16) at
gob/game.cpp:1863
#8 0x081fc6f0 in Gob::game_start () at gob/game.cpp:1931
#9 0x081f423e in Gob::init_initGame (totName=0x0) at
gob/init.cpp:283
#10 0x081f39e0 in Gob::GobEngine::go (this=0x41695fd8)
at gob/gob.cpp:139
#11 0x080597e4 in runGame (detector=@0xbffffaa0,
system=@0x416b1bb8)
at base/main.cpp:277
#12 0x08059db6 in main (argc=2, argv=0xbffffb54) at
base/main.cpp:414

(I had to set EF_ALLOW_MALLOC_0 to run it with Electric
Fence, but I don't know whether or not that's a bug.
For reference, it's because mult_palFadeKeysCount can
be 0 in mult_loadMult().)

During an earlier attempt, I also caught the crash
happening in Valgrind. It looks like it's the same error:

==23541==
==23541== Invalid read of size 4
==23541== at 0x81F9264: Gob::game_loadExtData(short,
short*, short*) (game.cpp:107)
==23541== by 0x8202F75: Gob::scen_loadStatic(char)
(scenery.cpp:136)
==23541== by 0x81FCF3F: Gob::inter_drawOperations()
(inter.cpp:400)
==23541== by 0x81FE41C: Gob::inter_funcBlock(short)
(inter.cpp:1292)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FE22D: Gob::inter_funcBlock(short)
(inter.cpp:1180)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FC501: Gob::game_playTot(short)
(game.cpp:1863)
==23541== by 0x81FC6EF: Gob::game_start()
(game.cpp:1931)
==23541== by 0x81F423D: Gob::init_initGame(char*)
(init.cpp:283)
==23541== by 0x81F39DF: Gob::GobEngine::go()
(gob.cpp:139)
==23541== by 0x80597D3: runGame(GameDetector&,
OSystem&) (main.cpp:277)
==23541== Address 0x1C3B6D3F is 16311 bytes inside a
block of size 22117 free'd
==23541== at 0x1B904B04: free (vg_replace_malloc.c:152)
==23541== by 0x81F7CD8:
Gob::draw_spriteOperation(short) (draw.cpp:396)
==23541== by 0x8203252:
Gob::scen_renderStatic(short, short) (scenery.cpp:240)
==23541== by 0x8203399:
Gob::scen_interRenderStatic() (scenery.cpp:279)
==23541== by 0x81FCF5A: Gob::inter_drawOperations()
(inter.cpp:408)
==23541== by 0x81FE41C: Gob::inter_funcBlock(short)
(inter.cpp:1292)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FE22D: Gob::inter_funcBlock(short)
(inter.cpp:1180)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FC501: Gob::game_playTot(short)
(game.cpp:1863)
==23541== by 0x81FC6EF: Gob::game_start()
(game.cpp:1931)
==23541== by 0x81F423D: Gob::init_initGame(char*)
(init.cpp:283)
==23541==
==23541== Invalid read of size 2
==23541== at 0x81F9269: Gob::game_loadExtData(short,
short*, short*) (game.cpp:108)
==23541== by 0x8202F75: Gob::scen_loadStatic(char)
(scenery.cpp:136)
==23541== by 0x81FCF3F: Gob::inter_drawOperations()
(inter.cpp:400)
==23541== by 0x81FE41C: Gob::inter_funcBlock(short)
(inter.cpp:1292)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FE22D: Gob::inter_funcBlock(short)
(inter.cpp:1180)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FC501: Gob::game_playTot(short)
(game.cpp:1863)
==23541== by 0x81FC6EF: Gob::game_start()
(game.cpp:1931)
==23541== by 0x81F423D: Gob::init_initGame(char*)
(init.cpp:283)
==23541== by 0x81F39DF: Gob::GobEngine::go()
(gob.cpp:139)
==23541== by 0x80597D3: runGame(GameDetector&,
OSystem&) (main.cpp:277)
==23541== Address 0x1C3B6D43 is 16315 bytes inside a
block of size 22117 free'd
==23541== at 0x1B904B04: free (vg_replace_malloc.c:152)
==23541== by 0x81F7CD8:
Gob::draw_spriteOperation(short) (draw.cpp:396)
==23541== by 0x8203252:
Gob::scen_renderStatic(short, short) (scenery.cpp:240)
==23541== by 0x8203399:
Gob::scen_interRenderStatic() (scenery.cpp:279)
==23541== by 0x81FCF5A: Gob::inter_drawOperations()
(inter.cpp:408)
==23541== by 0x81FE41C: Gob::inter_funcBlock(short)
(inter.cpp:1292)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FE22D: Gob::inter_funcBlock(short)
(inter.cpp:1180)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FC501: Gob::game_playTot(short)
(game.cpp:1863)
==23541== by 0x81FC6EF: Gob::game_start()
(game.cpp:1931)
==23541== by 0x81F423D: Gob::init_initGame(char*)
(init.cpp:283)
==23541==
==23541== Invalid read of size 2
==23541== at 0x81F926D: Gob::game_loadExtData(short,
short*, short*) (game.cpp:109)
==23541== by 0x8202F75: Gob::scen_loadStatic(char)
(scenery.cpp:136)
==23541== by 0x81FCF3F: Gob::inter_drawOperations()
(inter.cpp:400)
==23541== by 0x81FE41C: Gob::inter_funcBlock(short)
(inter.cpp:1292)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FE22D: Gob::inter_funcBlock(short)
(inter.cpp:1180)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FC501: Gob::game_playTot(short)
(game.cpp:1863)
==23541== by 0x81FC6EF: Gob::game_start()
(game.cpp:1931)
==23541== by 0x81F423D: Gob::init_initGame(char*)
(init.cpp:283)
==23541== by 0x81F39DF: Gob::GobEngine::go()
(gob.cpp:139)
==23541== by 0x80597D3: runGame(GameDetector&,
OSystem&) (main.cpp:277)
==23541== Address 0x1C3B6D45 is 16317 bytes inside a
block of size 22117 free'd
==23541== at 0x1B904B04: free (vg_replace_malloc.c:152)
==23541== by 0x81F7CD8:
Gob::draw_spriteOperation(short) (draw.cpp:396)
==23541== by 0x8203252:
Gob::scen_renderStatic(short, short) (scenery.cpp:240)
==23541== by 0x8203399:
Gob::scen_interRenderStatic() (scenery.cpp:279)
==23541== by 0x81FCF5A: Gob::inter_drawOperations()
(inter.cpp:408)
==23541== by 0x81FE41C: Gob::inter_funcBlock(short)
(inter.cpp:1292)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FE22D: Gob::inter_funcBlock(short)
(inter.cpp:1180)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FC501: Gob::game_playTot(short)
(game.cpp:1863)
==23541== by 0x81FC6EF: Gob::game_start()
(game.cpp:1931)
==23541== by 0x81F423D: Gob::init_initGame(char*)
(init.cpp:283)
==23541==
==23541== Invalid read of size 2
==23541== at 0x81F92D6: Gob::game_loadExtData(short,
short*, short*) (game.cpp:122)
==23541== by 0x8202F75: Gob::scen_loadStatic(char)
(scenery.cpp:136)
==23541== by 0x81FCF3F: Gob::inter_drawOperations()
(inter.cpp:400)
==23541== by 0x81FE41C: Gob::inter_funcBlock(short)
(inter.cpp:1292)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FE22D: Gob::inter_funcBlock(short)
(inter.cpp:1180)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FC501: Gob::game_playTot(short)
(game.cpp:1863)
==23541== by 0x81FC6EF: Gob::game_start()
(game.cpp:1931)
==23541== by 0x81F423D: Gob::init_initGame(char*)
(init.cpp:283)
==23541== by 0x81F39DF: Gob::GobEngine::go()
(gob.cpp:139)
==23541== by 0x80597D3: runGame(GameDetector&,
OSystem&) (main.cpp:277)
==23541== Address 0x1C3B6D47 is 16319 bytes inside a
block of size 22117 free'd
==23541== at 0x1B904B04: free (vg_replace_malloc.c:152)
==23541== by 0x81F7CD8:
Gob::draw_spriteOperation(short) (draw.cpp:396)
==23541== by 0x8203252:
Gob::scen_renderStatic(short, short) (scenery.cpp:240)
==23541== by 0x8203399:
Gob::scen_interRenderStatic() (scenery.cpp:279)
==23541== by 0x81FCF5A: Gob::inter_drawOperations()
(inter.cpp:408)
==23541== by 0x81FE41C: Gob::inter_funcBlock(short)
(inter.cpp:1292)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FE22D: Gob::inter_funcBlock(short)
(inter.cpp:1180)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FC501: Gob::game_playTot(short)
(game.cpp:1863)
==23541== by 0x81FC6EF: Gob::game_start()
(game.cpp:1931)
==23541== by 0x81F423D: Gob::init_initGame(char*)
(init.cpp:283)
==23541==
==23541== Invalid read of size 4
==23541== at 0x81F723F: Gob::data_seekData(short,
int, short) (dataio.cpp:317)
==23541== by 0x81F93BB: Gob::game_loadExtData(short,
short*, short*) (game.cpp:139)
==23541== by 0x8202F75: Gob::scen_loadStatic(char)
(scenery.cpp:136)
==23541== by 0x81FCF3F: Gob::inter_drawOperations()
(inter.cpp:400)
==23541== by 0x81FE41C: Gob::inter_funcBlock(short)
(inter.cpp:1292)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FE22D: Gob::inter_funcBlock(short)
(inter.cpp:1180)
==23541== by 0x81FE728: Gob::inter_callSub(short)
(inter.cpp:1524)
==23541== by 0x81FC501: Gob::game_playTot(short)
(game.cpp:1863)
==23541== by 0x81FC6EF: Gob::game_start()
(game.cpp:1931)
==23541== by 0x81F423D: Gob::init_initGame(char*)
(init.cpp:283)
==23541== by 0x81F39DF: Gob::GobEngine::go()
(gob.cpp:139)
==23541== Address 0x7C is not stack'd, malloc'd or
(recently) free'd
Fatal signal: Segmentation Fault (SDL Parachute Deployed)

Ticket imported from: #1188910. Ticket imported from: bugs/2005.

Change History (5)

comment:1 by SF/megath, 14 years ago

since scummvm started to support gob - I have following crash.
note dest == NULL in backtrace.

0x081f56ba in Gob::vid_spriteUncompressor (sprBuf=0x84a3292
"\0240\020\b$\f\b\030\b\004", srcWidth=11, srcHeight=2823,
x=22, y=22, transp=1, destDesc=0x0)
at gob/video.cpp:439
439 if ((destDesc->vidMode & 0x7f) != 0x13)
(gdb) bt
#0 0x081f56ba in Gob::vid_spriteUncompressor
(sprBuf=0x84a3292 "\0240\020\b$\f\b\030\b\004", srcWidth=11,
srcHeight=2823, x=22, y=22, transp=1,
destDesc=0x0) at gob/video.cpp:439
#1 0x081f5285 in Gob::vid_drawPackedSprite
(sprBuf=0x84a3292 "\0240\020\b$\f\b\030\b\004", width=11,
height=2823, x=22, y=22, transp=1, dest=0x0)
at gob/video.cpp:306
#2 0x081f7802 in Gob::draw_spriteOperation
(operation=12502) at gob/draw.cpp:415
#3 0x081fd663 in Gob::inter_loadSpriteToPos () at
gob/inter.cpp:877
#4 0x081fde4a in Gob::inter_funcBlock (retFlag=2) at
gob/inter.cpp:1256
#5 0x081fe1b9 in Gob::inter_callSub (retFlag=2) at
gob/inter.cpp:1524
#6 0x081fbf92 in Gob::game_playTot (skipPlay=43) at
gob/game.cpp:1863
#7 0x081fc180 in Gob::game_start () at gob/game.cpp:1931
#8 0x081f3cce in Gob::init_initGame (totName=0x0) at
gob/init.cpp:283
#9 0x081f3470 in Gob::GobEngine::go (this=0x844d038) at
gob/gob.cpp:139
#10 0x08059744 in runGame (detector=@0xbffff7d0,
system=@0x843a220) at base/main.cpp:277
#11 0x08059d16 in main (argc=1, argv=0xbffff8b4) at
base/main.cpp:414

comment:2 by sev-, 14 years ago

(a) Don't post 2 bugreports on same tracker
(b) Always provide game version
(c) Provide steps to reproduce the bug
(d) ScummVM doesn't have Gob listed on compatibilty page
sence they're not supported
(e) Because of (d) you have no way to provide (b) at the
moment as we haven't written any detection and don't
distinguish different flavors of the game

comment:3 by eriktorbjorn, 14 years ago

Owner: set to eriktorbjorn
Resolution: fixed
Status: newclosed

comment:4 by eriktorbjorn, 14 years ago

I've committed a fix which I believe fixes the crash that I
reported. I have no idea about megath's, but that looks like
it could be a different bug, in which case it should have
its own bug report.

comment:5 by digitall, 12 months ago

Component: Engine: Gob
Game: Gobliiins
Note: See TracTickets for help on using tickets.