ServiceData objects are deinitialized in ExitGameLoop hook:
|
DEFINE_HOOK(0x72dfb0, ExitGameLoop, 0x6) { |
|
(void)R; |
|
auto [mut, M] = MainData::acquire(); |
|
|
|
GameCommandData::get()->game_state()->set_stage( |
|
ra2yrproto::ra2yr::STAGE_EXIT_GAME); |
|
M->deinitialize_service_datas(); |
|
|
|
// Flush output in case the process is not terminated gracefully. |
|
std::cerr << std::flush; |
|
std::cout << std::flush; |
|
return 0U; |
|
} |
However, calls to TunnelSendTo and TunnelRecvFrom are still happening, causing std::out_of_range to be thrown in the respective hooks.
Solution is to perform ServiceData deinitialization elsewhere when tunnel related recvs/sends are no longer occurring.
ServiceData objects are deinitialized in
ExitGameLoophook:ra2yrcpp/src/hooks_yr.cpp
Lines 388 to 400 in 21491da
However, calls to
TunnelSendToandTunnelRecvFromare still happening, causingstd::out_of_rangeto be thrown in the respective hooks.Solution is to perform ServiceData deinitialization elsewhere when tunnel related recvs/sends are no longer occurring.