-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unicode variation selectors (U-FE00 to U-FE0F) in Label text freeze Cesium #4918
Comments
Related: #378 |
Also reported here: https://groups.google.com/forum/?hl=en#!topic/cesium-dev/UgdiI_MNbTQ |
Reported on the forum: https://groups.google.com/forum/#!topic/cesium-dev/sfE8_8dUfXI |
Same issue with the soft hyphen U+00AD (sandcastle example). |
#378 is pretty old now... Until it gets solved, would it be thinkable to filter out the most problematic Unicode codepoints before rendering, e.g. U+FE00 to U-FE0F, and U+00AD ? |
I'm hoping this will be addressed by #7280, but we need to find the time to review and test it. |
Can confirm that this is fixed in master (and in today's 1.63 release I'm publishing now). |
Congratulations on closing the issue! I found these Cesium forum links in the comments above: https://groups.google.com/forum/?hl=en#!topic/cesium-dev/UgdiI_MNbTQ If this issue affects any of these threads, please post a comment like the following:
|
Using a unicode character and a variation selector (U-FE00 to U-FE0F) as label's text gets Cesium in an infinite loop (CPU maxed and frozen browser)
I could reproduce this in FireFox and Chrome but not IE or MS Edge (do not appear to support variation selectors)
This character:
☠
(\u2620) will work fineIt's variation:
☠️
(\u2620\ufe0f) will crash CesiumFirebug pointed me to mesureText.js (line 173) that looks like a good candidate for the buggy loop.
Here is the stack trace:
measureText@https://cesiumjs.org/Cesium/Source/ThirdParty/measureText.js:173:19
writeTextToCanvas@https://cesiumjs.org/Cesium/Source/Core/writeTextToCanvas.js:89:25
createGlyphCanvas@https://cesiumjs.org/Cesium/Source/Scene/LabelCollection.js:99:15
rebindAllGlyphs@https://cesiumjs.org/Cesium/Source/Scene/LabelCollection.js:202:29
LabelCollection.prototype.update@https://cesiumjs.org/Cesium/Source/Scene/LabelCollection.js:778:16
EntityCluster.prototype.update@https://cesiumjs.org/Cesium/Source/DataSources/EntityCluster.js:727:12
PrimitiveCollection.prototype.update@https://cesiumjs.org/Cesium/Source/Scene/PrimitiveCollection.js:366:12
updatePrimitives@https://cesiumjs.org/Cesium/Source/Scene/Scene.js:2196:8
executeCommandsInViewport@https://cesiumjs.org/Cesium/Source/Scene/Scene.js:2106:8
updateAndExecuteCommands@https://cesiumjs.org/Cesium/Source/Scene/Scene.js:1974:16
render@https://cesiumjs.org/Cesium/Source/Scene/Scene.js:2404:8
Scene.prototype.render@https://cesiumjs.org/Cesium/Source/Scene/Scene.js:2442:12
CesiumWidget.prototype.render@https://cesiumjs.org/Cesium/Source/Widgets/CesiumWidget/CesiumWidget.js:687:12
render@https://cesiumjs.org/Cesium/Source/Widgets/CesiumWidget/CesiumWidget.js:72:24
The text was updated successfully, but these errors were encountered: