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
2.98k stars 456 forks source link

Archlinux mimalloc update - games crashes after killing an enemy. #1228

Closed jptrzy closed 1 year ago

jptrzy commented 1 year ago

After mimalloc update and using branch 1193-fix-game-crash-after-mimalloc-update games starts normally, but when I kill a humanoid enemy game crashes.

Logs error report

Logs ``` ! Couldn't create surface from image: Parameter 'src' is invalid OpenXRay Release Master Gold build 8745, Jan 16 2023 (Linux 64-bit, shared) Custom build from commit[096c38a5dc80cddd424c2726daddd4a5b7acd55c] branch[1193-fix-game-crash-after-mimalloc-update] command line -fsltx /home/jp3/Games/STALKER_Call_of_Pripyat/S.T.A.L.K.E.R._Call_of_Pripyat/fsgame.ltx * CPU features: RDTSC, MMX, SSE, AVX * CPU threads: 4 Initializing File System... $fs_root$ = /home/jp3/Games/STALKER_Call_of_Pripyat/S.T.A.L.K.E.R._Call_of_Pripyat using fs-ltx /home/jp3/Games/STALKER_Call_of_Pripyat/S.T.A.L.K.E.R._Call_of_Pripyat/fsgame.ltx FS: 42737 files cached 32 archives, 5Kb memory used. Init FileSystem 0.515143 sec -----loading \home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\configs\system.ltx -----loading \home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\configs\system.ltx ! Failed to determine on which monitor the game is launched. ! SDL: Invalid window Starting INPUT device... Loading module: xrRender_GL Available render modes[1]: renderer_rgl Executing config-script "user.ltx"... [\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\_appdata_\user.ltx] successfully loaded. Selected renderer: renderer_rgl Loading module: xrGame Initializing Engine... SOUND: OpenAL: system default sound device name is OpenAL Soft Executing config-script "\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\configs\default_controls.ltx"... [\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\configs\default_controls.ltx] successfully loaded. Executing config-script "user.ltx"... Executing config-script "\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\configs\rspec_default.ltx"... [\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\configs\rspec_default.ltx] successfully loaded. Executing config-script "\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\configs\default_controls.ltx"... [\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\configs\default_controls.ltx] successfully loaded. ~ Invalid syntax in call to 'sv_adm_menu_ban_time' ~ Valid arguments: ui_mp_am_10_minutes/ui_mp_am_30_minutes/ui_mp_am_1_hour/ui_mp_am_6_hours/ui_mp_am_1_day/ui_mp_am_1_week/ui_mp_am_1_month/ui_mp_am_3_monthes/ui_mp_am_forever ~ Invalid syntax in call to 'sv_suspicious_actions_ban_time' ~ Valid arguments: ui_mp_am_10_minutes/ui_mp_am_30_minutes/ui_mp_am_1_hour/ui_mp_am_6_hours/ui_mp_am_1_day/ui_mp_am_1_week/ui_mp_am_1_month/ui_mp_am_3_monthes/ui_mp_am_forever [\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\_appdata_\user.ltx] successfully loaded. SOUND: Selected device is OpenAL Soft * SOUND: EFX extension: present * sound : cache: 65537 kb, 4856 lines, 13820 bpl Starting RENDER device... * GPU vendor: [NVIDIA Corporation] device: [NVIDIA GeForce GTX 1070/PCIe/SSE2] * GPU OpenGL version: 4.1.0 NVIDIA 525.78.01 * GPU OpenGL shading language version: 4.10 NVIDIA via Cg compiler * GPU OpenGL VTF units: [32] CTI units: [192] * DVB created: 4096K * DIB created: 512K ! Renderer doesn't support blender 'effects\shadow_world' * HWDST/PCF supported and used Starting engine... * [ Linux ]: free[1654600 K], reserved[60168 K], committed[14688564 K] * [ Render ]: textures[4149 K] * [ x-ray ]: process heap[248 K] * [ x-ray ]: economy: strings[7916 K], smem[0 K] -fsltx /home/jp3/Games/STALKER_Call_of_Pripyat/S.T.A.L.K.E.R._Call_of_Pripyat/fsgame.ltx * phase time: 0 ms * phase cmem: 282 K Loading sounds... Loading objects... Loading models... Loading textures... * [prefetch] time: 2523 ms * [prefetch] memory: 562 Kb * phase time: 2541 ms * phase cmem: 846 K * phase time: 56 ms * phase cmem: 852 K * phase time: 0 ms * phase cmem: 852 K * Loading spawn registry... * 6464 spawn points are successfully loaded * Loading objects... * 12018 objects are successfully loaded * Game jp3 - quicksave is successfully loaded from file '\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\_appdata_\savedgames\jp3 - quicksave.scop' (0.780s) * phase time: 779 ms * phase cmem: 1181 K * phase time: 11 ms * phase cmem: 1181 K * phase time: 0 ms * phase cmem: 1181 K * client : connection accepted - * phase time: 2 ms * phase cmem: 1181 K * phase time: 0 ms * phase cmem: 1181 K * phase time: 827 ms * phase cmem: 1408 K * phase time: 218 ms * phase cmem: 1408 K * phase time: 81 ms * phase cmem: 1431 K * phase time: 19 ms * phase cmem: 1447 K * [DETAILS] VertexConsts(256), Batch(61) * [DETAILS] 10126 v(20), 5368 p * [DETAILS] Batch(61), VB(197K), IB(31K) * phase time: 3 ms * phase cmem: 1450 K * Loading HOM: \home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\levels\zaton\level.hom * phase time: 35 ms * phase cmem: 1450 K * phase time: 0 ms * phase cmem: 1450 K * phase time: 0 ms * phase cmem: 1450 K * phase time: 1 ms * phase cmem: 1450 K * t-report - base: 1483, 329753 K * t-report - lmap: 16, 16386 K ~ [ui\pda_tasks_16.xml] stretch attribute is unsupported for [background] ! Can't find texture 'ui_ingame2_pda_buttons_background_e' ! Can't find texture 'ui_pda2_fr_l' ! Can't find texture 'ui_pda2_fr_r' ! Can't find texture 'ui_pda2_fr_t' ! Can't find texture 'ui_pda2_fr_lt' ! Can't find texture 'ui_pda2_fr_rb' ! Can't find texture 'ui_pda2_fr_rt' ! Can't find texture 'ui_pda2_fr_lb' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_back' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_l' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_r' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_t' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_b' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_lt' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_rb' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_rt' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_lb' ~ [ui\pda_fraction_war_16.xml] stretch attribute is unsupported for [background] ~ [ui\pda_fraction_war_16.xml] stretch attribute is unsupported for [static_line1] ~ [ui\pda_fraction_war_16.xml] stretch attribute is unsupported for [static_line2] ~ [ui\pda_fraction_war_16.xml] stretch attribute is unsupported for [static_line3] ~ [ui\pda_fraction_war_16.xml] stretch attribute is unsupported for [static_line4] ~ [ui\pda_fraction_war_16.xml] stretch attribute is unsupported for [static_line_left] ~ [ui\pda_fraction_war_16.xml] stretch attribute is unsupported for [static_line_right] ~ [ui\pda_logs_16.xml] stretch attribute is unsupported for [background] * phase time: 724 ms * phase cmem: 1891 K ! Unknown command: dump_infos * MEMORY USAGE: 1979 K * End of synchronization A[1] R[1] * phase time: 2909 ms * phase cmem: 1979 K * [ Linux ]: free[167044 K], reserved[60132 K], committed[16176120 K] * [ Render ]: textures[392019 K] * [ x-ray ]: process heap[1979 K] * [ x-ray ]: economy: strings[24828 K], smem[10209 K] FATAL ERROR [error] Expression : [error] Function : handler_base [error] File : /home/jp3/Src/xray-16/src/xrCore/xrDebug.cpp [error] Line : 877 [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*) /usr/lib/xrCore.so(+0x3f7d7) [0x7ffff7d267d7] /usr/lib/libc.so.6(+0x38a00) [0x7ffff7569a00] /usr/lib/libmimalloc.so.2(+0xead3) [0x7ffff7228ad3] imotion_position::motion_collide(float, IKinematicsAnimated&) imotion_position::move(float, IKinematicsAnimated&) imotion_position::tracks_update::operator()(float, IKinematicsAnimated&) CKinematicsAnimated::OnCalculateBones() CKinematics::CalculateBones(int) imotion_position::move_update() interactive_motion::update() CCharacterPhysicsSupport::in_UpdateCL() CAI_Stalker::UpdateCL() CObjectList::SingleUpdate(IGameObject*) CObjectList::Update(bool) IGame_Level::OnFrame() CLevel::OnFrame() CRenderDevice::FrameMove() CRenderDevice::ProcessFrame() ```

System info

Related threads

Btw. This is my first issue with this engine, so I could miss some info/logs that I should share.

dasehak commented 1 year ago

Run it through the debugger, please

jptrzy commented 1 year ago
gdb output ``` $ gdb xr_3da GNU gdb (GDB) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from xr_3da... (gdb) run Starting program: /usr/bin/xr_3da This GDB supports auto-downloading debuginfo from the following URLs: https://debuginfod.archlinux.org Enable debuginfod for this session? (y or [n]) Quit (gdb) Quit (gdb) Quit (gdb) exit A debugging session is active. Inferior 1 [process 1444] will be killed. Quit anyway? (y or n) y jp3 STALKER_Call_of_Pripyat $ gdb xr_3da GNU gdb (GDB) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from xr_3da... (gdb) run -fsltx "$(pwd)/S.T.A.L.K.E.R._Call_of_Pripyat/fsgame.ltx" Starting program: /usr/bin/xr_3da -fsltx "$(pwd)/S.T.A.L.K.E.R._Call_of_Pripyat/fsgame.ltx" This GDB supports auto-downloading debuginfo from the following URLs: https://debuginfod.archlinux.org Enable debuginfod for this session? (y or [n]) y Debuginfod has been enabled. To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit. [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". ! Couldn't create surface from image: Parameter 'src' is invalid OpenXRay Release Master Gold build 8745, Jan 16 2023 (Linux 64-bit, shared) Custom build from commit[096c38a5dc80cddd424c2726daddd4a5b7acd55c] branch[1193-fix-game-crash-after-mimalloc-update] command line -fsltx /home/jp3/Games/STALKER_Call_of_Pripyat/S.T.A.L.K.E.R._Call_of_Pripyat/fsgame.ltx * CPU features: RDTSC, MMX, SSE, AVX * CPU threads: 4 [New Thread 0x7ffff66be6c0 (LWP 1463)] [New Thread 0x7ffff5ebd6c0 (LWP 1464)] [New Thread 0x7ffff56bc6c0 (LWP 1465)] Initializing File System... $fs_root$ = /home/jp3/Games/STALKER_Call_of_Pripyat/S.T.A.L.K.E.R._Call_of_Pripyat using fs-ltx /home/jp3/Games/STALKER_Call_of_Pripyat/S.T.A.L.K.E.R._Call_of_Pripyat/fsgame.ltx FS: 42737 files cached 32 archives, 4Kb memory used. Init FileSystem 1.501131 sec -----loading \home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\configs\system.ltx -----loading \home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\configs\system.ltx ! Failed to determine on which monitor the game is launched. ! SDL: Invalid window Starting INPUT device... [New Thread 0x7ffff4e8a6c0 (LWP 1466)] Loading module: xrRender_GL Available render modes[1]: renderer_rgl Executing config-script "user.ltx"... [\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\_appdata_\user.ltx] successfully loaded. Selected renderer: renderer_rgl Loading module: xrGame Initializing Engine... SOUND: OpenAL: system default sound device name is OpenAL Soft [New Thread 0x7fffde7ff6c0 (LWP 1467)] [New Thread 0x7fffddffe6c0 (LWP 1468)] [Thread 0x7fffddffe6c0 (LWP 1468) exited] [Thread 0x7fffde7ff6c0 (LWP 1467) exited] Downloading 0.78 MB separate debug info for /usr/lib/libpulse.so.0 Downloading 1.22 MB separate debug info for /usr/lib/pulseaudio/libpulsecommon-16.1.so Downloading 1.83 MB separate debug info for /usr/lib/libsndfile.so.1 Downloading 0.05 MB separate debug info for /usr/lib/libasyncns.so.0 Downloading 1.01 MB separate debug info for /usr/lib/libFLAC.so.12 Downloading 0.85 MB separate debug info for /usr/lib/libmp3lame.so.0 [New Thread 0x7fffde7ff6c0 (LWP 1480)] [ALSOFT] (EE) Could not query RTKit: No such file or directory (2) [New Thread 0x7fffddffe6c0 (LWP 1483)] [ALSOFT] (EE) Could not query RTKit: No such file or directory (2) [New Thread 0x7fffdd7fd6c0 (LWP 1484)] [Thread 0x7fffdd7fd6c0 (LWP 1484) exited] Executing config-script "\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\configs\default_controls.ltx"... [\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\configs\default_controls.ltx] successfully loaded. Executing config-script "user.ltx"... Executing config-script "\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\configs\rspec_default.ltx"... [Thread 0x7fffddffe6c0 (LWP 1483) exited] [\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\configs\rspec_default.ltx] successfully loaded. Executing config-script "\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\configs\default_controls.ltx"... [\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\configs\default_controls.ltx] successfully loaded. ~ Invalid syntax in call to 'sv_adm_menu_ban_time' ~ Valid arguments: ui_mp_am_10_minutes/ui_mp_am_30_minutes/ui_mp_am_1_hour/ui_mp_am_6_hours/ui_mp_am_1_day/ui_mp_am_1_week/ui_mp_am_1_month/ui_mp_am_3_monthes/ui_mp_am_forever ~ Invalid syntax in call to 'sv_suspicious_actions_ban_time' ~ Valid arguments: ui_mp_am_10_minutes/ui_mp_am_30_minutes/ui_mp_am_1_hour/ui_mp_am_6_hours/ui_mp_am_1_day/ui_mp_am_1_week/ui_mp_am_1_month/ui_mp_am_3_monthes/ui_mp_am_forever [\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\_appdata_\user.ltx] successfully loaded. SOUND: Selected device is OpenAL Soft [New Thread 0x7fffddffe6c0 (LWP 1485)] [ALSOFT] (EE) Could not query RTKit: No such file or directory (2) [New Thread 0x7fffdd7fd6c0 (LWP 1486)] * SOUND: EFX extension: present * sound : cache: 65537 kb, 4856 lines, 13820 bpl Starting RENDER device... * GPU vendor: [NVIDIA Corporation] device: [NVIDIA GeForce GTX 1070/PCIe/SSE2] * GPU OpenGL version: 4.1.0 NVIDIA 525.78.01 * GPU OpenGL shading language version: 4.10 NVIDIA via Cg compiler * GPU OpenGL VTF units: [32] CTI units: [192] * DVB created: 4096K * DIB created: 512K ! Renderer doesn't support blender 'effects\shadow_world' * HWDST/PCF supported and used Starting engine... * [ Linux ]: free[12893344 K], reserved[84528 K], committed[3449552 K] * [ Render ]: textures[4149 K] * [ x-ray ]: process heap[227 K] * [ x-ray ]: economy: strings[7916 K], smem[0 K] -fsltx /home/jp3/Games/STALKER_Call_of_Pripyat/S.T.A.L.K.E.R._Call_of_Pripyat/fsgame.ltx * phase time: 0 ms * phase cmem: 260 K Loading sounds... Loading objects... Loading models... Loading textures... * [prefetch] time: 9883 ms * [prefetch] memory: 559 Kb * phase time: 9910 ms * phase cmem: 822 K * phase time: 90 ms * phase cmem: 831 K * phase time: 0 ms * phase cmem: 831 K * Loading spawn registry... * 6464 spawn points are successfully loaded * Loading objects... * 12018 objects are successfully loaded * Game jp3 - quicksave is successfully loaded from file '\home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\_appdata_\savedgames\jp3 - quicksave.scop' (1.127s) * phase time: 1127 ms * phase cmem: 1168 K * phase time: 30 ms * phase cmem: 1169 K * phase time: 0 ms * phase cmem: 1169 K * client : connection accepted - * phase time: 17 ms * phase cmem: 1169 K * phase time: 32 ms * phase cmem: 1169 K * phase time: 829 ms * phase cmem: 1393 K * phase time: 169 ms * phase cmem: 1393 K * phase time: 793 ms * phase cmem: 1417 K * phase time: 60 ms * phase cmem: 1433 K * [DETAILS] VertexConsts(256), Batch(61) * [DETAILS] 10126 v(20), 5368 p * [DETAILS] Batch(61), VB(197K), IB(31K) * phase time: 102 ms * phase cmem: 1436 K * Loading HOM: \home\jp3\Games\STALKER_Call_of_Pripyat\S.T.A.L.K.E.R._Call_of_Pripyat\gamedata\levels\zaton\level.hom * phase time: 39 ms * phase cmem: 1436 K * phase time: 21 ms * phase cmem: 1437 K * phase time: 0 ms * phase cmem: 1437 K * phase time: 2 ms * phase cmem: 1437 K * t-report - base: 1483, 329753 K * t-report - lmap: 16, 16386 K ~ [ui\pda_tasks_16.xml] stretch attribute is unsupported for [background] ! Can't find texture 'ui_ingame2_pda_buttons_background_e' ! Can't find texture 'ui_pda2_fr_l' ! Can't find texture 'ui_pda2_fr_r' ! Can't find texture 'ui_pda2_fr_t' ! Can't find texture 'ui_pda2_fr_lt' ! Can't find texture 'ui_pda2_fr_rb' ! Can't find texture 'ui_pda2_fr_rt' ! Can't find texture 'ui_pda2_fr_lb' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_back' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_l' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_r' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_t' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_b' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_lt' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_rb' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_rt' ! Can't find texture 'ui_pda2_fr_delimiter_fraction_lb' ~ [ui\pda_fraction_war_16.xml] stretch attribute is unsupported for [background] ~ [ui\pda_fraction_war_16.xml] stretch attribute is unsupported for [static_line1] ~ [ui\pda_fraction_war_16.xml] stretch attribute is unsupported for [static_line2] ~ [ui\pda_fraction_war_16.xml] stretch attribute is unsupported for [static_line3] ~ [ui\pda_fraction_war_16.xml] stretch attribute is unsupported for [static_line4] ~ [ui\pda_fraction_war_16.xml] stretch attribute is unsupported for [static_line_left] ~ [ui\pda_fraction_war_16.xml] stretch attribute is unsupported for [static_line_right] ~ [ui\pda_logs_16.xml] stretch attribute is unsupported for [background] * phase time: 4263 ms * phase cmem: 1875 K ! Unknown command: dump_infos * MEMORY USAGE: 1971 K * End of synchronization A[1] R[1] * phase time: 4109 ms * phase cmem: 1971 K * [ Linux ]: free[9713116 K], reserved[84568 K], committed[6629780 K] * [ Render ]: textures[392019 K] * [ x-ray ]: process heap[1971 K] * [ x-ray ]: economy: strings[24829 K], smem[10209 K] Thread 1 "Primary thread" received signal SIGSEGV, Segmentation fault. _mi_free_generic (segment=0x55556e000000, page=0x5554b8f53018, is_local=false, p=0x55556e9dfc80) at /usr/src/debug/mimalloc/mimalloc/src/alloc.c:483 483 mi_block_t* const block = (mi_page_has_aligned(page) ? _mi_page_ptr_unalign(segment, page, p) : (mi_block_t*)p); (gdb) continue Continuing. FATAL ERROR [error] Expression : [error] Function : handler_base [error] File : /home/jp3/Src/xray-16/src/xrCore/xrDebug.cpp [error] Line : 877 [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*) /usr/lib/xrCore.so(+0x3f7d7) [0x7ffff7d267d7] /usr/lib/libc.so.6(+0x38a00) [0x7ffff7569a00] /usr/lib/libmimalloc.so.2(+0xead3) [0x7ffff7228ad3] imotion_position::motion_collide(float, IKinematicsAnimated&) imotion_position::collide_not_move(IKinematicsAnimated&) imotion_position::state_start() CCharacterPhysicsSupport::KillHit(SHit&) CCharacterPhysicsSupport::in_Hit(SHit&, bool) CCustomMonster::Die(IGameObject*) CAI_Stalker::Die(IGameObject*) CEntity::OnEvent(NET_Packet&, unsigned short) CAI_Stalker::OnEvent(NET_Packet&, unsigned short) CLevel::ProcessGameEvents() CLevel::OnFrame() CRenderDevice::FrameMove() CRenderDevice::ProcessFrame() CRenderDevice::message_loop() CRenderDevice::Run() Thread 1 "Primary thread" received signal SIGSEGV, Segmentation fault. mi_free (p=0x555555cefc50) at /usr/src/debug/mimalloc/mimalloc/src/alloc.c:538 538 const bool is_local= (_mi_thread_id() == mi_atomic_load_relaxed(&segment->thread_id)); (gdb) conntinue Undefined command: "conntinue". Try "help". (gdb) continue Continuing. [Thread 0x7fffdd7fd6c0 (LWP 1486) exited] [Thread 0x7fffddffe6c0 (LWP 1485) exited] [Thread 0x7fffde7ff6c0 (LWP 1480) exited] [Thread 0x7ffff4e8a6c0 (LWP 1466) exited] [Thread 0x7ffff56bc6c0 (LWP 1465) exited] [Thread 0x7ffff66be6c0 (LWP 1463) exited] [Thread 0x7ffff7138980 (LWP 1458) exited] [Thread 0x7ffff5ebd6c0 (LWP 1464) exited] [New process 1458] Program terminated with signal SIGSEGV, Segmentation fault. The program no longer exists. ```
jptrzy commented 1 year ago

I think it is connected with death animation/ragdoll or something like this.

jptrzy commented 1 year ago

I don't know it it would help in anythink, but I found where it bugs out:

``` CBlend::update (_Callback=0x7fffe06ac680 , dt=0.0199994426, this=0x57c66c14508) at /home/jp3/Src/xray-16/src/Include/xrRender/animation_blend.h:185 185 case eAccrue: update_play(dt, _Callback); break; (gdb) CBlend::update_play (_Callback=0x7fffe06ac680 , dt=0.0199994426, this=0x57c66c14508) at /home/jp3/Src/xray-16/src/Include/xrRender/animation_blend.h:114 114 if (!update_time(dt)) // reached end (gdb) 0x00007ffff45566d8 in CBlend::update_time (dt=0.0199994426, this=0x57c66c14508) at /home/jp3/Src/xray-16/src/Include/xrRender/animation_blend.h:133 133 if (!playing) (gdb) 135 float quant = dt * speed; (gdb) 136 timeCurrent += quant; // stop@end - time is not going (gdb) 140 bool at_end = running_fwrd && (timeCurrent > (timeTotal - END_EPS_l)); (gdb) 143 if (!stop_at_end) (gdb) 152 if (!at_end && !at_begin) (gdb) CKinematicsAnimated::LL_UpdateTracks (this=0x57c66c14000, dt=, b_force=true, leave_blends=true) at /home/jp3/Src/xray-16/src/Layers/xrRender/SkeletonAnimated.cpp:521 521 for (; I != E; I++) (gdb) 515 for (u16 part = 0; part < MAX_PARTS; part++) (gdb) 517 if (nullptr == m_Partition->part(part).Name) (gdb) shared_str::shared_str (rhs=0x0, this=) at /home/jp3/Src/xray-16/src/xrCore/xrstring.h:111 111 _set(rhs); (gdb) 0x00007ffff455663c in shared_str::_set (rhs=0x0, this=) at /home/jp3/Src/xray-16/src/xrCore/xrstring.h:85 85 str_value* v = g_pStringContainer->dock(rhs); (gdb) CKinematicsAnimated::LL_UpdateTracks (this=0x57c66c14000, dt=, b_force=true, leave_blends=true) at /home/jp3/Src/xray-16/src/Layers/xrRender/SkeletonAnimated.cpp:517 517 if (nullptr == m_Partition->part(part).Name) (gdb) shared_str::shared_str (rhs=0x0, this=) at /home/jp3/Src/xray-16/src/xrCore/xrstring.h:111 111 _set(rhs); (gdb) shared_str::_set (rhs=0x0, this=) at /home/jp3/Src/xray-16/src/xrCore/xrstring.h:85 85 str_value* v = g_pStringContainer->dock(rhs); (gdb) str_container::dock (this=0x57c28030540, value=value@entry=0x0) at /home/jp3/Src/xray-16/src/xrCore/xrstring.cpp:151 151 if (0 == value) (gdb) CKinematicsAnimated::LL_UpdateTracks (this=0x57c66c14000, dt=, b_force=true, leave_blends=true) at /home/jp3/Src/xray-16/src/Layers/xrRender/SkeletonAnimated.cpp:517 517 if (nullptr == m_Partition->part(part).Name) (gdb) operator== (b=..., a=...) at /home/jp3/Src/xray-16/src/xrCore/xrstring.h:212 212 IC bool operator==(shared_str const& a, shared_str const& b) { return a._get() == b._get(); } (gdb) shared_str::_get (this=) at /home/jp3/Src/xray-16/src/xrCore/xrstring.h:86 86 if (0 != v) (gdb) 517 if (nullptr == m_Partition->part(part).Name) (gdb) operator== (b=..., a=...) at /home/jp3/Src/xray-16/src/xrCore/xrstring.h:212 212 IC bool operator==(shared_str const& a, shared_str const& b) { return a._get() == b._get(); } (gdb) 0x00007ffff4556662 in shared_str::_get (this=) at /home/jp3/Src/xray-16/src/xrCore/xrstring.h:103 103 const str_value* _get() const { return p_; } (gdb) 515 for (u16 part = 0; part < MAX_PARTS; part++) (gdb) 547 LL_UpdateFxTracks(dt); (gdb) CKinematicsAnimated::LL_UpdateFxTracks (this=0x57c66c14000, dt=0.0199994426) at /home/jp3/Src/xray-16/src/xrCore/FixedVector.h:24 24 IC iterator begin() { return array; } (gdb) 553 I = blend_fx.begin(); (gdb) 0x00007ffff45563e4 in svector::begin (this=0x57c66c19a10) at /home/jp3/Src/xray-16/src/xrCore/FixedVector.h:24 24 IC iterator begin() { return array; } (gdb) CKinematicsAnimated::LL_UpdateFxTracks (this=0x57c66c14000, dt=0.0199994426) at /home/jp3/Src/xray-16/src/xrCore/FixedVector.h:25 25 IC iterator end() { return array + count; } (gdb) 554 E = blend_fx.end(); (gdb) 0x00007ffff45563f1 in svector::end (this=0x57c66c19a10) at /home/jp3/Src/xray-16/src/xrCore/FixedVector.h:25 25 IC iterator end() { return array + count; } (gdb) CKinematicsAnimated::LL_UpdateFxTracks (this=0x57c66c14000, dt=0.0199994426) at /home/jp3/Src/xray-16/src/Layers/xrRender/SkeletonAnimated.cpp:555 555 for (; I != E; I++) (gdb) imotion_position::advance_animation (this=this@entry=0x57c55f56a20, dt=dt@entry=0.0199994426, KA=...) at /home/jp3/Src/xray-16/src/xrGame/imotion_position.cpp:364 364 force_calculate_bones(KA); (gdb) imotion_position::force_calculate_bones (this=this@entry=0x57c55f56a20, KA=...) at /home/jp3/Src/xray-16/src/xrPhysics/PhysicsShell.h:306 306 IC IKinematics* PKinematics() { return m_pKinematics; } (gdb) 343 IKinematics* K = shell->PKinematics(); (gdb) 0x00007fffe06a7ee9 in CPhysicsShell::PKinematics (this=) at /home/jp3/Src/xray-16/src/xrPhysics/PhysicsShell.h:306 306 IC IKinematics* PKinematics() { return m_pKinematics; } (gdb) imotion_position::force_calculate_bones (this=this@entry=0x57c55f56a20, KA=...) at /home/jp3/Src/xray-16/src/xrGame/imotion_position.cpp:346 346 disable_bone_calculation(*K, false); (gdb) disable_bone_calculation (K=..., v=v@entry=false) at /home/jp3/Src/xray-16/src/xrGame/imotion_position.cpp:102 102 u16 bn = K.LL_BoneCount(); (gdb) Thread 1 "Primary thread" received signal SIGSEGV, Segmentation fault. _mi_free_generic (segment=0x555594000000, page=0x5554cb85c5db, is_local=false, p=0x55559567cf40) at /usr/src/debug/mimalloc/mimalloc/src/alloc.c:483 483 mi_block_t* const block = (mi_page_has_aligned(page) ? _mi_page_ptr_unalign(segment, page, p) : (mi_block_t*)p); (gdb) Thread 1 "Primary thread" received signal SIGSEGV, Segmentation fault. 0x00007ffff724dad3 in mi_page_has_aligned (page=) at /usr/src/debug/mimalloc/mimalloc/include/mimalloc-internal.h:633 633 return page->flags.x.has_aligned; (gdb) segmentation_fault_handler (signal=11) at /home/jp3/Src/xray-16/src/xrCore/xrDebug.cpp:919 919 static void segmentation_fault_handler(int signal) { handler_base("segmentation fault"); } (gdb) 0x00007ffff7d3ab04 in handler_base (reason=) at /home/jp3/Src/xray-16/src/xrCore/xrDebug.cpp:877 877 xrDebug::Fail(ignoreAlways, DEBUG_INFO, nullptr, reason, nullptr, nullptr); (gdb) 919 static void segmentation_fault_handler(int signal) { handler_base("segmentation fault"); } (gdb) handler_base (reason=0x7ffff7d6e29b "segmentation fault") at /home/jp3/Src/xray-16/src/xrCore/xrDebug.cpp:877 877 xrDebug::Fail(ignoreAlways, DEBUG_INFO, nullptr, reason, nullptr, nullptr); (gdb) ErrorLocation::ErrorLocation (function=, line=, file=, this=) at /home/jp3/Src/xray-16/src/xrCore/xrDebug.cpp:876 876 bool ignoreAlways = false; (gdb) 877 xrDebug::Fail(ignoreAlways, DEBUG_INFO, nullptr, reason, nullptr, nullptr); (gdb) ErrorLocation::ErrorLocation (function=0x7ffff7d6e248 "handler_base", line=877, file=0x7ffff7d6f788 "/home/jp3/Src/xray-16/src/xrCore/xrDebug.cpp", this=0x7ffffffee750) at /home/jp3/Src/xray-16/src/xrCore/xrDebug.h:37 37 File = file; (gdb) handler_base (reason=0x7ffff7d6e29b "segmentation fault") at /home/jp3/Src/xray-16/src/xrCore/xrDebug.h:38 38 Line = line; (gdb) 877 xrDebug::Fail(ignoreAlways, DEBUG_INFO, nullptr, reason, nullptr, nullptr); (gdb) 0x00007ffff7d3ab37 in ErrorLocation::ErrorLocation (function=0x7ffff7d6e248 "handler_base", line=877, file=0x7ffff7d6f788 "/home/jp3/Src/xray-16/src/xrCore/xrDebug.cpp", this=0x7ffffffee750) at /home/jp3/Src/xray-16/src/xrCore/xrDebug.h:39 39 Function = function; (gdb) 877 xrDebug::Fail(ignoreAlways, DEBUG_INFO, nullptr, reason, nullptr, nullptr); ```
jptrzy commented 1 year ago

For now I will just stop using mimalloc and compile xray-16 engine without it.

cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DMEMORY_ALLOCATOR=standard

Masterkatze commented 1 year ago

@jptrzy can you test it now? It should be fixed by #863

Xottab-DUTY commented 1 year ago

I assume this should be fixed with #863.