ENGINE CRASHES sometimes with my actor class: "ACCESS VIOLATION"
When the Engine crashes I get this error:
In my Projectile.cpp I have this:
What could the reason be? It says "Access violation", but why?
Also, keep in mind this crash happens RARELY and not everytime a Missile that I shoot explodes.
I was finally able to get the crash to occur after deleting the project and unzipping it again. By removing the 'else' from DestroyProjectile() but leaving in the debug message, I found that the DestoryProjectile() function is being called twice when a rocket is destroyed. The crash is occurring on the second call to the function which seems to indicate that when the call is made the second time the object has already been destroyed, and looking for the movement component or comparing the explosion variables is being done on an object that no longer exists. Ensuring that the function is only called once per rocket should prevent the crash from occurring.
answered May 23 '16 at 08:59 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here