ra2yrcpp icon indicating copy to clipboard operation
ra2yrcpp copied to clipboard

std::out_of_range when accessing SaveTrafficData object

Open shmocz opened this issue 1 year ago • 0 comments

ServiceData objects are deinitialized in ExitGameLoop hook: https://github.com/shmocz/ra2yrcpp/blob/21491da68f2ba8d0a8dff0d9b175b9fd3b98e69b/src/hooks_yr.cpp#L388-L400

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.

shmocz avatar Feb 04 '25 12:02 shmocz