Closed Waffle1434 closed 1 year ago
Please debug at the assembly level to determine the crash. It's not uncommon for the debugger to not be able to read object layouts in memory so seeing errors trying to read the map could be unrelated. Also ensure the headers you're using match the Library version you are linking, if you're using vcpkg for example, ensure you're not accidentally including headers from a clone of this master as the versions differ.
First thing I'd try is making your map global, it's taken by reference so could be being destructed in the local scope, somehow.
I am absolutely losing my mind. I tried to hook a DirectX 11 function based off https://github.com/stevemk14ebr/PolyHook_2_0/blob/master/UnitTests/windows/TestVFuncSwapHook.cpp
Before constructing
VFuncSwapHook hook
,redir
map is valid: The moment it enters the constructor,redir
which should have been passed by reference is completely invalid: The program crashes onm_redirectMap(redirectMap)
as it appears to be trying to construct a map based on an invalid map. I am running in x64 debug mode, no optimizations should be applied here.