Open jacopomaroli opened 4 years ago
Hey @jacopomaroli sorry for late response. Keep checking this project as I'm currently updating RTS dependency of https://github.com/npruehs/ue4-rts/ as a plugin. After latest version of this plugin is linked in project, errors like this should be gone. Have a good one ☺️
Describe the bug
PlayerResourcesComponent
member is set in the constructor of theARTSPlayerController
and gets dereferenced before hittingvoid ARTSPlayerController::BeginPlay()
in fileTrumpDefense2020\TD2020\Plugins\RealTimeStrategy\Source\RealTimeStrategy\Private\RTSPlayerController.cpp
To Reproduce Steps to reproduce the behavior:
Expected behavior It shouldn't crash
Screenshots N/A
Desktop (please complete the following information):
Additional context When you run the project from visual studio and hit the run in viewport preview mode in UE UI, you can set a breakpoint in the ARTSPlayerController constructor. This allows you to set another breakpoint when PlayerResourcesComponent variable changes (Debug-> New Breakpoint -> Data Breakpoint...: 4 bytes) This leads to a breakpoint in
vcruntime140.dll!memcpy() Line 244
and if you download the debug symbols you'll find the code where it breaks is thiswith the following callstack
this issue could be entirely due to ue4-rts but I thought checking with you first as it seems rather easy to incour into and it seems weird no one experienced it before.
I think it could be due to the fact that
PlayerResourcesComponent
gets garbage collected by UE as it's not used but that's just a wild guess based on what I read from other similar issuesTBH while compiling this issue I realized this specific commit was fiddling with something around resources so that could be the culprit... https://github.com/npruehs/ue4-rts/commit/fdcb8ae4b3810b5a9c4dbae00084404815845797 Anyhow it would be great knowing what's the hash of ue4-rts which is needed to make the project work
P.S. awesome project BTW, very inspiring. Keep it up!