Skip to content
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

TypeError on setting the Viewer selectedEntity #12303

Open
stevethewright opened this issue Nov 12, 2024 · 5 comments
Open

TypeError on setting the Viewer selectedEntity #12303

stevethewright opened this issue Nov 12, 2024 · 5 comments

Comments

@stevethewright
Copy link

What happened?

After updating CesiumJS to version 1.123.1, an error is being thrown during rendering causing rendering to stop. This also happens in v1.123.0.

An error occurred while rendering. Rendering has stopped.

TypeError: this._updaterSets.get(...) is undefined
GeometryVisualizer.prototype.getBoundingSphere@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:154938:38
DataSourceDisplay.prototype.getBoundingSphere@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:158659:30
Viewer.prototype._onTick@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:254822:56
Event.prototype.raiseEvent@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:17672:20
Clock.prototype.tick@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:137120:15
CesiumWidget.prototype.render@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225779:37
render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225014:18
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*render2@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225015:32
FrameRequestCallback*startRenderLoop@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225038:24
set@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225530:26
CesiumWidget@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:225231:33
Viewer@http://localhost/node_modules/.vite/deps/cesium.js?v=2b39f4c0:253743:24
setup/<@http://localhost/src/components/cesium/CesiumViewer.vue?t=1731451678783:65:22
node_modules/vue/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js/createHook/</<@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:10152:48
callWithErrorHandling@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:2477:19
callWithAsyncErrorHandling@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:2484:38
injectHook/hook.__weh@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:4378:45
flushPostFlushCbs@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:2654:28
flushJobs@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:2695:22
promise callback*queueFlush@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:2591:43
queuePostFlushCb@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:2605:3
queueEffectWithSuspense@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:8431:21
doWatch/baseWatchOptions.scheduler@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:7406:28
watch/effect2.scheduler<@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:1549:50
trigger@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:1798:16
endBatch@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:643:13
notify@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:1913:11
trigger@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:1887:14
set value@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:2219:22
finalizeNavigation@http://localhost/node_modules/.vite/deps/vue-router.js?v=c7a3c4fa:2500:5
createRouter/pushWithRedirect/<@http://localhost/node_modules/.vite/deps/vue-router.js?v=c7a3c4fa:2410:20
promise callback*pushWithRedirect@http://localhost/node_modules/.vite/deps/vue-router.js?v=c7a3c4fa:2378:8
push@http://localhost/node_modules/.vite/deps/vue-router.js?v=c7a3c4fa:2304:12
install@http://localhost/node_modules/.vite/deps/vue-router.js?v=c7a3c4fa:2657:13
use@http://localhost/node_modules/.vite/deps/chunk-VBDISFHX.js?v=77e6db26:5189:18
@http://localhost/src/main.ts?t=1731451678783:15:5

When updating the value of Viewer.selectedEntity, assigning it an Entity object that has been added to the Viewer, the above error is shown. This is running in a Vue 3 app.

The error is fixed by disabling any calls of setting the Viewer.selectedEntity property. No errors are thrown when the property is retrieved. We have reverted back to v1.122.0 for the meanwhile to allow us to update the selectedEntity property.

This was not causing errors in previous versions, but do we need to wait until rendering is complete before setting the selectedEntity property?

Reproduction steps

  1. Create a Vue App with CesiumJS Version 1.123.1.
  2. Create the Viewer and add an entity to it.
  3. Update Viewer.selectedEntity with the added entity, error is shown.

Sandcastle example

No response

Environment

Browser: Firefox 132.0.1
CesiumJS Version: 1.123.1
Operating System: Ubuntu 22.04

@ggetz
Copy link
Contributor

ggetz commented Nov 14, 2024

@jjspace Could you please take a look and triage this issue? At first glance, this appears to be a regression from #12202.

@jjspace
Copy link
Contributor

jjspace commented Nov 15, 2024

Definitely a regression from the Viewer > Widget changes. I was only able to reproduce with some types of entities but will look into it further.

Sandcastle reproducing the issue

@jfayot
Copy link
Contributor

jfayot commented Nov 16, 2024

@jjspace , narrowing down the root cause: commit 774845b (Dont let other vizualizers block when partial true) shows this issue. Previous commit doesn't.

@ggetz
Copy link
Contributor

ggetz commented Nov 18, 2024

Thank you for narrowing this down @jfayot!

Please feel free to open a PR with a fix if you manage to track it down.

@jfayot
Copy link
Contributor

jfayot commented Nov 18, 2024

No idea at first sight. May be you could ask to the author of this PR #12230

@jfayot jfayot mentioned this issue Nov 21, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants