Repository: OpenXRay/xray-16

Issue #1193: [CoP] Build Release doesn't starts on Arch Linux after mimalloc update
Created: 2022-12-26T07:59:16Z
Describe the bug
On latest dev branch I cannot run CoP. Engine crashes with segmentation fault.
To Reproduce
Steps to reproduce the behavior:

Update dev branch
Configure Release build
Compile Release
Run
See logs

Expected behavior
The game start successful
Screenshots
log
openxray_ruut.log
! Couldn't create surface from image: Parameter 'src' is invalid
OpenXRay Release build 8724, Dec 26 2022 (Linux 64-bit, shared)
Custom build from commit[dee5323de20e6815250cee7da3187e6406b5891a] branch[dev]
 
command line -nointro -fsltx /run/media/ruut/99c9b836-a7b8-403c-9ef8-5bfc1e1ec831/games/stalker/CoP/fsgame.ltx 

* CPU features: RDTSC, MMX, SSE, AVX
* CPU threads: 8

Initializing File System...
$fs_root$ = /run/media/ruut/99c9b836-a7b8-403c-9ef8-5bfc1e1ec831/games/stalker/CoP
using fs-ltx /run/media/ruut/99c9b836-a7b8-403c-9ef8-5bfc1e1ec831/games/stalker/CoP/fsgame.ltx
FS: 39682 files cached 28 archives, 20Kb memory used.
Init FileSystem 0.398881 sec
-----loading \run\media\ruut\99c9b836-a7b8-403c-9ef8-5bfc1e1ec831\games\stalker\CoP\gamedata\configs\system.ltx
-----loading \run\media\ruut\99c9b836-a7b8-403c-9ef8-5bfc1e1ec831\games\stalker\CoP\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"...
[\run\media\ruut\99c9b836-a7b8-403c-9ef8-5bfc1e1ec831\games\stalker\CoP\appdata\user.ltx] successfully loaded.
Selected renderer: renderer_rgl
Loading module: xrGame
Initializing Engine...
SOUND: OpenAL: enumerate devices...
SOUND: OpenAL: EnumerationExtension Present
SOUND: OpenAL: system default sound device name is OpenAL Soft
SOUND: OpenAL: All available devices:
1. OpenAL Soft, Spec Version 1.1 (default) eax[0] efx[yes] xram[no]
Executing config-script "\run\media\ruut\99c9b836-a7b8-403c-9ef8-5bfc1e1ec831\games\stalker\CoP\gamedata\configs\default_controls.ltx"...
 
FATAL ERROR
 
[error] Expression    : <no expression>
[error] Function      : handler_base
[error] File          : /home/ruut/Documents/qemu_shared/xray-16/src/xrCore/xrDebug.cpp
[error] Line          : 866
[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*)
/home/ruut/Documents/qemu_shared/xray-16/bin/x64/Release/xrCore.so(+0x3f8f7) [0x7f62e93458f7]
/usr/lib/libc.so.6(+0x38a00) [0x7f62e8b69a00]
operator delete(void*)
StringFromUTF8[abi:cxx11](char const*, std::locale const&)
KbdKeyToButtonName(int, std::__cxx11::basic_string<char, std::char_traits<char>, xalloc<char> >&)
CInput::GetKeyName(int, char*, int)
/home/ruut/Documents/qemu_shared/xray-16/bin/x64/Release/xrEngine.so(+0x8f22f) [0x7f62e955e22f]
CCC_Bind::Execute(char const*)
CConsole::ExecuteCommand(char const*, bool)
CCC_LoadCFG::Execute(char const*)
CConsole::ExecuteCommand(char const*, bool)
CCC_DefControls::Execute(char const*)
CConsole::ExecuteCommand(char const*, bool)
execUserScript()
Startup()
RunApplication()
./bin/x64/Release/xr_3da(+0x16ad) [0x557172ead6ad]
./bin/x64/Release/xr_3da(+0x13ef) [0x557172ead3ef]


Desktop (please complete the following information):

OS: Arch linux
OpenXRay build version commit: dee5323

Additional context
$ uname -a
Linux ruut 6.0.12-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Thu, 08 Dec 2022 11:03:40 +0000 x86_64 GNU/Linux

$ yay -Qsq mimalloc
local/mimalloc 2.0.7-1

Duplicate issue #1197: Linux - segmentation fault at launch after mimalloc
Created: 2022-12-27T02:17:28Z
Describe the bug
launching the engine gets a segfault
To Reproduce
just laucnh the engine... $ xr_3da
BugTrap error report
CLICK ME


$ xr_3da 
! Couldn't create surface from image: Parameter 'src' is invalid
OpenXRay Release Master Gold build 8725, Dec 27 2022 (Linux 64-bit, shared)
Custom build from commit[16c8717ac8e17796b3ee55d58fc96e6e8b764763] branch[dev]
 
command line 

* CPU features: RDTSC, MMX, SSE, AVX
* CPU threads: 8

Initializing File System...
$fs_root$ = /home/biel/.local/share/GSC Game World/S.T.A.L.K.E.R. - Call of Pripyat/
using fs-ltx fsgame.ltx
FS: 40598 files cached 29 archives, 14Kb memory used.
Init FileSystem 0.340334 sec
-----loading \home\biel\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\gamedata\configs\system.ltx
-----loading \home\biel\.local\share\GSC Game World\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\biel\.local\share\GSC Game World\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\biel\.local\share\GSC Game World\S.T.A.L.K.E.R. - Call of Pripyat\gamedata\configs\default_controls.ltx"...
mimalloc: warning: mi_free: pointer might not point to a valid heap region: 0x5568c9ebaa00
(this may still be a valid very large allocation (over 64MiB))
 
FATAL ERROR
 
[error] Expression    : <no expression>
[error] Function      : handler_base
[error] File          : /home/biel/code/xray/OpenXRay/src/xrCore/xrDebug.cpp
[error] Line          : 866
[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(+0x4330b) [0x7f41bf84430b]
/lib/x86_64-linux-gnu/libc.so.6(+0x3bcf0) [0x7f41bec3bcf0]
/lib/x86_64-linux-gnu/libmimalloc.so.2(__libc_free+0x209) [0x7f41bef862f9]
StringFromUTF8[abi:cxx11](char const*, std::locale const&)
KbdKeyToButtonName(int, std::__cxx11::basic_string<char, std::char_traits<char>, xalloc<char> >&)
CInput::GetKeyName(int, char*, int)
/lib/x86_64-linux-gnu/xrEngine.so(+0x9629e) [0x7f41bfa6429e]
CCC_Bind::Execute(char const*)
CConsole::ExecuteCommand(char const*, bool)
CCC_LoadCFG::Execute(char const*)
CConsole::ExecuteCommand(char const*, bool)
CCC_DefControls::Execute(char const*)
CConsole::ExecuteCommand(char const*, bool)
execUserScript()
Startup()
RunApplication()
xr_3da(+0x18a6) [0x5568c958b8a6]
xr_3da(+0x15df) [0x5568c958b5df]
mimalloc: warning: mi_free: pointer might not point to a valid heap region: 0x5568c9eb9a70
(this may still be a valid very large allocation (over 64MiB))
Violació de segment (s'ha bolcat la memòria)





Desktop (please co```mplete the following information):

OS: [Linux 22.10]
OpenXRay  [16c8717]

Closing comment (2022-12-27T11:26:43Z): Duplicate of #1193