Search Unity

Help Wanted Memory Issue iOS 13 and earlier

Discussion in 'Project Tiny' started by AlexisSphero, Apr 19, 2021.

  1. AlexisSphero


    Oct 29, 2020
    We've been working on a project using Tiny and the Wasm build system. As we started testing on more devices we noticed that it doesn't seem to run on iOS 13 or earlier. The page starts to load but we end up with what appears to be a memory error. Something about enlarging memory arrays, and abortOnCannotGrowMemory. I've added a screen shot since I don't see the errors in Unity's logs.

    I tried building as AsmJs as well but run into the same issues. I've tried stripping down the project to make it as minimal as possible to see if I can identify where the memory issue is, but I haven't had any luck. My best guess is that it's related to textures because as things load I do see the objects come in as untextured before the error happens.

    Our QA team has seen this on actual devices, and I've been able to replicate it on iOS simulators through XCode. Are there any other tools I can use to profile memory issues? And any ideas what might be causing it to not run on older iOS versions. According to the Getting Started both AsmJs and Wasm should run on iOS 10+.

    Attached Files:

  2. tonialatalo


    Apr 23, 2015
    I think the ability to grow the memory arrays is a feature of the WASM implementation, and that it was not available everywhere early on. So maybe older iOS Safari just does not support the memory growing?

    It's not necessarily about the amount of memory you use, but the use of the API in browser .. if it always initializes somehow and then asks to increase mem. Am not sure. It can be also that it grows on demand and using a little can help. In normal Unity WebGL builds I think it might be an option whether you allocate statically or use the later feature to grow the mem space.