Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#366 x-com tac crash in FPU_FSCALE with core=auto

open
nobody
None
5
2012-09-07
2011-09-19
Slava
No

X-Com Apocalypse crashes in tactical combat on first enemy encounter:

...
DOSBox switched to max cycles, because of the setting: cycles=auto. If the game runs too fast try a fixed cycles amount in DOSBox's options.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff62eafd4 in ?? () from /lib/x86_64-linux-gnu/libm.so.6
(gdb) bt

0 0x00007ffff62eafd4 in ?? () from /lib/x86_64-linux-gnu/libm.so.6

1 0x00000000004c0eab in FPU_FSCALE () at core_dynrec/../../fpu/fpu_instructions.h:461

2 0x00007fffee8dcb2b in ?? ()

3 0x00007fffee1ab043 in ?? ()

4 0x00007fffffffbc71 in ?? ()

5 0x00000000004d9003 in CPU_Core_Dynrec_Run () at core_dynrec.cpp:233

6 0x000000000040759c in Normal_Loop () at dosbox.cpp:132

7 0x00000000004079c9 in DOSBOX_RunMachine () at dosbox.cpp:244

8 0x000000000040df31 in CALLBACK_RunRealInt (intnum=33 '!') at callback.cpp:106

9 0x000000000071a032 in DOS_Shell::Execute (this=0x38b57d0, name=0x7fffffffbd90 "XCOMAPOC.EXE", args=0x7fffffffce8c "") at shell_misc.cpp:492

10 0x00000000007118f9 in DOS_Shell::DoCommand (this=0x38b57d0, line=0x7fffffffce8c "") at shell_cmds.cpp:153

11 0x000000000070eb47 in DOS_Shell::ParseLine (this=0x38b57d0, line=0x7fffffffce80 "XCOMAPOC.EXE") at shell.cpp:251

12 0x000000000070f015 in DOS_Shell::Run (this=0x38b57d0) at shell.cpp:323

13 0x000000000070fc3a in SHELL_Init () at shell.cpp:653

14 0x0000000000708d20 in Config::StartUp (this=0x7fffffffe010) at setup.cpp:853

15 0x000000000056f71c in main (argc=2, argv=0x7fffffffe1c8) at sdlmain.cpp:1868

(gdb) up

1 0x00000000004c0eab in FPU_FSCALE () at core_dynrec/../../fpu/fpu_instructions.h:461

461 fpu.regs[TOP].d *= pow(2.0,static_cast<Real64>(static_cast<Bit64s>(fpu.regs[STV(1)].d)));
(gdb) p fpu.regs
$1 = {{d = 0, l = {lower = 0, upper = 0}, ll = 0}, {d = 0, l = {lower = 0, upper = 0}, ll = 0}, {d = 0, l = {lower = 0, upper = 0}, ll = 0}, {d = 0,
l = {lower = 0, upper = 0}, ll = 0}, {d = 1, l = {lower = 0, upper = 1072693248}, ll = 4607182418800017408}, {d = -0.44832597645826888, l = {
lower = 1874164054, upper = -1076055713}, ll = -4621624094134797994}, {d = 0.55167402354173112, l = {lower = 1210401621, upper = 1071753040},
ll = 4603144257398981461}, {d = -2428.8581120444323, l = {lower = 1517698632, upper = -1063061065}, ll = -4565812506308231608}, {d = 0.5, l = {
lower = 0, upper = 1071644672}, ll = 4602678819172646912}}
(gdb) p fpu.top
$2 = 6
(gdb) p fpu.regs[7].d
$3 = -2428.8581120444323

Dosbox release 0.74.
System:
Linux slavka-Satellite-P200 2.6.38-11-generic #48-Ubuntu SMP Fri Jul 29 19:02:55 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
Default dosbox config.

If I switch in config to
core=normal
cycles=fixed 14000
the error does not occur.

If you need more information, I gladly provide :)

Discussion