iOS/iPadOS 16.3 WebGL via Metal Feature issue

The same iPad Air3, iPad OS 16.3.1, try refreshing multiple times? It seems like there will be a black screen :no_mouth:I tested it on iPad Pro,this problem does not occur on iPad Pro

I wonder if it’s related to: Refreshing the launch tab causes the memory usage to increase until it runs out of memory · Issue #998 · playcanvas/editor · GitHub

Created a ticket about this:

Looks like it could be a hosting issue on our side (still not 100% sure) as a self hosted build is fine.

Updated ticket on findings: Possible memory leak when refreshing the page · Issue #1006 · playcanvas/editor · GitHub

Self hosted build to test: test 16.3.1 vConsole

1 Like

Looking forward to your good news :smiley:

I couldn’t get the iframeless version of the build to crash on iOS after reloading the page for several minutes (note the added /e)

Looks like it’s an issue with iframes or our specific iframe :thinking:

I just tried your link, and there were no problems opening it for the first time and frequently refreshing it multiple times.How did you do this? Some of the projects I packaged will also appear black screen. How can I solve this problem?

By default, the publish URL uses an iframe which I believe is causing the issue.

If you look at the URL I recently posted, you can see where I add an extra /e to the publish URL. The removes the iframe.

I packaged it and published it on my own server. There is no iframe on the server, but it still black screen

Is that after closing Safari and reloading? Can you share the URL via DM for me to look at?

iPad Air3 will appear black screen when it first opens a link or refreshes multiple times.I send you a link by DM

It loads fine on my iPhone XR device.

I do see that you are using PNGs/JPEGs instead of Basis which will be uncompressed in VRAM so it is possible that you are running out of VRAM on your devices?

When you run this in the launch tab of PlayCanvas, how much VRAM are you using (check the profiler Alt + T)?

(On a separate note, I would take all the UI assets together and create a texture atlas instead for quicker downloads Using Texture Packers | Learn PlayCanvas)

As a side note, the link you gave me is using an iframe:


I checked the VRAM with a debug version of the engine and it’s using 173MB of VRAM.

On iOS ideally, that needs to be lower. Around the 100-150MB at least. I would look at using Basis where you can as that makes huge savings on VRAM.

If that’s not possible then you need to reduce the number of textures or the dimensions of textures that you are using.

The use of a large number of pngs is indeed a mistake in the implementation of early projects. I also found that I could use the Sprite Editor when implementing other functions in the future, and will gradually use it when refactoring this project in the future.
Another question is, does vram mean this?

Sorry, I didn’t set up this link properly, but now this link doesn’t have an iframe

Hm, I can reproduce the black screen issue on my iPhone XR on the second reload but not sure what we can do here as we are not in control between page refreshes. That’s browser behaviour :thinking:

The only thing I can suggest here is to reduce the VRAM usage (video RAM). Each device/OS allocates how much can be used differently. On iOS, the amount is very small in comparison. Usually between 100-150MB and unfortunately, there is no way to know up front.

My recommendation here is to try to get VRAM usage under 100MB which should be possible if you use basis texture compression.

Okay, thanks for your answer. I’ll find a time to test basic texture compression :smiley: