Change in Cesium 1.23 Causing Render Error in iOS

I just upgraded from Cesium 1.15 to 1.24 last week. I noticed after the upgrade that while everything worked fine on PC browsers (Chrome and Edge) my iOS devices crash with either the Safari or Chrome browser with the following error message when the first action after loading is to pinch to zoom. If you move the map first and then zoom everything is ok.

This behavior only seems to occur if I use Camera.setView or Camera.flyTo.

I built my app with each version of Cesium from 1.16 through 1.23 until I found that this behavior started in 1.23. I see in the CHANGES document for 1.23 that there were some changes to Camera.setView and Camera.flyTo. I don’t know if these are related to this issue or not.

I put together a very simple example in Sandcastle that demonstrates this problem on both my iPhone and my iPad. To reproduce the behavior simply load the following code in Sandcastle and access the example with an iOS device. When Cesium loads pinch to zoom will produce the crash.

var viewer = new Cesium.Viewer(‘cesiumContainer’);

var dblInitLon = -117.72456;
var dblInitLat = 33.06154;
var dblInitAlt = 342418.4;
var dblHeading = 0;
viewer.scene.camera.setView({
destination: Cesium.Cartesian3.fromDegrees(dblInitLon, dblInitLat, dblInitAlt),
orientation: {
heading: Cesium.Math.toRadians(dblHeading),
pitch: Cesium.Math.toRadians(-90),
roll: 0.0
}
});

``

When I perform the steps above with either my iPhone or iPad I get the following error:

I don’t see that I’m doing anything wrong with the Camera.setView or Camera.flyTo calls. Any suggestions?

Thanks.

Hello,

I’ve created this issue for us to look into the problem: https://github.com/AnalyticalGraphicsInc/cesium/issues/4254

Try clearing cookies/cache on the devices. Sometimes that leads to weirdness when switching between versions of Cesium.

If you still see the problem after trying that, let me know.

Thanks!

Hannah

Hi Hannah,

Thank you for the response. Yes, I have already cleared cookies/cache on the browsers. You are right, when I first upgraded to the latest version of Cesium I was having a number of strange issues that differed from browser to browser and from device to device. Finally I cleared the cache in these devices/browsers, and that resolved most issues.

However, this issue remains even after clearing the cache (which I just did again on my iPad in both Safari and Chrome browsers). When I run the Sandcastle example I posted and attempt to zoom as the first action I get the crash/error every time without fail. If I move the scene first and then zoom everything works fine.

Thanks for your help with this!

Rob