Hi,
Currently my app crashes when in the middle of loading a level due to hitting above 650 MB on iOS, according to the jetsam error log. It can be more or less reliably reproduced by cycling through several levels one after the other, about 4 times.
Logs show that the app crashes in the middle of loading shaders, with these lines:
LogMetal:Display: Loaded a non-offline compiled shader (will be slower to load)
What is odd is that the levels must be loaded after each other for the bug to occur. If the level itself is loaded after the intro level, it does not crash. If I turn off Metal, it also ceases to crash (or has a much higher ceiling of repetitive level loading that I have not reached in testing).
I have tried methods such as instituting a 100MB limited texture streaming pool, making the levels stream into a common ‘container’ level, and trying to make sure my UMG widgets are not the cause by storing them in GameInstance. The former only extends the number of cycles the level loading can go through before crashing, and the other two don’t seem to have any effect. Monitoring the app using Instruments-Allocations indicates that for All Heap & Anonymous VM, persistent bytes are only about 23.7 MB.
This amount is also inconsistent viz Jetsam’s logs. Monitoring using Allocations, All Heap & Anonymous VM indicates 18.96 MB persistent bytes, but the app crashes and Jetsam logs indicate 166402 rpages (650MB almost exactly), and it having been terminated for “per-process-limit”. The log does indicate a memory warning is received. Can UE4 react to this in any way?
Attached is the UE4 log:link text
Do metal shaders really take up so much memory? Is there any way to ensure that all assets and data from previous levels are cleared completely?