WASM error only on Android devices

When users use my application on Android, the user is stuck loading forever. There are no issues on desktop or iOS. After debugging I found that there were C errors in the console from Wasm.

It appears that WebGl has run out of memory on Android devices. A mesh fails to load, and then I receive multiple errors for malloc in the application. I would love to know if anyone else has came across errors like this, especially when loading a model with more than one UV space.

Details about this error are included below. Any suggestions are welcome :slight_smile:

2 Likes

A repro in the playground might help and this might need to wait a couple weeks for @bghgary to be back from vacations.

2 Likes

For me the error has specifically has come up on Android Chrome version 91, all other versions < and > 91 work fine, workaround for now was to either convert the mesh with compressionLevel 3 instead of the default 7, alternatively you can use the javascript decoder for draco instead of the wasm decoder till a solution is implemented.
My error was similar to this one though

5 Likes

Thank you so much for your suggestion. I did see issues in only the most recent Chrome version of 91, but I also viewed this issue in Opera & Dolphin Browser. Firefox was able to work but was not able to generate clear images.

My current hypothesis is that Android is not able to provide the resources required to run my application. I am utilizing 77MB in total when the page loads & I am expecting chrome to only be able to handle 64MB of memory on my Google Pixel 3.

When I am USB debugging on my phone & my Chrome tab has access to more memory, my application works just fine even in Chrome 91.

Are you able to share a repro?

1 Like

Repro: https://playground.babylonjs.com/#CQEEKE#11

After looking into this issue further, it seems to be an issue when loading the Draco compressed meshes. Grane was probably spot on with their suggestion.

1 Like

Adding @bghgary

Iā€™m guessing all these WASM issues with Android are all the same problem. See Intermittent load error for meshes on Android Chrome 91 - #11 by bghgary.

1 Like

FYI, Chrome 92 was deployed on Android and now the issue appears to be solved.

2 Likes