Log in or register to post comments

iOS - Memory Limit exceeded on initialization

September 26, 2021 - 7:29am #1

When building even a minimal demo app from the supplied sample scene with Vuforia 10.1.4 on Unity 2021.1.5f1 (also tried a few other versions with same result) and Xcode 13.0 (same thing with 12.4) then running the app on an iPhone will cause iOS to kill the app 3 out of 4 times because during initializiation it is trying to allocate more than 1450mb of memory - this happens in one of the Vuforia threads in chunks of about 3mb at a rate that is so fast (every frame?) that within a few seconds the limit will be reached.

This behavior can be reproduced on iOS versions ranging from 11.x to 14.8 - it does however not happen on every single startup of the app, and the exact same build that crashes far too often on iPhones (tested on 6 through 12 - no significant difference) will start fine on an iPad Pro.

Has anyone else seen this issue and does anyone know a possible fix for this?

iOS - Memory Limit exceeded on initialization

September 30, 2021 - 3:31am #4

Hello!

I wasn't able to produce a build that would crash 100% of the time, I ended up with around 80-90% - I tried running it through the Xcode 13 analyzer to get a screenshot of the memory allocations (those hundreds of 2.97mb mallocs coming from one of the vuforia labeled threads), but the crashes don't happen at all when the analyzer is attached, this was only possible with the previous version of Xcode for whatever reason but I didn't take a screenshot before updating unfortunately...

I did find a (somewhat not really satisfying) workaround though: by disabling the device pose tracking the application doesn't crash any more at startup.

I can try to recreate the demo project but the chances of crashing just the vanilla sample scene are not that high - only when creating more load at startup (in my case by loading around 100mb in two asset bundles in the Start() function of a script) the probability of crashing the app went up to a point where it would crash more or less consistently.

Kind regards

iOS - Memory Limit exceeded on initialization

September 28, 2021 - 8:10am #3

Could you provide the zipped minimal unity project that you used? Did you found a way where the crash happens 100% of the time?

 

Kind regards,

Patrick Scheper

Technical Community Manager

iOS - Memory Limit exceeded on initialization

September 28, 2021 - 6:49am #2

Hey there,

 

I've heard from another developer this week about a similar issue. I have raised this to our R&D and will be working closely to see if we can discover anything. 

 

Kind regards,

Patrick Scheper

Technical Community Manager

Log in or register to post comments