Open Martinfx opened 1 year ago
Ahh, the same error that @dasehak encountered :(
@Xottab-DUTY, The same problem on latest builds on Ubuntu 22.04, something is damaged in game archives. I've already spent several backup copies.
Thread 1 "Primary thread" received signal SIGSEGV, Segmentation fault.
CGamePersistent::RegisterModel (this=<optimized out>, V=0x555559e8b070) at /home/ubuntu/GIT/xray-162/src/xrGame/GamePersistent.cpp:125
125 const u16 cnt = K->LL_BoneCount();
* 128.1 : [ 1] ui\ui_font_graff_19_1600
* 128.1 : [ 1] ui\ui_font_graff_22_1600
* 270.0 : [ 1] ui\video_voroni_crop
* 936.0 : [ 1] ui\video_water_crop
* 1024.1 : [ 1] ui\ui_actor_main_menu
* 1024.1 : [ 1] ui\ui_actor_widescreen_sidepanels
- Uncached model loading: \home\ubuntu\GIT\xray-162\bin\x64\gamedata\meshes\dynamics\weapons\wpn_hand\wpn_hand_05.ogf
* Loading shader: \home\ubuntu\GIT\xray-162\bin\x64\_appdata_\shaders_cache_oxr\gl\deffer_base_bump-hq.ps\2048111100110000000000000000101311112311110000000000
* Loading shader: \home\ubuntu\GIT\xray-162\bin\x64\_appdata_\shaders_cache_oxr\gl\deffer_model_bump-hq_3.vs\2048111100110000000000000000101311112311110000000000
* Loading shader: \home\ubuntu\GIT\xray-162\bin\x64\_appdata_\shaders_cache_oxr\gl\deffer_base_bump.ps\2048111100110000000000000000101311112311110000000000
* Loading shader: \home\ubuntu\GIT\xray-162\bin\x64\_appdata_\shaders_cache_oxr\gl\deffer_model_bump_3.vs\2048111100110000000000000000101311112311110000000000
* Loading shader: \home\ubuntu\GIT\xray-162\bin\x64\_appdata_\shaders_cache_oxr\gl\shadow_direct_model_3.vs\2048111100110000000000000000101311112311110000000000
FATAL ERROR
[error] Expression : K
[error] Function : RegisterModel
[error] File : /home/ubuntu/GIT/xray-162/src/xrGame/GamePersistent.cpp
[error] Line : 124
[error] Description : assertion failed
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*)
CGamePersistent::RegisterModel(IRenderVisual*)
CModelPool::Instance_Load(char const*, int)
CModelPool::Create(char const*, IReader*)
CRender::model_Create(char const*, IReader*)
player_hud::load(shared_str const&)
player_hud::load_default()
CLevel::CLevel()
CObjectItemSingle<CLevel, true>::client_object() const
/home/ubuntu/GIT/xray-162/bin/x64/Debug/xrGame.so(xrFactory_Create+0x5e) [0x7fffaf4ff6ae]
CApplication::OnEvent(CEvent*, unsigned long, unsigned long)
CEventAPI::OnFrame()
CApplication::OnFrame()
MessageRegistry<pureFrame>::Process()
CRenderDevice::FrameMove()
CRenderDevice::ProcessFrame()
CRenderDevice::message_loop()
CRenderDevice::Run()
Startup()
Signal: SIGSEGV (Segmentation fault)
Hello guys. One possible cause of this error could be that the "smart_cast<IKinematics>(V)" call is returning a null pointer. Meaning that the "IRenderVisual V" object passed to the "RegisterModel" function is not of a type that can be cast to "IKinematics*". But it's only my suggestion, I'm not a professional and not very common with C langs.
Hello guys. One possible cause of this error could be that the "smart_cast<IKinematics>(V)" call is returning a null pointer. Meaning that the "IRenderVisual V" object passed to the "RegisterModel" function is not of a type that can be cast to "IKinematics*". But it's only my suggestion, I'm not a professional and not very common with C langs.
This is correct! smart_cast
return nullptr because V
is nullptr, and it's null because engine's filesystem (let's call it FS) can't load the model from the disk.
@GermanAizek suspects that game archives gets damaged somehow and, because of that, FS can't load the model file...
I'll try to run the game again with the pre-working archives. If it doesn't start, maybe it's a problem with FS?
The bug was confirmed only when building using Clang >= 14, all other compilers are working properly.
I experience this bug on x86_64 macOS with Clang 11. Building with GCC 12 instead makes the game work for me. Switching back to Clang triggers this assertion again.
This is correct! smart_cast return nullptr because V is nullptr, and it's null because engine's filesystem (let's call it FS) can't load the model from the disk.
I was wrong. V
is non-null, but due to Clang specifics, it couldn't cast it to IKinematics*
for some reason.
This might have been fixed with 9cf5c0910db841df1b77c0a28e3782a251a18f59.
@Martinfx, @GermanAizek, @OPNA2608, please test it with the newest commits.
I pulled last commit and maybe is wrong in Makefile
maxfx@hades /m/S/c/xray-16 (dev) [1]> cmake .
-- CMAKE_VERSION: 3.28.1
-- CMAKE_PROJECT_VERSION:
-- CMAKE_VERBOSE_MAKEFILE: FALSE
-- git commit: 3b6821c044a7d073341f8cc575d8e057da90d5a7
-- git branch: dev
-- CMAKE_SYSTEM_PROCESSOR: amd64
-- CMAKE_BUILD_TYPE: Release
-- MASTER_GOLD: ON
-- STATIC_BUILD: ON
-- CMAKE_UNITY_BUILD: OFF
-- USE_ADDRESS_SANITIZER: OFF
-- USE_LTO: ON
-- Could NOT find mimalloc (missing: mimalloc_DIR)
Using standard memory allocator
make: "/media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16/Externals/LuaJIT/src/Makefile" line 159: Invalid line type
make: "/media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16/Externals/LuaJIT/src/Makefile" line 161: Invalid line type
make: "/media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16/Externals/LuaJIT/src/Makefile" line 163: Invalid line type
make: "/media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16/Externals/LuaJIT/src/Makefile" line 166: Invalid line type
make: "/media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16/Externals/LuaJIT/src/Makefile" line 167: Invalid line type
make: "/media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16/Externals/LuaJIT/src/Makefile" line 170: Invalid line type
I pulled last commit and maybe is wrong in Makefile
maxfx@hades /m/S/c/xray-16 (dev) [1]> cmake . -- CMAKE_VERSION: 3.28.1 -- CMAKE_PROJECT_VERSION: -- CMAKE_VERBOSE_MAKEFILE: FALSE -- git commit: 3b6821c044a7d073341f8cc575d8e057da90d5a7 -- git branch: dev -- CMAKE_SYSTEM_PROCESSOR: amd64 -- CMAKE_BUILD_TYPE: Release -- MASTER_GOLD: ON -- STATIC_BUILD: ON -- CMAKE_UNITY_BUILD: OFF -- USE_ADDRESS_SANITIZER: OFF -- USE_LTO: ON -- Could NOT find mimalloc (missing: mimalloc_DIR) Using standard memory allocator make: "/media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16/Externals/LuaJIT/src/Makefile" line 159: Invalid line type make: "/media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16/Externals/LuaJIT/src/Makefile" line 161: Invalid line type make: "/media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16/Externals/LuaJIT/src/Makefile" line 163: Invalid line type make: "/media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16/Externals/LuaJIT/src/Makefile" line 166: Invalid line type make: "/media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16/Externals/LuaJIT/src/Makefile" line 167: Invalid line type make: "/media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16/Externals/LuaJIT/src/Makefile" line 170: Invalid line type
Does CMake still finish configuring and generating? According to our CI, this is not critical and we still can compile the project.
no i can not git submodule update --recursive --force --remote
make: "/media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16/Externals/LuaJIT/src/Makefile" line 686: warning: duplicate script for target "%.o" ignored
make: "Makefile" line 683: warning: using previous script for "%.o" defined here
make: "/media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16/Externals/LuaJIT/src/Makefile" line 687: warning: duplicate script for target "%.o" ignored
make: "Makefile" line 683: warning: using previous script for "%.o" defined here
make: "/media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16/Externals/LuaJIT/src/Makefile" line 688: warning: duplicate script for target "%.o" ignored
make: "Makefile" line 683: warning: using previous script for "%.o" defined here
make: Fatal errors encountered -- cannot continue
make: stopped in /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16/Externals/LuaJIT/src
-- Configuring done (1.0s)
CMake Error at Externals/xrLuaFix/CMakeLists.txt:3 (target_sources):
Cannot find source file:
lfs/src/lfs.c
CMake Error at Externals/xrLuaFix/CMakeLists.txt:1 (add_library):
No SOURCES given to target: xrLuaFix
@Martinfx try
git submodule update --init --recursive
Thank you very much. I compiled and run with bugs.
onfig-file [\usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R.ltx] saved successfully
Config-file [\usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\user.ltx] saved successfully
Config-file [\usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R.ltx] saved successfully
Config-file [\usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\user.ltx] saved successfully
FATAL ERROR
[error] Expression : <no expression>
[error] Function : handler_base
[error] File : /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrCore/xrDebug.cpp
[error] Line : 870
[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*)
xrDebug::OnThreadSpawn()
operator->
operator->
0x7fffffffe8a3 <__gxx_personality_v0+0x7fffffdfc4b3> at ???
player_hud::load_ancors()
player_hud::load(shared_str const&)
CLevel::CLevel()
CObjectFactory::register_classes()
long long
IGame_Persistent::OnEvent(CEvent*, unsigned long, unsigned long)
CEventAPI::OnFrame()
CRenderDevice::ProcessParallelSequence(Task&, void*)
CRenderDevice::FrameMove()
CRenderDevice::ProcessFrame()
CApplication::Run()
fish: Job 3, './xr_3da -fsltx ./fsgame.ltx' has stopped
Could you compile it with debug symbols and run it with GDB and show the output?
Thread 1 "Primary thread" received signal SIGSEGV, Segmentation fault.
Address not mapped to object.
0x000000080eae4564 in player_hud::load_ancors (this=this@entry=0x822f9d380) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/player_hud.cpp:571
571 m_ancors.emplace_back(m_model->dcast_PKinematics()->LL_BoneID(bone));
(gdb) bt
#0 0x000000080eae4564 in player_hud::load_ancors (this=this@entry=0x822f9d380) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/player_hud.cpp:571
#1 0x000000080eae4403 in player_hud::load (this=0x822f9d380, player_hud_sect=...) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/player_hud.cpp:545
#2 0x000000080e664895 in player_hud::load_default (this=0x822f9d380) at player_hud.h:133
#3 0x000000080e9adc92 in CLevel::CLevel (this=0x826fb9040) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/Level.cpp:110
#4 0x000000080f1188c2 in xr_new<CLevel> () at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrCommon/../xrCore/xrMemory.h:138
#5 CObjectItemSingle<CLevel, true>::client_object (this=<optimized out>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrServerEntities/object_item_single_inline.h:42
#6 0x000000080edf34b6 in CObjectFactory::client_object (this=<optimized out>, clsid=@0x7fffffffcd38: 5142913160164232224) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrServerEntities/object_factory_inline.h:126
#7 xrFactory_Create (clsid=5142913160164232224) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/xrGame.cpp:27
#8 0x00000008003790c6 in IGame_Persistent::OnEvent (this=0x807a1e200, E=<optimized out>, P1=34502911904, P2=34924800304) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/IGame_Persistent.cpp:269
#9 0x000000080e8c374f in CGamePersistent::OnEvent (this=0x807a1e200, E=0x80e20404c, P1=34502911904, P2=34924800304) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/GamePersistent.cpp:678
#10 0x0000000800329972 in CEvent::Signal (this=0x8196f3480, P1=34502911904, P2=34924800304) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/EventAPI.cpp:39
#11 CEventAPI::Signal (this=0x8004849e8 <Engine+120>, E=0x8196f3480, P1=34502911904, P2=34924800304) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/EventAPI.cpp:114
#12 CEventAPI::OnFrame (this=0x8004849e8 <Engine+120>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/EventAPI.cpp:175
#13 0x00000008003271ed in CEngine::OnFrame (this=<optimized out>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/Engine.cpp:109
#14 0x00000008003938bf in pureFrame::OnPure (self=0x0) at pure.h:18
#15 MessageRegistry<pureFrame>::Process (this=this@entry=0x8004934e8 <Device+432>) at pure.h:101
#16 0x00000008003927ad in CRenderDevice::FrameMove (this=this@entry=0x800493338 <Device>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/device.cpp:454
#17 0x00000008003924a4 in CRenderDevice::ProcessFrame (this=0x800493338 <Device>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/device.cpp:271
#18 0x0000000800387e9c in CApplication::Run (this=<optimized out>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/x_ray.cpp:484
#19 0x0000000000202288 in entry_point (commandLine=0x80181a080 "-fsltx ./fsgame.ltx ") at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xr_3da/entry_point.cpp:29
#20 main (argc=3, argv=0x7fffffffd890) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xr_3da/entry_point.cpp:79
* Loading shader: \usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\shaders_cache_oxr\gl\hud_crosshair.vs\2048111100110000000000001000001311112311110000000000
- Uncached model loading: \usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\gamedata\meshes\dynamics\weapons\wpn_hand\wpn_hand_05.ogf
* Loading shader: \usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\shaders_cache_oxr\gl\deffer_base_bump-hq.ps\2048111100110000000000000000101311112311110000000000
* Loading shader: \usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\shaders_cache_oxr\gl\deffer_model_bump-hq_3.vs\2048111100110000000000000000101311112311110000000000
* Loading shader: \usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\shaders_cache_oxr\gl\deffer_base_bump.ps\2048111100110000000000000000101311112311110000000000
* Loading shader: \usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\shaders_cache_oxr\gl\deffer_model_bump_3.vs\2048111100110000000000000000101311112311110000000000
* Loading shader: \usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\shaders_cache_oxr\gl\shadow_direct_model_3.vs\2048111100110000000000000000101311112311110000000000
Thread 1 "Primary thread" received signal SIGSEGV, Segmentation fault.
Address not mapped to object.
0x000000088b8e36d4 in player_hud::load_ancors (this=this@entry=0x82b1a3fe0) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/player_hud.cpp:571
571 m_ancors.emplace_back(m_model->dcast_PKinematics()->LL_BoneID(bone));
(gdb) bt
#0 0x000000088b8e36d4 in player_hud::load_ancors (this=this@entry=0x82b1a3fe0) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/player_hud.cpp:571
#1 0x000000088b8e3573 in player_hud::load (this=0x82b1a3fe0, player_hud_sect=...) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/player_hud.cpp:545
#2 0x000000088b4650d5 in player_hud::load_default (this=0x82b1a3fe0) at player_hud.h:133
#3 0x000000088b7ae6b2 in CLevel::CLevel (this=0x833cb0000) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/Level.cpp:110
#4 0x000000088bf181e2 in xr_new<CLevel> () at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrCommon/../xrCore/xrMemory.h:138
#5 CObjectItemSingle<CLevel, true>::client_object (this=<optimized out>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrServerEntities/object_item_single_inline.h:42
#6 0x000000088bbf2bd6 in CObjectFactory::client_object (this=<optimized out>, clsid=@0x7fffffffcd38: 5142913160164232224) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrServerEntities/object_factory_inline.h:126
#7 xrFactory_Create (clsid=5142913160164232224) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/xrGame.cpp:27
#8 0x00000008003790d6 in IGame_Persistent::OnEvent (this=0x82db72a00, E=<optimized out>, P1=35215118368, P2=35061319744) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/IGame_Persistent.cpp:269
#9 0x000000088b6c416f in CGamePersistent::OnEvent (this=0x82db72a00, E=0x88b00472c, P1=35215118368, P2=35061319744) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/GamePersistent.cpp:678
#10 0x0000000800329982 in CEvent::Signal (this=0x829d0a980, P1=35215118368, P2=35061319744) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/EventAPI.cpp:39
#11 CEventAPI::Signal (this=0x800484a68 <Engine+120>, E=0x829d0a980, P1=35215118368, P2=35061319744) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/EventAPI.cpp:114
#12 CEventAPI::OnFrame (this=0x800484a68 <Engine+120>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/EventAPI.cpp:175
#13 0x00000008003271fd in CEngine::OnFrame (this=<optimized out>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/Engine.cpp:109
#14 0x000000080039393f in pureFrame::OnPure (self=0x0) at pure.h:18
#15 MessageRegistry<pureFrame>::Process (this=this@entry=0x800493568 <Device+432>) at pure.h:101
#16 0x0000000800392813 in CRenderDevice::FrameMove (this=this@entry=0x8004933b8 <Device>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/device.cpp:454
#17 0x00000008003924b4 in CRenderDevice::ProcessFrame (this=0x8004933b8 <Device>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/device.cpp:271
#18 0x0000000800387eac in CApplication::Run (this=<optimized out>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/x_ray.cpp:484
#19 0x0000000000202288 in entry_point (commandLine=0x8020301c0 "-fsltx ./fsgame.ltx ") at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xr_3da/entry_point.cpp:29
#20 main (argc=3, argv=0x7fffffffd888) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xr_3da/entry_point.cpp:79
(gdb) exit
A debugging session is active.
Inferior 1 [process 10898] will be killed.
* Loading shader: \usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\shaders_cache_oxr\gl\hud_crosshair.vs\2048111100110000000000001000001311112311110000000000 - Uncached model loading: \usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\gamedata\meshes\dynamics\weapons\wpn_hand\wpn_hand_05.ogf * Loading shader: \usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\shaders_cache_oxr\gl\deffer_base_bump-hq.ps\2048111100110000000000000000101311112311110000000000 * Loading shader: \usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\shaders_cache_oxr\gl\deffer_model_bump-hq_3.vs\2048111100110000000000000000101311112311110000000000 * Loading shader: \usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\shaders_cache_oxr\gl\deffer_base_bump.ps\2048111100110000000000000000101311112311110000000000 * Loading shader: \usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\shaders_cache_oxr\gl\deffer_model_bump_3.vs\2048111100110000000000000000101311112311110000000000 * Loading shader: \usr\home\maxfx\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\_appdata_\shaders_cache_oxr\gl\shadow_direct_model_3.vs\2048111100110000000000000000101311112311110000000000 Thread 1 "Primary thread" received signal SIGSEGV, Segmentation fault. Address not mapped to object. 0x000000088b8e36d4 in player_hud::load_ancors (this=this@entry=0x82b1a3fe0) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/player_hud.cpp:571 571 m_ancors.emplace_back(m_model->dcast_PKinematics()->LL_BoneID(bone)); (gdb) bt #0 0x000000088b8e36d4 in player_hud::load_ancors (this=this@entry=0x82b1a3fe0) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/player_hud.cpp:571 #1 0x000000088b8e3573 in player_hud::load (this=0x82b1a3fe0, player_hud_sect=...) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/player_hud.cpp:545 #2 0x000000088b4650d5 in player_hud::load_default (this=0x82b1a3fe0) at player_hud.h:133 #3 0x000000088b7ae6b2 in CLevel::CLevel (this=0x833cb0000) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/Level.cpp:110 #4 0x000000088bf181e2 in xr_new<CLevel> () at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrCommon/../xrCore/xrMemory.h:138 #5 CObjectItemSingle<CLevel, true>::client_object (this=<optimized out>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrServerEntities/object_item_single_inline.h:42 #6 0x000000088bbf2bd6 in CObjectFactory::client_object (this=<optimized out>, clsid=@0x7fffffffcd38: 5142913160164232224) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrServerEntities/object_factory_inline.h:126 #7 xrFactory_Create (clsid=5142913160164232224) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/xrGame.cpp:27 #8 0x00000008003790d6 in IGame_Persistent::OnEvent (this=0x82db72a00, E=<optimized out>, P1=35215118368, P2=35061319744) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/IGame_Persistent.cpp:269 #9 0x000000088b6c416f in CGamePersistent::OnEvent (this=0x82db72a00, E=0x88b00472c, P1=35215118368, P2=35061319744) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrGame/GamePersistent.cpp:678 #10 0x0000000800329982 in CEvent::Signal (this=0x829d0a980, P1=35215118368, P2=35061319744) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/EventAPI.cpp:39 #11 CEventAPI::Signal (this=0x800484a68 <Engine+120>, E=0x829d0a980, P1=35215118368, P2=35061319744) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/EventAPI.cpp:114 #12 CEventAPI::OnFrame (this=0x800484a68 <Engine+120>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/EventAPI.cpp:175 #13 0x00000008003271fd in CEngine::OnFrame (this=<optimized out>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/Engine.cpp:109 #14 0x000000080039393f in pureFrame::OnPure (self=0x0) at pure.h:18 #15 MessageRegistry<pureFrame>::Process (this=this@entry=0x800493568 <Device+432>) at pure.h:101 #16 0x0000000800392813 in CRenderDevice::FrameMove (this=this@entry=0x8004933b8 <Device>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/device.cpp:454 #17 0x00000008003924b4 in CRenderDevice::ProcessFrame (this=0x8004933b8 <Device>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/device.cpp:271 #18 0x0000000800387eac in CApplication::Run (this=<optimized out>) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xrEngine/x_ray.cpp:484 #19 0x0000000000202288 in entry_point (commandLine=0x8020301c0 "-fsltx ./fsgame.ltx ") at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xr_3da/entry_point.cpp:29 #20 main (argc=3, argv=0x7fffffffd888) at /media/ST3000DM007-1WY10G_ZTT0SM4Q_p1/code/xray-16____/src/xr_3da/entry_point.cpp:79 (gdb) exit A debugging session is active. Inferior 1 [process 10898] will be killed.
I think I know what's the problem here. IKinematics
and IKinematicsAnimated
are organized in a way that depends on compiler behaviour. It works ok on MSVC, but it's unreliable on GCC and Clang/LLVM – it works sometimes, sometimes doesn't.
I will work on code reorganization and simplification, and hopefully this will eliminate the root of the problem.
Describe the bug
FATAL ERROR
[error] Expression : K [error] Function : RegisterModel [error] File : /code/xray-16/src/xrGame/GamePersistent.cpp [error] Line : 196 [error] Description : assertion failed
To Reproduce Compile with clang on FreeBSD 13.1 run ./bin/x64/Debug/xr_3da
Desktop (please complete the following information): FreeBSD 13.1 AMD64 ! Couldn't create surface from image: Parameter 'src' is invalid OpenXRay Mixed build 8741, Jan 12 2023 (BSD 64-bit, shared) Custom build from commit[6c499cadce2f3fa5c4d8fdc41ba8f00e9237ec9a] branch[dev]