Repository: OpenXRay/xray-16

Issue #1731: [macOS] Fails to launch: Task Manager
Created: 2024-11-11T09:48:36Z
Describe the bug
Game fails to launch on macOS when the source code folder is not present.
To Reproduce
I usually create an app bundle for OpenXRay using this script.
After the app is bundled, the script will delete the xray-16 source code folder.
When trying to launch the game, it will fail to launch because it cannot find xray-16/src/xrCore/xrDebug.cpp, which no longer exists.
Additional information:
xrCore.dylib is present in the app bundle, and the xr_3da executable is able to find it there.
Terminal log:
Terminal Saved Output.txt
Desktop:

OS: macOS 15.1 Sequoia
Building directly from dev branch (11th November 2024)

Duplicate issue #1738: MacOS 15.1 arm64 crash 
Created: 2024-12-02T20:34:08Z
MacOS 15.1 arm64
fresh sources from master branch compile fine
When runnning following error is observed (Version from around may 2024 worked on the MacOS 14.5)
user@M2 Stalker % export DYLD_LIBRARY_PATH=$HOME/Games/Stalker
./xr_3da
~ Couldn't create surface from image: Parameter 'src' is invalid
OpenXRay Release Master Gold build 9430, Dec  2 2024 (Apple ARM 64-bit, shared)
Custom build from commit[ec2263a] branch[dev]
command line

CPU features: ARMSIMD, NEON
CPU threads: 8

Initializing File System...
Starting INPUT device...
$fs_root$ = /Users/user/Library/Application Support/GSC Game World/S.T.A.L.K.E.R. - Call of Pripyat/
using fs-ltx fsgame.ltx
FATAL ERROR
[error] Expression    : 
[error] Function      : xr_terminate
[error] File          : /Users/user/SRC/xray-16/src/xrCore/xrDebug.cpp
[error] Line          : 850
[error] Description   : Unexpected application termination
stack trace:
xrDebug::GatherInfo(char*, unsigned long, ErrorLocation const&, char const*, char const*, char const*, char const*)
xr_terminate()
std::__terminate(void ()())
std::terminate()
std::__1::condition_variable::__do_timed_wait(std::__1::unique_lockstd::__1::mutex&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>>)
TaskManager::TaskWorkerStart()
void std::__1::__thread_proxy[abi:ne180100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct>, std::__1::thread Threading::RunThread<void (TaskManager::)(), TaskManager>(char const*, void (TaskManager::&&)(), TaskManager&&)::'lambda'(void (TaskManager::&&)(), TaskManager&&), void (TaskManager::)(), TaskManager>>(void*)
7   libsystem_pthread.dylib             0x00000001977332e4 _pthread_start + 136
8   libsystem_pthread.dylib             0x000000019772e0fc thread_start + 8
FATAL ERROR
[error] Expression    : 
[error] Function      : xr_terminate
[error] File          : /Users/user/SRC/xray-16/src/xrCore/xrDebug.cpp
[error] Line          : 850
[error] Description   : Unexpected application termination
stack trace:
xrDebug::GatherInfo(char*, unsigned long, ErrorLocation const&, char const*, char const*, char const*, char const*)
xr_terminate()
std::__terminate(void ()())
std::terminate()
std::__1::condition_variable::__do_timed_wait(std::__1::unique_lockstd::__1::mutex&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>>)
TaskManager::TaskWorkerStart()
void std::__1::__thread_proxy[abi:ne180100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct>, std::__1::thread Threading::RunThread<void (TaskManager::)(), TaskManager>(char const*, void (TaskManager::&&)(), TaskManager&&)::'lambda'(void (TaskManager::&&)(), TaskManager&&), void (TaskManager::)(), TaskManager>>(void*)
7   libsystem_pthread.dylib             0x00000001977332e4 _pthread_start + 136
8   libsystem_pthread.dylib             0x000000019772e0fc thread_start + 8
FATAL ERROR
[error] Expression    : 
[error] Function      : xr_terminate
[error] File          : /Users/user/SRC/xray-16/src/xrCore/xrDebug.cpp
[error] Line          : 850
[error] Description   : Unexpected application termination
stack trace:
xrDebug::GatherInfo(char*, unsigned long, ErrorLocation const&, char const*, char const*, char const*, char const*)
xr_terminate()
std::__terminate(void ()())
std::terminate()
std::__1::condition_variable::__do_timed_wait(std::__1::unique_lockstd::__1::mutex&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>>)
TaskManager::TaskWorkerStart()
void std::__1::__thread_proxy[abi:ne180100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct>, std::__1::thread Threading::RunThread<void (TaskManager::)(), TaskManager>(char const*, void (TaskManager::&&)(), TaskManager&&)::'lambda'(void (TaskManager::&&)(), TaskManager&&), void (TaskManager::)(), TaskManager>>(void*)
7   libsystem_pthread.dylib             0x00000001977332e4 _pthread_start + 136
8   libsystem_pthread.dylib             0x000000019772e0fc thread_start + 8
FATAL ERROR
[error] Expression    : 
[error] Function      : xr_terminate
[error] File          : /Users/user/SRC/xray-16/src/xrCore/xrDebug.cpp
[error] Line          : 850
[error] Description   : Unexpected application termination
stack trace:
xrDebug::GatherInfo(char*, unsigned long, ErrorLocation const&, char const*, char const*, char const*, char const*)
xr_terminate()
std::__terminate(void ()())
std::terminate()
std::__1::condition_variable::__do_timed_wait(std::__1::unique_lockstd::__1::mutex&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l>>>)
TaskManager::TaskWorkerStart()
void std::__1::__thread_proxy[abi:ne180100]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct>, std::__1::thread Threading::RunThread<void (TaskManager::)(), TaskManager>(char const*, void (TaskManager::&&)(), TaskManager&&)::'lambda'(void (TaskManager::&&)(), TaskManager&&), void (TaskManager::)(), TaskManager>>(void*)
7   libsystem_pthread.dylib             0x00000001977332e4 _pthread_start + 136
8   libsystem_pthread.dylib             0x000000019772e0fc thread_start + 8
zsh: trace trap  ./xr_3da

Closing comment (2024-12-17T08:26:38Z): Duplicate of #1731