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

Error rendering model #16

Open
joaomlap opened this issue Oct 29, 2024 · 3 comments
Open

Error rendering model #16

joaomlap opened this issue Oct 29, 2024 · 3 comments

Comments

@joaomlap
Copy link

Hi,

Not sure if this is helpful at all but while following the steps here:
https://www.kitware.com/vtk-wasm-and-its-trame-integration/

I was able to render some parts of my big-ish model but when trying to render the full thing I got some errors:

Python Server:

 JS Error => 2024-10-29 16:11:06.364 (  78.142s) [          401734]vtkGenericDataArray.txx:378    ERR| vtkTypeInt64Array (0xffe85080): Unable to allocate 476064 elements of size 8 bytes.
 JS Error => WASM update failed
 JS Error => RuntimeError: null function or function signature mismatch

Browser console;

2024-10-29 16:27:10.215 (  76.527s) [          401734]vtkGenericDataArray.txx:378    ERR| vtkTypeInt64Array (0xffe850e8): Unable to allocate 476064 elements of size 8 bytes. 
overrideMethod @ hook.js:608
Show 1 more frame
Show less

hook.js:608 WASM update failed
overrideMethod @ hook.js:608
Show 1 more frame
Show less

trame_vtklocal.umd.js:1 4293415576
hook.js:608 RuntimeError: null function or function signature mismatch
    at vtkWasmSceneManager.wasm:0xa84d04
    at vtkWasmSceneManager.wasm:0xfbdd5a
    at dynCall (vtkWasmSceneManager.mjs:9:73159)
    at vtkWasmSceneManager.mjs:9:73240
    at Object.startEventLoop (eval at newFunc (vtkWasmSceneManager.mjs:9:68337), <anonymous>:8:10)
    at trame_vtklocal.umd.js:1:7497
@jourdain
Copy link
Collaborator

Can you describe the geometry in question? Multi-block, number of blocks, number of cells, number of points...
Just so we have some idea of what you are talking about in term of big-ish model?

@jspanchu
Copy link
Member

jspanchu commented Nov 15, 2024

@joaomlap I think your mesh is really big. The error basically says that VTK failed to allocate almost 3.6 GB for cell array connectivity (or offsets in a vtkCellArray because the data type is vtkTypeInt64Array) Since the memory limit in wasm32 is 4GB it is quite easy for applications to run out of memory. I guess the extra 400 megabytes were either used up for the points of your mesh or for small allocations internal to VTK used to store the state/blobs in C++ object manager memory.

@jourdain We need a way for trame to optionally use wasm64.

@jourdain
Copy link
Collaborator

Yes we will enable such option once wasm64 is more widely supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants