OpenXRay / xray-16

Improved version of the X-Ray Engine, the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World. Join OpenXRay! ;)
https://discord.gg/sjRMQwv
Other
3.06k stars 457 forks source link

[CS] - some boxes break with a Segfault --> moving_objects::on_object_move(moving_object*) #981

Open BielBdeLuna opened 2 years ago

BielBdeLuna commented 2 years ago

Describe the bug when you keep breaking boxes the engine ends up failing on the following message:

moving_objects::on_object_move(moving_object*) () from /lib/x86_64-linux-gnu/xrGame.so

To Reproduce keep breaking boxes until the engine ends up segfaulting.

Screenshots none captured.

BugTrap error report when it crashes gdb gives this message:

Click here to expand/collapse.

(...) [LUA] ....K.E.R. - Clear Sky\bind_stalker:(192):on_item_take [medkit36359] [LUA] RESET INVULNERABILITY. npc[sim_default_csky_022316] = [false] [LUA] ...A.L.K.E.R. - Clear Sky\xr_walker:(101):DEBUG: set_scheme: scheme='walker', section='walker1@mar_smart_terrain_5_8_guard_2_walk', gulag_name='mar_smart_terrain_5_8' [LUA] ...A.L.K.E.R. - Clear Sky\xr_walker:(103):DEBUG: set_scheme: storage assigned Thread 1 "Primary thread" received signal SIGSEGV, Segmentation fault. 0x00007fffe058846c in moving_objects::on_object_move(moving_object*) () from /lib/x86_64-linux-gnu/xrGame.so (gdb) continue Continuing. FATAL ERROR [error] Expression : [error] Function : handler_base [error] File : /home/biel/code/xray-16/src/xrCore/xrDebug.cpp [error] Line : 848 [error] Description : segmentation fault stack trace: xrDebug::GatherInfo(char*, unsigned long, ErrorLocation const&, char const*, char const*, char const*, char const*) xrDebug::Fail(bool&, ErrorLocation const&, char const*, char const*, char const*, char const*) /lib/x86_64-linux-gnu/xrCore.so(+0x427ab) [0x7ffff7d077ab] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7ffff7717520] /lib/x86_64-linux-gnu/xrGame.so(+0xd9f305) [0x7fffe03c5305] /lib/x86_64-linux-gnu/xrGame.so(+0xfd34ad) [0x7fffe05f94ad] /lib/x86_64-linux-gnu/xrGame.so(+0xc92017) [0x7fffe02b8017] /lib/x86_64-linux-gnu/xrGame.so(+0x1535cf8) [0x7fffe0b5bcf8] CObjectList::SingleUpdate(IGameObject*) CObjectList::SingleUpdate(IGameObject*) CObjectList::Update(bool) IGame_Level::OnFrame() /lib/x86_64-linux-gnu/xrGame.so(+0xeb16f8) [0x7fffe04d76f8] CRenderDevice::FrameMove() CRenderDevice::ProcessFrame() /lib/x86_64-linux-gnu/xrEngine.so(+0x43e2b) [0x7ffff7f02e2b] CRenderDevice::Run() Startup() RunApplication() /usr/games/xr_3da(+0x1885) [0x555555555885] Thread 1 "Primary thread" received signal SIGTRAP, Trace/breakpoint trap. 0x00007ffff7d0731f in xrDebug::Fail(bool&, ErrorLocation const&, char const*, char const*, char const*, char const*) () from /lib/x86_64-linux-gnu/xrCore.so (gdb) quit A debugging session is active. Inferior 1 [process 245114] will be killed. Quit anyway? (y or n) y

Desktop (please complete the following information):

Additional context using the modified gamedata/srcripts/xr_kamp.script provided by @Xottab-DUTY in https://github.com/OpenXRay/xray-16/issues/828

BielBdeLuna commented 2 years ago

related to: https://github.com/OpenXRay/xray-16/issues/980?

BielBdeLuna commented 2 years ago

I have a backtrace for an error that seems to point to the same function, but I wasn't breaking boxes:

Thread 1 "Primary thread" received signal SIGSEGV, Segmentation fault.
0x00007fffe05f2b8c in moving_objects::on_object_move(moving_object*) () from /lib/x86_64-linux-gnu/xrGame.so
(gdb) bt
#0  0x00007fffe05f2b8c in moving_objects::on_object_move(moving_object*) () from /lib/x86_64-linux-gnu/xrGame.so
#1  0x00007fffe042d915 in CGameObject::UpdateCL() () from /lib/x86_64-linux-gnu/xrGame.so
#2  0x00007fffe0661b5d in CPhysicsShellHolder::UpdateCL() () from /lib/x86_64-linux-gnu/xrGame.so
#3  0x00007fffe0325c17 in CCustomMonster::UpdateCL() () from /lib/x86_64-linux-gnu/xrGame.so
#4  0x00007fffe0bae808 in CAI_Stalker::UpdateCL() () from /lib/x86_64-linux-gnu/xrGame.so
#5  0x00007ffff7f655a6 in CObjectList::SingleUpdate(IGameObject*) () from /lib/x86_64-linux-gnu/xrEngine.so
#6  0x00007ffff7f65583 in CObjectList::SingleUpdate(IGameObject*) () from /lib/x86_64-linux-gnu/xrEngine.so
#7  0x00007ffff7f66cc7 in CObjectList::Update(bool) () from /lib/x86_64-linux-gnu/xrEngine.so
#8  0x00007ffff7f28b91 in IGame_Level::OnFrame() () from /lib/x86_64-linux-gnu/xrEngine.so
#9  0x00007fffe0544b78 in CLevel::OnFrame() () from /lib/x86_64-linux-gnu/xrGame.so
#10 0x00007ffff7f029cb in CRenderDevice::FrameMove() () from /lib/x86_64-linux-gnu/xrEngine.so
#11 0x00007ffff7f031c7 in CRenderDevice::ProcessFrame() () from /lib/x86_64-linux-gnu/xrEngine.so
#12 0x00007ffff7f03c4b in CRenderDevice::message_loop() [clone .part.0] () from /lib/x86_64-linux-gnu/xrEngine.so
#13 0x00007ffff7f03f27 in CRenderDevice::Run() () from /lib/x86_64-linux-gnu/xrEngine.so
#14 0x00007ffff7f380b0 in Startup() () from /lib/x86_64-linux-gnu/xrEngine.so
#15 0x00007ffff7f38c2b in RunApplication() () from /lib/x86_64-linux-gnu/xrEngine.so
#16 0x0000555555555885 in entry_point(char const*) ()
#17 0x00005555555555bf in main ()
(gdb) continue 
Continuing.

FATAL ERROR

[error] Expression    : <no expression>
[error] Function      : handler_base
[error] File          : /home/biel/code/xray-16/src/xrCore/xrDebug.cpp
[error] Line          : 853
[error] Description   : segmentation fault

stack trace:

xrDebug::GatherInfo(char*, unsigned long, ErrorLocation const&, char const*, char const*, char const*, char const*)
xrDebug::Fail(bool&, ErrorLocation const&, char const*, char const*, char const*, char const*)
/lib/x86_64-linux-gnu/xrCore.so(+0x4271b) [0x7ffff7d0871b]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7ffff7718520]
/lib/x86_64-linux-gnu/xrGame.so(+0xf44b8c) [0x7fffe05f2b8c]
/lib/x86_64-linux-gnu/xrGame.so(+0xd7f915) [0x7fffe042d915]
/lib/x86_64-linux-gnu/xrGame.so(+0xfb3b5d) [0x7fffe0661b5d]
/lib/x86_64-linux-gnu/xrGame.so(+0xc77c17) [0x7fffe0325c17]
/lib/x86_64-linux-gnu/xrGame.so(+0x1500808) [0x7fffe0bae808]
CObjectList::SingleUpdate(IGameObject*)
CObjectList::SingleUpdate(IGameObject*)
CObjectList::Update(bool)
IGame_Level::OnFrame()
/lib/x86_64-linux-gnu/xrGame.so(+0xe96b78) [0x7fffe0544b78]
CRenderDevice::FrameMove()
CRenderDevice::ProcessFrame()
/lib/x86_64-linux-gnu/xrEngine.so(+0x43c4b) [0x7ffff7f03c4b]
CRenderDevice::Run()
Startup()
RunApplication()

so maybe this error is not related to breaking boxes after all?

again:

Xottab-DUTY commented 2 years ago

UpdateCL is Update Client, it updates client data. (there's server data also, engine has client/server architecture)

Xottab-DUTY commented 6 months ago

Is it reproducible with the current nightly builds?