Why does my game crash only on Android?

This is because the actors that (we think) you aren’t destroying get destroyed when you destroy the level. It’s all contained in the level so all reference are released – which is why I suggested trying that test.

So if we’re sure that this is an accumulation over time then we can try to figure out what isn’t getting cleaned up. First you should obviously be destroying the enemy actors after they are killed. Beyond that I suggest you check the places where you spawn sub-actors (like weapons). Make sure you destroy those actors in the EndPlay of the actor that contains them. Also check bullets or other little things like that. Side-tip: don’t do a whole lot of changes before making sure you didn’t break something. Make a few changes and test. Good luck!

Still let me know about the suicide test. If the problem is what we believe it to be then you should be able to run it on PC and see the memory usage going up (it may go down a little here and there, but overall it should always trend up).

Alright…the suicide test. Turns out the memory usage goes up but caps at 665.5 - 665.6 MB. Maybe Garbage Collection is not fast enough. I will try to lower down the default purging time from 60 seconds to 1 second.

EDIT: Memory usage actually goes up when I kill an enemy using the default projectile.

It’s going to be hard to help you without seeing the project. If the suicide test caps out then it’s not a leak – at least, up to the point that they kill themselves. So I’d guess there’s something happening when the projectile is involved that isn’t happening when they kill themselves. Or the leak is in the projectile code itself. Are you spawning a lot of them? What about effects when they hit or muzzle flashes? Try just shooting a lot and make everyone unkillable. And I don’t suppose in the editor’s World Outliner, the actor count keeps going up. That would be too easy.

We should take this out of the forums. Message me.

I am sorry to reply so late. I was out in town. Sure,we can take this out of the forums…how can I reach you? By actor count what do you mean? Because actor count is alright but the suffix of the actor name keeps going up. I installed Deleaker hoping that it might help me but it barely gave me any new clues.

I have the same name on the UE4 forum (https://forums.unrealengine.com). Just send me a private message.

Guys, any updates ?