ptitSeb / Serious-Engine

A port to the OpenPandora (and working fine on plain Linux) of the open source version of a game engine developed by Croteam for the classic Serious Sam games. Status: Working (for both FE and SE).
https://pyra-handheld.com/boards/threads/serious-sam-first-encounter.77225/
GNU General Public License v2.0
74 stars 22 forks source link

Illegal instruction core dumped #56

Open daemonspudguy opened 2 years ago

daemonspudguy commented 2 years ago

On Arch Linux, Gdb gave me this: Using host libthread_db library "/usr/lib/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction. _GLOBALsub_I_DepthCheck.cpp(void) () at /w/packages/packages/engines/serious-engine/source/Sources/Engine/Graphics/DepthCheck.cpp:293 293 in /__w/packages/packages/engines/serious-engine/source/Sources/Engine/Graphics/DepthCheck.cpp

hjri commented 2 years ago

same here on debian, when I build it myself i also get a SIGILL but in a different place

ptitSeb commented 2 years ago

I would need a gdb backtrace of the sigill, and a dump of the instructions around the sigill too

hjri commented 2 years ago

Two different builds - one is mine, other came from luxtorpeda

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
__static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /__w/packages/packages/engines/serious-engine/source/Sources/Engine/Models/Normals.cpp:278
278     /__w/packages/packages/engines/serious-engine/source/Sources/Engine/Models/Normals.cpp: No such file or directory.
(gdb) bt
#0  __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /__w/packages/packages/engines/serious-engine/source/Sources/Engine/Models/Normals.cpp:278
#1  _GLOBAL__sub_I_Normals.cpp(void) () at /__w/packages/packages/engines/serious-engine/source/Sources/Engine/Models/Normals.cpp:297
#2  0x00005555557a3ef5 in __libc_csu_init ()
#3  0x00007ffff785f78d in __libc_start_main (main=0x5555555ecf70 <main(int, char**)>, argc=1, argv=0x7fffffffe158, init=0x5555557a3eb0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe148) at ../csu/libc-start.c:279
#4  0x00005555555effda in _start ()
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff62d4640 (LWP 3105245)]
STUBBED: load window icon in /home/houka/Repos/apps/Serious-Engine/Sources/SeriousSam/MainWindow.cpp, line 168.
STUBBED: Need SDL invisible window or something in /home/houka/Repos/apps/Serious-Engine/Sources/SeriousSam/MainWindow.cpp, line 327.

Thread 1 "ssam2" received signal SIGILL, Illegal instruction.
__static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /__w/packages/packages/engines/serious-engine/source/Sources/GameMP/Computer.cpp:61
61      /__w/packages/packages/engines/serious-engine/source/Sources/GameMP/Computer.cpp: No such file or directory.
(gdb) bt
#0  __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /__w/packages/packages/engines/serious-engine/source/Sources/GameMP/Computer.cpp:61
#1  _GLOBAL__sub_I_Computer.cpp(void) () at /__w/packages/packages/engines/serious-engine/source/Sources/GameMP/Computer.cpp:1339
#2  0x00007ffff7fdc00e in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffe158, env=env@entry=0x55555590e380) at dl-init.c:74
#3  0x00007ffff7fdc0f0 in call_init (env=0x55555590e380, argv=0x7fffffffe158, argc=1, l=<optimized out>) at dl-init.c:37
#4  _dl_init (main_map=0x555555951460, argc=1, argv=0x7fffffffe158, env=0x55555590e380) at dl-init.c:121
#5  0x00007ffff797068d in __GI__dl_catch_exception (exception=<optimized out>, operate=<optimized out>, args=<optimized out>) at dl-error-skeleton.c:182
#6  0x00007ffff7fe03e4 in dl_open_worker (a=a@entry=0x7fffffffcba0) at dl-open.c:783
#7  0x00007ffff7970630 in __GI__dl_catch_exception (exception=0x7fffffffcb80, operate=0x7ffff7fdffd0 <dl_open_worker>, args=0x7fffffffcba0) at dl-error-skeleton.c:208
#8  0x00007ffff7fdfbfa in _dl_open (file=0x7fffffffcb80 "Pz\220UUU", mode=-2147483391, caller_dlopen=0x555555624231 <CUnixDynamicLoader::DoOpen(char const*)+17>, nsid=-2, argc=1, argv=0x7fffffffe158, env=0x55555590e380) at dl-open.c:858
#9  0x00007ffff7f80248 in dlopen_doit (a=a@entry=0x7fffffffcdd0) at dlopen.c:66
#10 0x00007ffff7970630 in __GI__dl_catch_exception (exception=exception@entry=0x7fffffffcd70, operate=0x7ffff7f801f0 <dlopen_doit>, args=0x7fffffffcdd0) at dl-error-skeleton.c:208
#11 0x00007ffff79706ef in __GI__dl_catch_error (objname=0x55555586b8e0, errstring=0x55555586b8e8, mallocedp=0x55555586b8d8, operate=<optimized out>, args=<optimized out>) at dl-error-skeleton.c:227
hjri commented 2 years ago

1000.tar.gz and here's the core dumps

ptitSeb commented 2 years ago

can it be just the compile option that are not good for your cpu? the SIGILL is in function destructor, that's code 100% generated by gcc here).

hjri commented 2 years ago

idk, i have last-gen Ryzen 9, really not sure what's going on, i have a suspicion it's either gcc, kernel, or CPU problem, but this is the first time I see it.

hjri commented 1 year ago

downloading recent build and extracting it into game directory with all the libraries in zip file made it work, so i'm guessing issue is in some of the libs?