Error messages not showing on some configurations

After a lot of debugging I have finally found the cause of a game breaking issue, and I’m curious if this troubleshooting process can be made shorter.

The symptom: One of the levels won’t load on device on Testflight or Google Play Internal testing. The level loads fine when built from Defold, including when built to a debug build on device.

There are no errors when built locally or from Android, but when testing on iOS console (of course I tested this last…) the error revealed itself:

* ERROR:RESOURCE: The max number of resources (2048) has been passed, tweak "resource.max_resources" in the config file.

This makes sense, it’s a resource hungry game and now I can easily fix the problem by following those instructions.

My question is: With the same code base, why does the error only appear on iOS debug, and not Android debug or testing locally? And why doesn’t it consistently fail? There is nothing random about the level itself, it is static and should require the same amount of resources.

Could it be that there’s a difference on how resources are unloaded?

What does the web profiler say?
There you can see what resources are loaded, and that may give you a hint?

1 Like

That’s a good point. I use Monarch, which I believe loads and unloads things asynchronously, which might mean that some resources linger a bit longer in some cases.

I did have a look at that, but I wasn’t able to see a total resources counter? There are hundreds and hundreds of lines, so a bit of work to tot it all up manually.

Sure, a counter is probaly helpful.
But I think the main thing to look for is “should this resource really be loaded at this time?”

1 Like

Looking through the list, it all looks good. And by “good” I mean it makes sense, and the resources that are there should be there - this game just uses a lot of them. :slight_smile:

Check out the output, saved from Chrome: Dynamo Profiler.html.zip (56.0 KB)

1 Like

It also reminds me of my investigations into the archive/manifest format.
All the embedded gameobjects/components result in unique files on disc, which may result in an unnecessary amount of files. This would require you to increase the number of resources.

And, for the differences between platforms, it might just be that you’re just below the limit on the working platforms.

I have added issue 5809 for this.

The workaround for the time being, is ofc to increase that number in the settings.

1 Like

That’s a delicious theory, which I’ll choose to believe! Maybe it would be a good idea to back and compare resource counts again once that issue is in the bag.

1 Like