uikit icon indicating copy to clipboard operation
uikit copied to clipboard

Error when remounting containers

Open Ledzz opened this issue 1 year ago • 3 comments

I guess it could be related to #117.

When I remount some containers, I sometimes get an error: Uncaught RangeError: offset is out of bounds. It happens on this line. I logged some variables: index is -1, bucket.offset is -1, indexInBucket is 0. I can't reproduce it outside my app yet, but if you can't find the issue I'll try to build repro again. Uikit version is latest for now: 0.8.1 Also I'll attach whole error with stacktrace:

helpers.ts:122 Uncaught RangeError: offset is out of bounds
    at Float32Array.set (<anonymous>)
    at InstancedBufferAttribute.set (three.module.js:9961:14)
    at instanced-panel-group.js:95:27
    at updateSortedBucketsAllocation (sorted-buckets.js:151:13)
    at InstancedPanelGroup.update (instanced-panel-group.js:198:13)
    at InstancedPanelGroup.onFrame (instanced-panel-group.js:174:14)
    at instanced-panel-group.js:38:66
    at PanelGroupManager.traverse (instanced-panel-group.js:46:17)
    at onFrame (instanced-panel-group.js:38:40)
    at Object.current (root.js:44:13)
    at render$1 (index-6662eaf2.esm.js:1511:22)
    at loop (index-6662eaf2.esm.js:1538:19)

Ledzz avatar Nov 05 '24 11:11 Ledzz

A reproduction repo would help a lol #117 should have been fixed these buffer resizing errors are really hard to catch without proper reproduction :)

bbohlender avatar Nov 05 '24 11:11 bbohlender

Yeah, the #117 issue has been fixed. I just found this one and it is a different error. I'll try to replicate it in codesandbox this week :)

Ledzz avatar Nov 05 '24 14:11 Ledzz

Awesome, thank you :)

bbohlender avatar Nov 05 '24 14:11 bbohlender

@Ledzz does this still exist?

bbohlender avatar Sep 23 '25 18:09 bbohlender

No, I can't reproduce it anymore, I saw it but I think it was because of HMR. It was constantly happening before, so I guess I'll close this one now, and will open again if I can reproduce it. Thank you!

Ledzz avatar Oct 03 '25 08:10 Ledzz