Casting AActor* to PlayerClass* - Engine crash
First off hello, this is my first post here, hope I make it understandable enough.
I tried to find someone with a similar problem to mine (not just on here) but I sadly didn't find anything.
So I'm making my own post.
The problem is that the engine crashes every time my code gets to the line that has the Cast method on it.
Sadly the crash report doesn't give me any information.
This also happened on 4.16, so I can safely assume that it's me that is doing something wrong, since I just recently started working with UE4.
If you need more information I'd be happy to answer any questions.
Thanks in advance!
asked May 26 '17 at 11:45 PM in C++ Programming
Hey I found the solution for my problem.
I should really read up more on the Software I'm working with, maybe then I would've known that Unreal has built in Garbage collection.
So my problem was that I attempted to delete a bunch of things I shouldn't delete (apparently) because it'll make the Editor crash.
Don't know what to say, I only have myself to blame for this.
Learn from my mistakes. lmao
Anyway, thanks to anyone that tried to help me, I really appreciate you guys.
answered May 27 '17 at 01:54 AM
Instead of answering directly I'm gonna show you a very useful tool to help you find the problems generated by this kind of issues, in VS you can go into
Now for the answer to your question, I assume that the cast fails (since you seem pretty sure about the game breaking when it reaches your line of code), try using an
If you already knew about attaching to process from VS then I apologize and hope that someone else finds this information useful in the future :)
Follow this question
Once you sign in you will be able to subscribe for any updates here