Opened 21 years ago

Closed 21 years ago

Last modified 6 years ago

#1400 closed defect (fixed)

ALL: Crash on 64Bit

Reported by: SF/dvandyk Owned by: SF/ender
Priority: low Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Indiana Jones 3

Description

ScummVM crashed with "Segmentation Fault" on amd64 architecture. Here my error log: (It does crash also with Indina Jones - Last Crusade. I don't have other supported games to test.)

bash-2.05b$ gdb scummvm GNU gdb 6.0 Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu"...Using host libthread_db libra ry "/lib/libthread_db.so.1".

(gdb) run Starting program: /usr/games/bin/scummvm [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 27536)] [New Thread 32769 (LWP 27539)] [New Thread 16386 (LWP 27540)] Looking for tentacle Trying to start game 'Day Of The Tentacle' [New Thread 32771 (LWP 27541)] 6e959d65358eedf9b68b81e304b97fa4 tentacle.000 Match found in database: target tentacle, language German, platform (null) Registered debugger WARNING: IMuse doCommand(6) - setMasterVolume (74)!

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 27536)] Scumm::CostumeRenderer::proc3() (this=0x1881c40) at scumm/costume.cpp:469 469 *dst = pcolor; (gdb) bt #0 Scumm::CostumeRenderer::proc3() (this=0x1881c40) at scumm/costume.cpp:469 #1 0x00000000004469b6 in Scumm::CostumeRenderer::mainRoutine(int, int) ( this=0x1881c40, xmoveCur=1, ymoveCur=26284721) at scumm/costume.cpp:287 #2 0x00000000004476c7 in Scumm::CostumeRenderer::drawLimb(Scumm::CostumeData co

nst&, int) (this=0x1881c40, cost=@0x1, limb=9) at scumm/costume.cpp:666 #3 0x000000000043fed7 in Scumm::BaseCostumeRenderer::drawCostume(Scumm::VirtScr

een const&, Scumm::CostumeData const&) (this=0x1881c40, vs=@0x1, cost=@0x18b1794) at scumm/base-costume.cpp:47 #4 0x000000000043c53b in Scumm::Actor::drawActorCostume() (this=0x18b1748) at scumm/actor.cpp:1015 #5 0x000000000043c2a6 in Scumm::ScummEngine::processActors() (this=0x18902f0) at scumm/actor.cpp:921 #6 0x0000000000416e90 in Scumm::ScummEngine::scummLoop(int) (this=0x186dc90, delta=21) at scumm/scummvm.cpp:1521 #7 0x0000000000415ff0 in Scumm::ScummEngine::mainRun() (this=0x186dc90) at scumm/scummvm.cpp:1258 #8 0x0000000000414cff in Scumm::ScummEngine::go() (this=0x186dc90) at scumm/scummvm.cpp:897 #9 0x000000000040d200 in runGame (detector=@0xbffff230, system=0x1826b10) at base/main.cpp:225 #10 0x000000000040d49a in main (argc=1, argv=0xbffff348) at base/main.cpp:313 (gdb) q The program is running. Exit anyway? (y or n) y bash-2.05b$

Ticket imported from: #880814. Ticket imported from: bugs/1400.

Change History (26)

comment:1 by fingolfin, 21 years ago

Status: newpending

comment:2 by fingolfin, 21 years ago

Summary: scummvm crashes on amd64ALL: Crash on AMD64

comment:3 by fingolfin, 21 years ago

To process your bug report appropriately, we need you to provide the following additional information:

* ScummVM version (PLEASE test the latest CVS/Daily build) * Bug details, including instructions on reproducing it * Language of game (English, German, ...) * Version of game (talkie, floppy, ...) * Platform and Compiler (Win32, Linux, MacOS, ...) * Attach a save game if possible * If this bug only occurred recently, please note the last version without the bug, and the first version including the bug. That way we can fix it quicker by looking at the changes made.

This should only take you a little time but will make it much easier for us to process your bug report in a way that satisfies both you and us.

Thank you for your support!

comment:4 by SF/dvandyk, 21 years ago

1. ScummVM Version is CVS Daily snapshot 20040120. 2. It crashes during the Introductory Scene of DOTT, short before both tentacles first enter the scene (ca 10 seconds after game start). If i press ESC to pass the cut-scene there is no segault. 3. Language is German. 4. CD Version 5. Platform is AMD Athlon 64 3200+ with Gentoo Linux 6. no save game neccessary, see 2 7. I tried scummvm first in version 0.51. This is bugged as well as
several CVS snapshots including the latest 20040120

comment:5 by SF/dvandyk, 21 years ago

Status: pendingnew

comment:6 by fingolfin, 21 years ago

Thanks!

ymoveCur=26284721 either is a bug a in the debugger, or hints at the bug in our code ;-)

comment:7 by fingolfin, 21 years ago

I am afraid w/o a AMD64 test machine, it's not really possible to debug this.

comment:8 by fingolfin, 21 years ago

Priority: normallow

comment:9 by SF/khalek, 21 years ago

Are you using ScummVM as a 32 or 64bit binary? And what additional options are you feeding gcc, try turning off optimisation for example.

comment:10 by SF/dvandyk, 21 years ago

dvandyk@phi dvandyk $ file /usr/games/bin/scummvm /usr/games/bin/scummvm: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), stripped

I compiled it though emerge on Gentoo Linux with "-02" as the only CFLAGS.

comment:11 by fingolfin, 21 years ago

Uhm, first thing to do when something you compiled yourself experiences crashes: do not compile it with optimization! I.e. get rid of that -O2. I have seen plenty of optimizer bugs in GCC over the years, and seeing more for the relatively new AMD64 arch wouldn't surprise me... even if it's not the cause, the fact that you used -O2 probably is the reason why the GDB output you pasted above is semi-garbage (read: useless).

Recompile w/o -O2; make sure -g is specified, though.

comment:12 by SF/dvandyk, 21 years ago

i did a plain ./configure && make and used the new scummvm, version 0.6.0. Now i can't use gdb on scummvm, it breaks off with:

dvandyk@phi dvandyk $ gdb scummvm GNU gdb 6.0 Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run Starting program: /usr/games/bin/scummvm Switched to configuration /home/dvandyk/.scummvmrc

Program received signal SIG32, Real-time event 32. 0x0000002a9602d08e in pthread_getconcurrency () from /lib/libpthread.so.0

The bug is still there... If you want to do tests on an amd64 machine, i could give you a useraccount. Please feel free to contact me via danny (dot) van (dot) dyk (at) gmx (dot) de

comment:13 by SF/khalek, 21 years ago

So do you have a biarch setup? Can you try using a 32bit binary with the relevant gcc option?

comment:14 by SF/dvandyk, 21 years ago

No, i don't have a biarch setup, so using the 32bit executable from your download page doesnt help (as well as building on myself), cause all my libraries are 64bit. :/

comment:15 by SF/duraid, 21 years ago

Hi there. I can confirm that this bug has existed since at least 0.5x and is not a bug in anything to do with AMD64, but is a bug in scummvm. For example, sam and max will crash early in the game (one minute's gameplay: go downstairs and walk left) on an Itanium system.

This is a scummvm LP64 cleanliness issue.

comment:16 by SF/ender, 21 years ago

Nowhere did we suggest it was a toolchain bug or processor bug. We know this is a ScummVM bug, but we simply have no 64-bit machines to test or fix on.

If you want to send me or another developer one, please do!

(Updating bug subject to reflect this has been reproduced on another 64-bit architecture)

comment:17 by SF/ender, 21 years ago

Summary: ALL: Crash on AMD64ALL: Crash on 64Bit

comment:18 by fingolfin, 21 years ago

Thanks to Christoph Reichenbach aka Jameson, the bug in the costume code has been fixed. Now it gets stuck in another place, but hey, we are improving :-)

comment:19 by fingolfin, 21 years ago

Actually, everything seems to work fine on the test machine (with an Alpha processor) - the second problem (ScummVM was get stuck in an endless loop) was because the machine was incorrectly detected by the configure script as *not* needing memory alignment; this appears to be not true in general...

So, could any of you please give latest CVS a try, and tell us how far you get. Thanks.

comment:20 by fingolfin, 21 years ago

Pending reply by bug submitter.

comment:21 by fingolfin, 21 years ago

Status: newpending

comment:22 by SF/ender, 21 years ago

Confirmed to be fixed (this particular issue anyway) by Duraid via e-mail.

Max, could you backport these to the 0.6 branch? That way the corrosponding Debian BTS can be closed when 0.6.1 is released & packaged.

comment:23 by SF/ender, 21 years ago

Resolution: fixed
Status: pendingclosed

comment:24 by SF/dvandyk, 21 years ago

Sorry that I am so late: It works superb here... I thank you very much. You guys do excelent work. Man am I glad to have scummvm back ;-)

comment:25 by Kirben, 15 years ago

Owner: set to SF/ender

comment:26 by digitall, 6 years ago

Component: --Unset--Engine: SCUMM
Game: Indiana Jones 3
Note: See TracTickets for help on using tickets.