cesium icon indicating copy to clipboard operation
cesium copied to clipboard

Using the 'rectangle' parameter in ImageryLayer.fromProviderAsync causes a rendering crash

Open SmallAngel opened this issue 1 month ago • 3 comments

What happened?

Using the 'rectangle' parameter in ImageryLayer.fromProviderAsync causes a rendering crash.

Reproduction steps

Image

example : https://sandcastle.cesium.com/#c=pVTvb9owEP1XTnyCCpJW075QisZatCLRdVrQPuWLca7BqmNnPpsqq/q/z3YS+mOV1nUIhHK+997du4tFVWtj4QgYwTmScBXcGF1BPuDxKR+c5ipX6REgSaHspBDEthJB6YlTjrCY7JkhOEpjWgoLBQvDv6wyWHBPQbDRt6hAEBj86YTBAqwG5uwOlRWcWYwHSJbiwQG+qliJsBFei9DsBcckCmx8UstMyJ3BPt8gaWf8wRga7UBhq8QNBo1H3gL3KHWNJtBopywwCztra5qm6eGQEmZ4KSjhukrHUThUDKKqJVYYUOppF0IrqNDudBTVW8uEiiltqTaYkECG+BepQnMX6CNjWrG6FqqcsFrQhKli0jlBaexd2KZzfbPDZ1LAvfbWx4hEqbwTpdRbJmUzjentpJPgiKArVmedwQXeMCdtO7l2cGcwi4zz04jUJmwK61RqZpjv2nt5F8yJXvt6g1XwjBzjNE3zzei9KNC0o+RakYW9wDvPcOZHdtdX9iPGhv0WnmsVDEWTD8ZwH7EAW0a4Zg2aaY/qRGIwCWvcyy2oUXzY4eDV9tG8LDEQfPYafgibpsZH+AuCkHPV5iTZYrNcr1eb5WOZ7Sf6NfWvVedmPuiOH0ajdr0eRt7hdzvyLjv+x4s3G9GnhuXxe2GAXB3uHL+UZBuJBEJx6QqcPsl8W1WXq/U6u1xcLP8ZeX2+XHzNWthofN/jDXLLVClxemjtex+KHlxgaRBpeHI8Bv/96H8fjkfQNfkQ/sI44ywH48EsdjgP4U+ivWmdkcMkSS36i8RfTJRuHb9Fm3CiAJqlPWRWiD2I4uyViQOX/sX2JzdOykz8wnwwn6U+/xlMalb4l/Haty9ZE1J2J/N1G0ySZJb6xz9RVmu5ZeYJ428

Sandcastle example

https://sandcastle.cesium.com/#c=pVTvb9owEP1XTnyCCpJW075QisZatCLRdVrQPuWLca7BqmNnPpsqq/q/z3YS+mOV1nUIhHK+997du4tFVWtj4QgYwTmScBXcGF1BPuDxKR+c5ipX6REgSaHspBDEthJB6YlTjrCY7JkhOEpjWgoLBQvDv6wyWHBPQbDRt6hAEBj86YTBAqwG5uwOlRWcWYwHSJbiwQG+qliJsBFei9DsBcckCmx8UstMyJ3BPt8gaWf8wRga7UBhq8QNBo1H3gL3KHWNJtBopywwCztra5qm6eGQEmZ4KSjhukrHUThUDKKqJVYYUOppF0IrqNDudBTVW8uEiiltqTaYkECG+BepQnMX6CNjWrG6FqqcsFrQhKli0jlBaexd2KZzfbPDZ1LAvfbWx4hEqbwTpdRbJmUzjentpJPgiKArVmedwQXeMCdtO7l2cGcwi4zz04jUJmwK61RqZpjv2nt5F8yJXvt6g1XwjBzjNE3zzei9KNC0o+RakYW9wDvPcOZHdtdX9iPGhv0WnmsVDEWTD8ZwH7EAW0a4Zg2aaY/qRGIwCWvcyy2oUXzY4eDV9tG8LDEQfPYafgibpsZH+AuCkHPV5iTZYrNcr1eb5WOZ7Sf6NfWvVedmPuiOH0ajdr0eRt7hdzvyLjv+x4s3G9GnhuXxe2GAXB3uHL+UZBuJBEJx6QqcPsl8W1WXq/U6u1xcLP8ZeX2+XHzNWthofN/jDXLLVClxemjtex+KHlxgaRBpeHI8Bv/96H8fjkfQNfkQ/sI44ywH48EsdjgP4U+ivWmdkcMkSS36i8RfTJRuHb9Fm3CiAJqlPWRWiD2I4uyViQOX/sX2JzdOykz8wnwwn6U+/xlMalb4l/Haty9ZE1J2J/N1G0ySZJb6xz9RVmu5ZeYJ428

Environment

Browser: CesiumJS Version: Operating System:

SmallAngel avatar Nov 07 '25 09:11 SmallAngel

EDIT: Wait, it does crash, but only after zooming around for a while. I'll have another look...

EDIT2: So yes, it does crash when opening the sandcastle and zooming in. I don't have an immediate answer for why this happens, but am wondering: The given rectangle is certainly not the rectangle that is covered by this layer, and even when not zooming in, then the renderer representation looks pretty wrong (see screenshot below).

In any case: It should not crash, so that's a clear-cut bug. But maybe you want to describe in more detail what you are trying to accomplish.


Old/obsolete

Couldn't reproduce it with the given sandcastle, neither on Chrome nor on FireFox. Might require more investigations.


Somewhat unrelated: It doesn't crash, but ... this is probably not what you wanted...:

Image

javagl avatar Nov 07 '25 12:11 javagl

The pattern seems to be that this reproduces when south or east is 0.

lukemckinstry avatar Nov 07 '25 18:11 lukemckinstry

1.I have identified the crash bug and request that it be optimized. 2.The desired effect is to only display the area within the set rectangular range, with other areas not shown.

Image

SmallAngel avatar Nov 10 '25 01:11 SmallAngel