3D models, 3D Tiles, Point cloud crashing in Chrome on Android ('model_iblReferenceFrameMatrix' : undeclared identifier)
See original GitHub issue3D models, 3D Tiles and Point clouds crash on some Android devices using Chrome or Chromium based browsers.
Testing the official examples from the Cesium Sandbox, they produce an error (fullscreen popup and in console) and stop working, making these features unusable if the target audience uses Chome on Android. The map itself loads and starts to fly the camera toward the example scene, but when it gets close enough to render the scene (3D model, point cloud), the error gets thrown.
Note that the following examples work on those same devices when using Firefox (106.1.0).
Devices I tested:
- Samsung Galaxy S10e, Chrome 106.0.5249.118 (latest at the time of writing), Android 12
- Huawei Nova 5T, Chrome 106.0.5249.118
- Huawei Mate 20 Lite, Chrome 83.0.4103.106
Sandcastle examples:
https://sandcastle.cesium.com/index.html?src=3D Tiles Point Cloud.html Error log for 3D Tiles Point Cloud 3D Tiles Point Cloud.txt
https://sandcastle.cesium.com/index.html?src=3D Models.html Error log for 3D Models 3D Models.txt
https://sandcastle.cesium.com/index.html?src=CZML Model Articulations.html Error log for CZML Model Articulations CZML Model Articulations.txt
https://sandcastle.cesium.com/index.html?src=Cesium OSM Buildings.html Error log for Cesium OSM Buildings Cesium OSM Buildings.txt
https://sandcastle.cesium.com/index.html?src=Image-Based Lighting.html Error log for Image-Based Lighting Image-Based Lighting.txt
The Image-Based Lighting example shows an alert before starting (and crashing):
This browser does not support specular environment maps.
Some examples that do work: https://sandcastle.cesium.com/index.html?src=Clamp to Terrain.html https://sandcastle.cesium.com/index.html?src=Time Dynamic Point Cloud.html
Browser: Chrome for Android 83.0.4103.106 to 106.0.5249.118
Operating System: Android
Looks like all examples crash due to the same error:
Fragment shader failed to compile - 'model_iblReferenceFrameMatrix' : undeclared identifier
The only mention of this error I could find was #10833, but I would I would say this issue is not a duplicate, as it seems more Android phones are affected, not just HarmonyOS users.
Let me know if it would be helpful to have more results on which examples work and which don’t, and their error logs.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
@ggetz Thank you for the swift reply!
Confirming that adding the requestWebgl2 option works, the samples load and work the same as on other devices.
The crash is happening because there’s a function in
ImageBasedLightingStageFS
that always expectsmodel_iblReferenceFrameMatrix
to be defined. Even though this code isn’t traversed unless spherical coefficients / specular maps are used, the reference tomodel_iblReferenceFrameMatrix
shouldn’t exist unless it explicitly uses either feature and there is browser support.I’ll open a fix for this soon.