Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#2441 closed defect (fixed)

GOB1: 64-bit crash at load screen

Reported by: SF/mnbv Owned by: sev-
Priority: high Component: Engine: Gob
Keywords: Cc:
Game: Gobliiins

Description

ScummVM 0.9.0CVS (Jan 8 2006 18:29:11) Features compiled in: Vorbis FLAC MP3 ALSA zLib MPEG2

Every time I get past the intro animation and the title screen and get onto the game loading screen the game crashes.

If I run scummvm from the commandline and follow the same steps I get the following output when the game crashes :

Trying to start game 'Gobliiins' WARNING: STUB: Video::initDriver! WARNING: inter_palLoad: cmd == 49 is not supported! WARNING: inter_palLoad: cmd == 49 is not supported! WARNING: inter_palLoad: cmd == 49 is not supported! WARNING: inter_palLoad: cmd == 49 is not supported! WARNING: inter_palLoad: cmd == 49 is not supported! WARNING: inter_palLoad: cmd == 49 is not supported! WARNING: inter_palLoad: cmd == 49 is not supported! WARNING: inter_palLoad: cmd == 49 is not supported! WARNING: inter_palLoad: cmd == 49 is not supported! WARNING: inter_palLoad: cmd == 49 is not supported! Fatal signal: Segmentation Fault (SDL Parachute Deployed)

sometimes I also get this line at the end: *** glibc detected *** double free or corruption (out): 0x0000000000ac22a0 ***

I'm using English Gobliiins (DOS VGA) (floppy I think)

I'm using debian/unstable (amd64) with gcc 4.0.2

Ticket imported from: #1399873. Ticket imported from: bugs/2441.

Attachments (1)

gob.jpg (33.0 KB ) - added by SF/mnbv 15 years ago.
screenshot of last thing seen before crash

Download all attachments as: .zip

Change History (20)

comment:1 by sev-, 15 years ago

Owner: set to sev-
Summary: Crashes at load screenGOB1: C64 crashes at load screen

comment:2 by sev-, 15 years ago

Please, tell me what you see on the screen right before crash, or better provide a screenshot near that moment

Please, run:

./scummvm --disable-sdl-parachute

wait until it crashes and core dump is created (make sure you run in Window, not a fullscreen)

gdb scummvm scummvm.core

at gdb prompt type in

bt

that will give you backtrace. If you will see nothing like "Scumm::GobEngine::blah", and just SDL stuff, try to switch thread with "thread XX" command where XX is number of a thread.

Then attach here that backtrace output.

comment:3 by sev-, 15 years ago

Please, tell me what you see on the screen right before crash, or better provide a screenshot near that moment

Please, run:

./scummvm --disable-sdl-parachute

wait until it crashes and core dump is created (make sure you run in Window, not a fullscreen)

gdb scummvm scummvm.core

at gdb prompt type in

bt

that will give you backtrace. If you will see nothing like "Scumm::GobEngine::blah", and just SDL stuff, try to switch thread with "thread XX" command where XX is number of a thread.

Then attach here that backtrace output.

comment:4 by sev-, 15 years ago

Summary: GOB1: C64 crashes at load screenGOB1: 64-bit crash at load screen

comment:5 by SF/mnbv, 15 years ago

This is a screen shot of the last thing I see before the crash. I'll add the other info you asked for in a short while.

by SF/mnbv, 15 years ago

Attachment: gob.jpg added

screenshot of last thing seen before crash

comment:6 by SF/mnbv, 15 years ago

I'm not seeing a scummvm.core file being created, is it maybe because I used "make deb" to build a debian package?

comment:7 by sev-, 15 years ago

Do you run with that command line parameter? That's essential. Otherwise SDL parachute will prevent it from dumping the core.

comment:8 by SF/mnbv, 15 years ago

Yes, I'm using the command line parameter. I'm getting a segfault now but still no scummvm.core

comment:9 by sev-, 15 years ago

then please, try to run it directly from gdb

gdb scummvm

run --disable-sdl-parachute gob

it will crash and return back to gdb, so do 'bt' then

comment:10 by SF/mnbv, 15 years ago

ok, that did the trick. Here's the trace: #0 0x00000000005f965a in Gob::Map::loadMapObjects (this=0xa23490, avjFile=0xb17590 "") at gob/map.cpp:594 #1 0x00000000005f0679 in Gob::Goblin::loadObjects (this=0xa23110, source=0xabdfec "AVT003.AVJ") at gob/goblin.cpp:1903 #2 0x00000000005f3b78 in Gob::Goblin::interFunc (this=0xa23110) at gob/goblin.cpp:3080 #3 0x00000000005f79dc in Gob::Inter_v1::o1_func (this=<value optimized out>, cmdCount=@0x0, counter=@0xb157d0, retFlag=@0x4a01) at gob/inter_v1.cpp:1552 #4 0x00000000005f77a1 in Gob::Inter_v1::executeFuncOpcode (this=0x9bbe50, i=2 '\002', j=5 '\005', cmdCount=@0x7fffffdfe4c7, counter=@0x7fffffdfe4c4, retFlag=@0x7fffffdfe4b4) at gob/inter_v1.cpp:1426 #5 0x00000000005f4f93 in Gob::Inter::funcBlock (this=0x9bbe50, retFlag=2) at gob/inter.cpp:160 #6 0x00000000005f512b in Gob::Inter::callSub (this=0x9bbe50, retFlag=2) at gob/inter.cpp:263 #7 0x00000000005f7d84 in Gob::Inter_v1::o1_callSub (this=0x9bbe50, cmdCount=<value optimized out>, counter=<value optimized out>, retFlag=@0x20) at gob/inter_v1.cpp:1449 #8 0x00000000005f77a1 in Gob::Inter_v1::executeFuncOpcode (this=0x9bbe50, i=0 '\0', j=0 '\0', cmdCount=@0x7fffffdfe597, counter=@0x7fffffdfe594, retFlag=@0x7fffffdfe584) at gob/inter_v1.cpp:1426 #9 0x00000000005f4f93 in Gob::Inter::funcBlock (this=0x9bbe50, retFlag=2) at gob/inter.cpp:160 #10 0x00000000005f512b in Gob::Inter::callSub (this=0x9bbe50, retFlag=2) at gob/inter.cpp:263 #11 0x000000000060a373 in Gob::Game::playTot (this=0xa21790, skipPlay=<value optimized out>) at gob/game.cpp:1869 #12 0x000000000060a5d7 in Gob::Game::start (this=0xa21790) at gob/game.cpp:1932 #13 0x00000000005f4a8e in Gob::Init::initGame (this=0x9bbd20, totName=0x0) at gob/init.cpp:254 #14 0x00000000005eae9d in Gob::GobEngine::go (this=<value optimized out>) at gob/gob.cpp:265 #15 0x0000000000411208 in main (argc=3, argv=<value optimized out>) at base/main.cpp:310

Shout out if you need me to check anything else.

comment:11 by eriktorbjorn, 15 years ago

It would probably be useful if someone with a faster computer than mine could run Gobliiins under Valgrind, because I got at least one warning about invalid reading before I gave up.

(It seems Video::setFullPalette() is called with palDesc->vgaPal == _vm->_global->_vgaPalette, which is a 16-colour palette, not 256-colour as the function assumes. That may be completely unrelated, though.)

comment:12 by fingolfin, 15 years ago

Priority: normalhigh

comment:13 by DrMcCoy, 15 years ago

mnbv, can you confirm whether that bug's still there in the latest CVS version?

comment:14 by SF/mnbv, 15 years ago

I'm still getting a crash during the loading screen, however if I do a backtrace using the steps mentioned in an earlier message I get nothing mentioning Gob::Goblin.

In thread 1 I this : #0 0x00000000005fa91a in ?? () #1 0x00000000005f25d9 in ?? () #2 0x00000000005f844f in ?? () #3 0x00000000005f6a63 in ?? () #4 0x00000000005f6e1b in ?? () #5 0x00000000005f6963 in ?? () #6 0x000000000060f8b3 in ?? () #7 0x000000000060fa4b in ?? () #8 0x00000000005f8e65 in ?? () #9 0x00000000005f6963 in ?? () #10 0x000000000060f8b3 in ?? () #11 0x000000000060fa4b in ?? () #12 0x000000000060b759 in ?? () #13 0x000000000060b9bd in ?? () #14 0x00000000005f4564 in ?? () #15 0x00000000005ecafd in ?? () #16 0x0000000000411208 in ?? () #17 0x00002aaaabcb34ca in __libc_start_main () from /lib/libc.so.6 #18 0x0000000000404bda in ?? () #19 0x00007fffff8c1e88 in ?? () #20 0x00002aaaaabc29c0 in ?? () from /lib64/ld-linux-x86-64.so.2 #21 0x0000000000000003 in ?? () #22 0x00007fffff8c298d in ?? () #23 0x00007fffff8c29a0 in ?? () #24 0x00007fffff8c29b8 in ?? () #25 0x0000000000000000 in ?? ()

which I don't think helps at all. In thread 2 I get: #0 0x00002aaaabd5b7b6 in select () from /lib/libc.so.6 #1 0x00002aaaab5b58ab in SDL_Delay () from /usr/lib/libSDL-1.2.so.0 #2 0x00002aaaab5b58fd in SDL_Delay () from /usr/lib/libSDL-1.2.so.0 #3 0x00002aaaab5b4887 in SDL_RunThread () from /usr/lib/libSDL-1.2.so.0 #4 0x00002aaaab5b4b59 in SDL_KillThread () from /usr/lib/libSDL-1.2.so.0 #5 0x00002aaaab6f7b1c in start_thread () from /lib/libpthread.so.0 #6 0x00002aaaabd62c22 in clone () from /lib/libc.so.6 #7 0x0000000000000000 in ?? ()

and in thread 3 I get: #0 0x00002aaaabd59870 in poll () from /lib/libc.so.6 #1 0x00002aaaab1a3ee7 in snd_pcm_wait_nocheck () from /usr/lib/libasound.so.2 #2 0x00002aaaab1a8838 in snd_pcm_write_areas () from /usr/lib/libasound.so.2 #3 0x00002aaaab1c0df2 in snd_pcm_mmap_writei () from /usr/lib/libasound.so.2 #4 0x00002aaaab576537 in SDL_FreeWAV () from /usr/lib/libSDL-1.2.so.0 #5 0x00002aaaab571f25 in SDL_RunAudio () from /usr/lib/libSDL-1.2.so.0 #6 0x00002aaaab5b4887 in SDL_RunThread () from /usr/lib/libSDL-1.2.so.0 #7 0x00002aaaab5b4b59 in SDL_KillThread () from /usr/lib/libSDL-1.2.so.0 #8 0x00002aaaab6f7b1c in start_thread () from /lib/libpthread.so.0 #9 0x00002aaaabd62c22 in clone () from /lib/libc.so.6 #10 0x0000000000000000 in ?? ()

I don't know if any of that will help.

comment:15 by DrMcCoy, 15 years ago

Did you compile ScummVM without debug informations this time? The stuff in thread 2 and 3 are SDL and libasound specific, so the error's either there or in thread 1, which itself is either also out of ScummVM's scope or missing debug informations... Do other SLD applications (or other ScummVM engines) run without problems on your end?

comment:16 by SF/mnbv, 15 years ago

So sorry, I was running the version made with 'make deb' which seems to strip the debug symbols. I retried with a non-packaged version and got the same back trace as before.

That is : #0 0x00000000005fa91a in Gob::Map::loadMapObjects (this=0xa28b90, avjFile=0xb1cfd0 "") at gob/map.cpp:594 #1 0x00000000005f25d9 in Gob::Goblin::loadObjects (this=0xa28810, source=0xac3a2c "AVT003.AVJ") at gob/goblin.cpp:1904 #2 0x00000000005f844f in Gob::Inter_v1::o1_loadObjects (this=0x9c2020, extraData=@0x7fffffb9d66e, retVarPtr=<value optimized out>, objDesc=<value optimized out>) at gob/inter_v1.cpp:2375 #3 0x00000000005f6a63 in Gob::Inter_v1::executeGoblinOpcode (this=0x9c2020, i=1000, extraData=@0x7fffffb9d66e, retVarPtr=0xac394c, objDesc=0x0) at gob/inter_v1.cpp:1613 #4 0x00000000005f6e1b in Gob::Inter_v1::o1_goblinFunc (this=0x9c2020, cmdCount=<value optimized out>, counter=<value optimized out>, retFlag=<value optimized out>) at gob/inter_v1.cpp:1806 #5 0x00000000005f6963 in Gob::Inter_v1::executeFuncOpcode (this=0x9c2020, i=2 '\002', j=5 '\005', cmdCount=@0x7fffffb9d707, counter=@0x7fffffb9d704, retFlag=@0x7fffffb9d6f4) at gob/inter_v1.cpp:1591 #6 0x000000000060f8b3 in Gob::Inter::funcBlock (this=0x9c2020, retFlag=2) at gob/inter.cpp:161 #7 0x000000000060fa4b in Gob::Inter::callSub (this=0x9c2020, retFlag=2) at gob/inter.cpp:264 #8 0x00000000005f8e65 in Gob::Inter_v1::o1_callSub (this=0x9c2020, cmdCount=@0x7fffffb9d7f7, counter=@0x7fffffb9d7f4, retFlag=@0x7fffffb9d7e4) at gob/inter_v1.cpp:1655 #9 0x00000000005f6963 in Gob::Inter_v1::executeFuncOpcode (this=0x9c2020, i=0 '\0', j=0 '\0', cmdCount=@0x7fffffb9d7f7, counter=@0x7fffffb9d7f4, retFlag=@0x7fffffb9d7e4) at gob/inter_v1.cpp:1591 #10 0x000000000060f8b3 in Gob::Inter::funcBlock (this=0x9c2020, retFlag=2) at gob/inter.cpp:161 #11 0x000000000060fa4b in Gob::Inter::callSub (this=0x9c2020, retFlag=2) at gob/inter.cpp:264 #12 0x000000000060b759 in Gob::Game::playTot (this=0xa26e90, skipPlay=<value optimized out>) at gob/game.cpp:1873 #13 0x000000000060b9bd in Gob::Game::start (this=0xa26e90) at gob/game.cpp:1936 #14 0x00000000005f4564 in Gob::Init::initGame (this=0x9c1f60, totName=0x0) at gob/init.cpp:254 #15 0x00000000005ecafd in Gob::GobEngine::go (this=<value optimized out>) at gob/gob.cpp:277 #16 0x0000000000411208 in main (argc=3, argv=<value optimized out>) at base/main.cpp:310

comment:17 by wjp, 14 years ago

This patch should fix this particular segfault:

http://sourceforge.net/tracker/index.php?func=detail&aid=1416983&group_id=37116&atid=418822

It should make it possible to reach the first game screen on an amd64 machine. Haven't tested any further yet.

comment:18 by sev-, 14 years ago

yes, that works perfect. Fixed in CVS. Thanks a lot.

comment:19 by sev-, 14 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.