Gui Drawing error

Hi, I am drawing using GUI, I try to catch the error using try catch, when the error is thrown, the rendering (render() stops), but I don’t know what is wrong, it seems there is a problem when drawing the picture (drawImage) I use babylon 5.21.0 version.

And this problem only appears on certain ios systems, and it sometimes draws successfully, and sometimes it gives an error.

I suspect that the gui methods for drawing and referencing conflict, but I’m not sure.

Does anyone know what this is about, or what this error is related to, thank you!

I suspect that the gui methods for drawing and referencing conflict, but I’m not sure.

Does anyone know what this is about, or what this error is related to, thank you!
微信图片_20230208175714



It will be hard to say without a reproduction, especially if the error is intermittent :upside_down_face: You don’t need to reproduce your entire project but a Playground with just the necessary for the error to appear would be nice.

What’s the size (size and weight) of this image. It could be just on the edge of what iOS is capable to handle. Just a guess. As already said above, without a PG (or at least the image information) it will be hard to figure anything.

I’m not sure which image caused this, but the highest resolution is 1200x144 and the volume is 7.37kb

So unless you inverted width and height(?), I guess we can assume that this is not the cause.

I changed the canvas to landscape

And does this rotate the image? Anyways I guess you did try with another image, did you?
Or try rescale this image to iPhone X+ native retina resolution on its height (2436 x 1125 px).
Since the image could be rotated, set your width to 1125px and give it a try.