Mobile Crafting Crash Fixed?
Good news, everyone! I think I've found and fixed the random crafting crash bug on mobile! And that might be the only thing of consequence I've done today.
Still, though, this was one of the most oft-reported issues on either platform. "Game crashes constantly," and "crashes after a few turns," and "sometimes crashes, usually during crafting" were some of the only clues I had to go on, until this one Google user:
So I did some testing with the recipes. Turns out clicking alot of them does nothing so that's not it. But there are 4 recipes that crash the game every time I click on them. They are: Food - cured small meat over fire Food - roasted meat on a stick Food - sterilized water (boiled) Food - sterilized water (pill) Maybe they are just too complicated for my phone to read. Either way Ill be avoiding them :)
Oh this is my favorite user right now. It turns out to be a bit more complicated than the above, but this clue led me down the correct path.
The problem stems from a memory leak optimization I made months ago in crafting. When a container is used in crafting, the stuff inside needs to get removed from the container and placed on the ground, so it doesn't get deleted. One bug already addressed this issue, but this crashing bug was a second case.
You see, for some reason I took the contents of said container, and decided to clone them, place the clones on the ground, and delete the originals. And the game did not like this. Not one bit. Just about anything the player did next would crash the game.
And to make matters worse, this doesn't happen all the time. Some combinations of containers and contents are actually fine. But this one save game I was playing had just the right combo of items to trigger it 100% of the times I tried.
And in the end, the fix? Don't clone the contents, and just re-place the original contents on the ground. Simple as that. Typical NEO Scavenger bug: weeks to find, and seconds to fix :)