[C++] How to prevent crashes when programming in UE4?
Hi, I need to know if there is some sort of cheatsheet about prevent variables crashing the engine, this because some things are perfectly fine when compiling, but on press play they silently will crash the engine. I wish to know if for example variables have a check like:
TArray.isValid or isValid(pointer)
or something else.
I want to avoid the hassle to check on crashes everytime view symbols or write code that compile fine but fail everytime.
Thanks for helping me!
asked May 07 '19 at 08:04 AM in C++ Programming
The most common crash reason is nullptr instead of an actual object.
There are 2 main approaches I know:
For instance, if you're in
Though there are no such checks for structures, since they are always exist, just can be with default values – so you need to make some manual checks for structures, if it's needed.
Also you should add the
Another common crash reason is accessing a
Follow this question
Once you sign in you will be able to subscribe for any updates here