Search Unity

Bug Web build on iphone refreshing page

Discussion in 'Project Tiny' started by Saaskun, Nov 10, 2020.

  1. Saaskun

    Saaskun

    Joined:
    Nov 29, 2019
    Posts:
    24
    Hi, I have a problem testing the Tiny Racing demo on an iPhone.

    I used the last Github sample with the Wasm build, works fine in desktop and Android but in iphone the page refresh after some seconds of playing. However the Unity sample works fine in all devices: https://tiny.vision/demos/TinyRacing

    Any idea whats happening?

    Unity 2020.1.11
    Project Tiny 0.31.0-preview.26
    Tested with Asmjs and Wasm

    Update: I changed the Wasm Stack Size to 1024KG and memory size to 256MB with no success

    Update2: Out of memory message after updating the page multiple times on iphone

     
    Last edited: Nov 11, 2020
  2. Zindea

    Zindea

    Joined:
    Mar 8, 2015
    Posts:
    25
    I am having a similar problem that only happens on Iphones. I am using a modified TinyRacing Demo too. If you find something please share it :)
     
    Saaskun likes this.
  3. Saaskun

    Saaskun

    Joined:
    Nov 29, 2019
    Posts:
    24
    It works if you change the Wasm stack size to 1024KB and Wasm Memory Size to 512MB. However it crash at the ending haha

    Edit: Nevermind, yesterday I modify something and it works haha.. now it is refreshing again :(
     
    Last edited: Nov 11, 2020
  4. Saaskun

    Saaskun

    Joined:
    Nov 29, 2019
    Posts:
    24
    With the 0.29.0 version I change the memory of the Emscripten Settings to: -s TOTAL_MEMORY=1024MB
    Works fine on iphone! (if you don't refresh the page manually) but on Andorid don't run (too much memory)
     
  5. Zindea

    Zindea

    Joined:
    Mar 8, 2015
    Posts:
    25
    The Emscripten Setting
    really increases the time my can can run but still.... after around 2 minutes it goes into a blackscreen. That is my problem. Tested it on my Android. Doesnt work there now.

    It seems like the memory on Iphones doesnt get controlled correctly
     
    Saaskun likes this.
  6. AbdulAlgharbi

    AbdulAlgharbi

    Unity Technologies

    Joined:
    Jul 27, 2018
    Posts:
    319
    Make sure to disable the scripting debugger
    Add il2cpp settings and set script debugging to Disabled
    There are some memory issues with the debugger and we are fixing them in the next release

    upload_2020-11-16_15-44-52.png
     
    Saaskun likes this.
  7. Saaskun

    Saaskun

    Joined:
    Nov 29, 2019
    Posts:
    24
    Thanks!!
     
  8. tmars

    tmars

    Joined:
    Jul 26, 2013
    Posts:
    28
    No luck with disabling the debugger, unfortunately. Older iOS devices are constantly refreshing after 4-5 seconds even in your own examples.
     
  9. AbdulAlgharbi

    AbdulAlgharbi

    Unity Technologies

    Joined:
    Jul 27, 2018
    Posts:
    319
    Can you share what iOS version and device you have?
    Thanks
     
  10. Saaskun

    Saaskun

    Joined:
    Nov 29, 2019
    Posts:
    24
    Yesterday worked fine (but strangely the phone didn't render the particles in Tiny Racing), however today I tested again (with an iphone XR) and it refreshed.
    The refresh time varies between 5 seconds and 2 minutes of gameplay.

    Also tested with an iphone 8 and XS with the same behaviour.
     
  11. Saaskun

    Saaskun

    Joined:
    Nov 29, 2019
    Posts:
    24
    I think the problem is with the particle system.
    I disabled all the Tiny Race particles (smoke and explosion) and it runs without any problem of refreshing/memory
    @tmars Can you try that too?
     
  12. tmars

    tmars

    Joined:
    Jul 26, 2013
    Posts:
    28
    tested on iPhone 7 / iOS 13, iPhone X / iOS 13, iPhone 11 Pro Max / iOS 14, iPhone 12 Pro Max / iOS 14 - all the same, refreshing after few seconds.
     
unityunity