You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use runViewer() to add splatFile , is OK. Then use removeSplatScene(0) remove a scene,is OK. and use runViewer() to add splat File again , crashed.
error info:
Uncaught RangeError: offset is out of bounds
at Int32Array.set ()
at self.onmessage (8f7e31cd-0625-419e-9f13-6931e81b4dc9:95:11)
self.onmessage @ 8f7e31cd-0625-419e-9f13-6931e81b4dc9:95
8f7e31cd-0625-419e-9f13-6931e81b4dc9:48 Uncaught RangeError: offset is out of bounds
at Float32Array.set ()
at sort (8f7e31cd-0625-419e-9f13-6931e81b4dc9:48:59)
at self.onmessage (8f7e31cd-0625-419e-9f13-6931e81b4dc9:123:7)
The text was updated successfully, but these errors were encountered:
nmgyaoyuan
changed the title
sortWork crashed when 'dynamicScene': true, with add-->remove-->add opterations. 'dynamicScene': false。 all be OK
sortWork.js crashed when 'dynamicScene': true, with add-->remove-->add opterations. 'dynamicScene': false。 all be OK
Oct 2, 2024
Sorry for the late reply, are you making sure to wait for removeSplatScene() to complete before attempting to add another scene? It returns a promise like addSplatBuffers()
when i want read splat file and want rotate the splat scene, i found the bug(maybe).
code:
gsViewer = new GaussianSplats3D.Viewer({
'selfDrivenMode': false,
'useBuiltInControls': false,
'dynamicScene': true,
'renderer':renderer,
'camera':camera,
'threeScene':scene,
'sphericalHarmonicsDegree': 2,
'rootElement': splatContainer.value
});
//--------------------------------------------------------------
/* ----copyed from demo code---*/
function runViewer(splatBufferData:ArrayBuffer, format:GaussianSplats3D.SceneFormat,
alphaRemovalThreshold:number, sphericalHarmonicsDegree:number) {
const splatBufferOptions = {
'splatAlphaRemovalThreshold': alphaRemovalThreshold
};
const splatBufferPromise = fileBufferToSplatBuffer({data: splatBufferData}, format, alphaRemovalThreshold, 0,
undefined, undefined, undefined, undefined, sphericalHarmonicsDegree
);
}
//---------------------------------------------------------------------
use runViewer() to add splatFile , is OK. Then use removeSplatScene(0) remove a scene,is OK. and use runViewer() to add splat File again , crashed.
error info:
Uncaught RangeError: offset is out of bounds
at Int32Array.set ()
at self.onmessage (8f7e31cd-0625-419e-9f13-6931e81b4dc9:95:11)
self.onmessage @ 8f7e31cd-0625-419e-9f13-6931e81b4dc9:95
8f7e31cd-0625-419e-9f13-6931e81b4dc9:48 Uncaught RangeError: offset is out of bounds
at Float32Array.set ()
at sort (8f7e31cd-0625-419e-9f13-6931e81b4dc9:48:59)
at self.onmessage (8f7e31cd-0625-419e-9f13-6931e81b4dc9:123:7)
crashed code (2 places) :
(1) ----> new Float32Array(wasmMemory, modelViewProjOffset, 16).set(modelViewProj);
(2) ---->
if (e.data.centers) {
centers = e.data.centers;
sceneIndexes = e.data.sceneIndexes;
if (integerBasedSort) {
new Int32Array(
wasmMemory,
centersOffset + e.data.range.from * Constants2.BytesPerInt * 4,
e.data.range.count * 4
).set(new Int32Array(centers));
} else {
The text was updated successfully, but these errors were encountered: