Detanup01 / gbe_fork

Fork of https://gitlab.com/Mr_Goldberg/goldberg_emulator
https://gitlab.com/Mr_Goldberg/goldberg_emulator
GNU Lesser General Public License v3.0
280 stars 49 forks source link

[Overlay] Cannot create hook in Linux #92

Open Edremon opened 2 days ago

Edremon commented 2 days ago

In release build, overlay is not showing up. With debug build, game segfault when overlay is enabled.

The backtrace is:

#0  0xdcc12927 in std::once_flag::_Prepare_execution::_Prepare_execution<std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::{lambda()#1}>(void (std::__future_base::_State_baseV2::*&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*))::{lambda()#1}::_FUN() () from /Half-Life 2/bin/libsteam_api.so
#1  0xf7d5f9e0 in ?? () from /usr/lib32/libc.so.6
#2  0xf7d5fa69 in pthread_once () from /usr/lib32/libc.so.6
#3  0xdcc13d78 in std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<InGameOverlay::RendererDetector_t::DetectRenderer(std::chrono::duration<long long, std::ratio<1ll, 1000ll> >, InGameOverlay::RendererHookType_t, bool)::{lambda()#1}> >, InGameOverlay::RendererHook_t*>::_M_run() () from /Half-Life 2/bin/libsteam_api.so
#4  0xe8db21f1 in std::execute_native_thread_routine (__p=0x568f77c0) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104
#5  0xf7d59e5e in ?? () from /usr/lib32/libc.so.6
#6  0xf7e0cff8 in ?? () from /usr/lib32/libc.so.6

If launching the game with -vulkan, #93 fix and overlay enabled, it will also segfault in release build, debug build in this case have the same backtrace.

Detanup01 commented 2 days ago

Preparing full build. Check with this https://github.com/Detanup01/gbe_fork/actions/runs/11981263769 and close or add 'bug' label

Edremon commented 2 days ago

Check with this https://github.com/Detanup01/gbe_fork/actions/runs/11981263769

I made those PR, I obviously tested with them.

close or add 'bug' label

I can't add label, only maintainers can.

Detanup01 commented 2 days ago
  1. Thanks so can close this :)

  2. Fuck and sad.

Edremon commented 2 days ago

When I said tested, I mean that the current state of this issue is still the same, well one was needed to actually build the emulator and the other was referenced in my previous edit to be able to run with -vulkan and see that the same problem occur.

Detanup01 commented 2 days ago

Its too late for me, sry. Also I have 0 experience on linux crashes, errors, bugs, you name it. Maybe debug build tell more where, what address, proper code place it causing issues?

Edremon commented 2 days ago

Weirdly enough, I can't reproduce the segfault, I haven't changed anything as far as I'm aware. But, overlay is still not showing. Log from ingame_overlay are the following:

Vulkan

[trace] - operator(){463} - Started renderer detection.
[info] - _HookVulkan{362} - Hooked vkQueuePresentKHR to detect Vulkan
[error] - _HookVulkan{379} - Failed to hook _VkQueuePresentKHR
[info] - ~VulkanHook_t{1066} - VulkanHook_t Hook removed
[trace] - operator(){519} - Renderer detection done 0x0.

OpenGL

[trace] - operator(){463} - started renderer detection.
[info] - _hookopenglx{335} - hooked glxswapbuffers to detect openglx
[error] - _hookopenglx{345} - failed to hook _glxswapbuffers
[info] - ~openglxhook_t{188} - openglx hook removed
[trace] - operator(){519} - renderer detection done 0x0.
Detanup01 commented 1 day ago

Well since its overlay issue I cant do shit. Test NOT valve games (if even works and only HL2/OV issue). It known that Valve games has issues with overlay.

Edremon commented 16 hours ago

I don't think I have any other steam linux native game. I also opened an issue at ingame_overlay: https://github.com/Nemirtingas/ingame_overlay/issues/47