Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. We are making some changes to the DOTS forums.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Fatal error with WebGL running on 15.4?

Discussion in 'WebGL' started by OceanX000, Feb 23, 2022.

  1. OceanX000

    OceanX000

    Joined:
    Feb 24, 2021
    Posts:
    105
    Many of our games have inexplicable errors in iOS 15.4 beta after exporting and causing the game to terminate. It does not exist in iOS 15.3. Is the new system triggering a bug in the Unity WebGL project?
    This problem also occurs in Unity's demo in AssetStore:https://assetstore.unity.com/packag...ects/dragon-crashers-2d-sample-project-190721
    Compiled from Unity2021.2.11f, ran on iPhone13 promax(iOS 15.4)

    Safari attach and found these output:
    upload_2022-2-23_10-30-40.png

    upload_2022-2-23_10-28-2.png

    crash on devices:

    RuntimeError: call_indirect to a null table entry (evaluating 'dynCall_iiii(index,a1,a2,a3)')
    <?>.wasm-function[ObjectEqualityComparer_1__ctor_m31A73DFB6E768AC0B749A17F502B343A91560E5C_gshared@1059]@[wasm code]
    <?>.wasm-function[EqualityComparer_1_CreateComparer_mB4600D578DFB2B1E53856A884529A7ACC7E68099_gshared@80174]@[wasm code]
    <?>.wasm-function[EqualityComparer_1_get_Default_m4DCD22574964E960244B62B24E6C53C8DE825F74_gshared@989]@[wasm code]
    <?>.wasm-function[Dictionary_2__ctor_m05C159A58B61A348A5A54F0BC4CED1281E4BF69E_gshared@1511]@[wasm code]
    <?>.wasm-function[Renderer2DData__ctor_m613B88F45BD6377C103B8617C2922998EB48155A@66848]@[wasm code]
    <?>.wasm-function[RuntimeInvoker_TrueVoid_t4861ACF8F4594C3437BB48B6E56783494B843915(void (*)(), MethodInfo const*, void*, void**, void*)@63807]@[wasm code]
    <?>.wasm-function[il2cpp@9992]@[wasm code]
    <?>.wasm-function[dynCall_iiii@48368]@[wasm code]
    wasm-stub@[native code]
    invoke_iiii@https://www.oooceanworld.com/dragoncrash/Build/webgl.framework.js:3:446742
    <?>.wasm-function[dynCall_iiii@48368]@[wasm code]
    <?>.wasm-function[il2cpp@2209]@[wasm code]
    <?>.wasm-function[il2cpp@22628]@[wasm code]
    <?>.wasm-function[il2cpp_runtime_object_init_exception@13575]@[wasm code]
    <?>.wasm-function[SerializableManagedRef@15837]@[wasm code]
    <?>.wasm-function[PersistentManager@31442]@[wasm code]
    <?>.wasm-function[PersistentManager@11350]@[wasm code]
    <?>.wasm-function[PersistentManager@11351]@[wasm code]
    <?>.wasm-function[main@45456]@[wasm code]
    wasm-stub@[native code]

    upload_2022-2-23_10-32-11.jpeg

    Maybe it has nothing to do with the Unity version, because we have a project using Unity2019 also encountered. IL2CPP+WASM will encounter some problems with 15.4 safari?
     

    Attached Files:

    Last edited: Feb 23, 2022
    GroovyKoala likes this.
  2. OceanX000

    OceanX000

    Joined:
    Feb 24, 2021
    Posts:
    105
    Compiled with symbols embedded: upload_2022-2-23_20-30-39.png
     

    Attached Files:

  3. davidg_

    davidg_

    Joined:
    Feb 21, 2022
    Posts:
    4
    We're getting the exact same problem when running our games on mobile safari, on the iOS 15.4 beta. Works fine on iOS 15.3.
    No point in sharing our logs, since we're getting the exact same as @OceanX000 posted.
    The problem seems to appear when we add any kind of UI to a scene (regardless of if it's using OnGUI or a Canvas object).
    We've put together a clean sample project that triggers this crash (just the default scene with a UI image added to it, no change to the build options) - https://github.com/davidmmgo/UnityWebGLTest
     
  4. GroovyKoala

    GroovyKoala

    Joined:
    Feb 16, 2022
    Posts:
    18
    Hi there, having those same errors on iPhone SE running iOS 15.4 beta (19E5235a) while trying to load on Safari the simplest project @davidg_ describes above.

    Hope this is resolved soon.
     
  5. OceanX000

    OceanX000

    Joined:
    Feb 24, 2021
    Posts:
    105
  6. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    266
    I'll look into this.
     
  7. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    266
    I can confirm 15.4 is a mess. We'll see what we can do about it.
     
    fortis_cb likes this.
  8. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    266
    I've filed the issue with Apple, who are looking into it.
     
    GroovyKoala and OceanX000 like this.
  9. OceanX000

    OceanX000

    Joined:
    Feb 24, 2021
    Posts:
    105
    Really appreciate the quick reply, can this issue be fixed before the official release of 15.4? We still have a large number of iOS users.
     
  10. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    266
    This is an iOS issue outside of our control, appearing to be related to WebKit loading/executing WASM. It's currently marked as a P1/Major issue. I certainly hope Apple will resolve it before releasing 15.4.
     
    GroovyKoala likes this.
  11. OceanX000

    OceanX000

    Joined:
    Feb 24, 2021
    Posts:
    105
    Got it, thanks in advance
     
  12. GroovyKoala

    GroovyKoala

    Joined:
    Feb 16, 2022
    Posts:
    18
    Thanks!
     
  13. M-SugayaTakuma

    M-SugayaTakuma

    Joined:
    Apr 9, 2020
    Posts:
    9
    This issue has not been resolved with the release of iOS 15.4.
    The issue is not registered in Unity IssueTracker, is Unity Technologies aware of the situation and can they proceed to address it?
    If you need more information, we can help.
    Thank you.
     
    GroovyKoala likes this.
  14. bogdan-serbanescu

    bogdan-serbanescu

    Joined:
    Jun 14, 2017
    Posts:
    18
    We also ran into this showstopper bug on iOS15.4. @brendanduncan_u3d do you have any updates on the bug that's on Apple's side now? Did they have an ETA on when that's going to make it into a patch? In the meantime, did anyone find any workarounds for this bug?
     
  15. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    266
    @bogdan-serbanescu Sorry, Apple hasn't been giving any updates. We're working as hard as we can to find a solution or workaround.
     
    GroovyKoala likes this.
  16. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    266
    @M-SugayaTakuma
    We are very aware of this problem and are working as hard as we can on trying to find a solution. We do not have an ETA. The problem is coming from memory corruption from the WASM VM on iOS 15.4. We have a ticket filed with Apple, have been pushing them as much as we can, and are working on trying to find a solution and/or workaround on our side if at all possible.
     
    M-SugayaTakuma likes this.
  17. M-SugayaTakuma

    M-SugayaTakuma

    Joined:
    Apr 9, 2020
    Posts:
    9
    @brendanduncan_u3d
    I appreciate that you are doing everything in your power to investigate a solution.
    However, it seems that Apple will need to resolve the underlying issue, is there any action we can take to get Apple to respond?
    I am frustrated that Apple has not responded in any way.
     
  18. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    266
    @M-SugayaTakuma We're doing everything we can. Believe me, I'm frustrated too.
     
    GroovyKoala likes this.
  19. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    266
    I am seeing some promising results from investigating if there's anything Unity can do to get around the WASM issue. I have found a file that I can swap out during the compilation process, and at least initial tests have eliminated the crash. So there is at least hope of a solution, even without Apple getting their stuff together.

    That said, there are other issues with iOS 15.4 WebKit besides the WASM crash. There were several serious WebGL graphics regressions, which have been affecting the other WebGL engines too.

    So, we are all in a generally bad point in time for Web on Apple, but I know a number of the WebGL graphics issues have already been patched in Apple's WebGL implementation, and there's hope for the WASM issue, so hopefully this point point in time will be short.
     
    GroovyKoala likes this.
  20. george_playbite

    george_playbite

    Joined:
    Sep 27, 2018
    Posts:
    26
  21. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    266