Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#4730 closed defect (outdated)

BASS: core dump on OpenBSD PowerPC

Reported by: SF/dawedawe Owned by: fingolfin
Priority: normal Component: Engine: Sky
Version: Keywords:
Cc: Game: Beneath a Steel Sky


On openbsd powerpc BASS causes a segmentation fault right after the intro.

scummvm -v ScummVM 1.0.0 (Nov 18 2009 23:18:40) Features compiled in: Vorbis FLAC MP3 zLib


Here's the backtrace: (gdb) backtrace #0 0x01d8780c in Sky::Debug::script (command=0, scriptData=0x2d00203c) at endian.h:137 #1 0x01d8d480 in Sky::Logic::script (this=0x2b144800, scriptNo=22348, offset=1) at engines/sky/logic.cpp:1267 #2 0x01d8be40 in Sky::Logic::logicScript (this=0x2b144800) at engines/sky/logic.cpp:193 #3 0x01d8bd5c in Sky::Logic::engine (this=0x2b144800) at engines/sky/logic.cpp:160 #4 0x01d7a208 in Sky::SkyEngine::go (this=0x24525f00) at engines/sky/sky.cpp:207 #5 0x01d7a208 in Sky::SkyEngine::go (this=0x24525f00) at engines/sky/sky.cpp:207 #6 0x01d7a208 in Sky::SkyEngine::go (this=0x24525f00) at engines/sky/sky.cpp:207 #7 0x01d7a208 in Sky::SkyEngine::go (this=0x24525f00) at engines/sky/sky.cpp:207 #8 0x01d7a208 in Sky::SkyEngine::go (this=0x24525f00) at engines/sky/sky.cpp:207 #9 0x01d7a208 in Sky::SkyEngine::go (this=0x24525f00) at engines/sky/sky.cpp:207 Previous frame inner to this frame (corrupt stack?)

Ticket imported from: #2918827. Ticket imported from: bugs/4730.

Change History (10)

comment:1 by fingolfin, 14 years ago

Please clarify: Is this a big endian PowerPC processor & motherboard combo? (Most are, but not all.).

comment:2 by fingolfin, 14 years ago

Summary: core dump on openbsd powerpcBASS:: core dump on OpenBSD PowerPC

comment:3 by fingolfin, 14 years ago

Furthermore, could you please tell us what the output of "configure" is for you, most importantly, the bits regarding "endianess" and "alignment".

You could try hacking the configure script by changing line 140 from _need_memalign=no to _need_memalign=yes then run ./configure && make clean && make and try again. Does that change anything?

comment:4 by fingolfin, 14 years ago

Owner: set to fingolfin
Summary: BASS:: core dump on OpenBSD PowerPCBASS: core dump on OpenBSD PowerPC

comment:5 by SF/dawedawe, 14 years ago

Yes, it's a big endian machine.

Here's the output of configure (without any changes) $ ./configure
Running ScummVM configure... Looking for C++ compiler... g++ Checking for compiler version... 3.3.5, ok Checking endianness... big Type with 1 byte... char Type with 2 bytes... short Type with 4 bytes... int Compiling for x86... no Checking hosttype... openbsd4.6 Alignment required... no Checking whether building plugins was requested... no Checking for Ogg Vorbis... no Checking for Tremor... no Checking for FLAC >= 1.0.1... no Checking for MAD... no Checking for ALSA >= 0.9... no Checking for zlib... yes Checking for libmpeg2 >= 0.3.2... no Checking for libfluidsynth... no Backend... sdl, HQ scalers, MT-32 emu, Indeo3 decoder Looking for sdl-config... /usr/local/bin/sdl-config

Engines (builtin): SCUMM [all games] AGI AGOS [AGOS 2 games] Cinematique evo 1 Cinematique evo 2 Drascula: The Vampire Strikes Back Gobli*ns Groovie Legend of Kyrandia Lure of the Temptress MADE Parallaction Flight of the Amazon Queen SAGA [ITE] [IHNM] Beneath a Steel Sky Broken Sword 1 Broken Sword 2 Tinsel Touche: The Adventures of the Fifth Musketeer Bud Tucker in Double Trouble

Engines Skipped: AGOS [Personal Nightmare] Igor: Objective Uikokahonia Legend of Kyrandia [Lands of Lore] M4/MADS SAGA [SAGA 2 games] SCI [SCI32 games]

Creating config.h Creating

I'm running a build with a hacked up configure script right now. It's a pretty old machine, so that will take a while...

comment:6 by SF/dawedawe, 14 years ago

Unfortunately forcing memory alignment doesn't change anything. The segmentation fault still happens. Note: I had to edit the line 1486 of the configure script to change the output. Changing the default settings doesn't seem to be enough.

comment:7 by fingolfin, 14 years ago

Indeed, you have to change line 1486, too, I overlooked that -- great that you caught this :-). Just to double check: You did recompile the relevant files after that change, right (I am pretty sure you did, just want to have it on record).

I suggested alignment issues because it seems to be crashing in READ_LE_UINT16, which typically would suggest alignment issues. But of course other cause are possible.

Is the "scriptData" address (0x2d00203c in your backtrace above) a valid address? I.e. can you peek at it and tell us what the 16 bit word there reads? Opcode ("command") 0 is "push_variable", by the way.

Could you maybe try building our latest trunk version? It changed the endian conversion code considerably. I doubt that it'll have any effect, though, but it might be worth a try.

comment:8 by SF/dawedawe, 14 years ago

Well trunk of today seems to have fixed it. I just did a fresh build (without alignment) and I can't reproduce the seg fault.

For the record: Yes, I did a clean build after the confiure change. x/xw of the scriptData address gives me 0x08780002. I'm not sure, if this is what you had in mind, I should try.

comment:9 by fingolfin, 14 years ago

Weird story! Anyway, if everything works fine now for you, I guess we can close this. Should you ever have troubles again, you know where to find us ;).

comment:10 by fingolfin, 14 years ago

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