paused before potential out-of-memory crash。
This error occurred during the upgrade from 4.1.0-beta.3 to 4.1.0. After building, the volume of babylon.js 4.1 did not shrink, but increased.
paused before potential out-of-memory crash。
That’s the first time in my life I am seeing this error!
Can you reproduce this? Playground maybe? What size of model(s) are you trying to clone?
4.0 and 4.1.0-beta are running normally. I just upgraded NPM update to 4.1. Build is running normally, but the browser runs with this error. It can’t be reproduced in the playground. No clone is used. Instance is used. There are about 30-40 gltf original models and 1000 scene instances.
4.0, 4.1.0-beta takes up 600M of memory. 4.1 the memory used in error reporting is 3+ G
The last function called before it crashes is clone, this is why I was asking about clone.
Would be great to see a reproduction of this. Even your code running somewhere, to try and figure out what the problem is.
That’s a serious increase in mem use. Is 4.2 alpha the same?
No test 4.2 alpha
Ok.
would be great if you could test it, and would be great if you could reproduce such an increase in memory usage so we can fix that
Would you be able to reproduce this code in the playground? or provide the model?
A cabinet model, which is a complex model, composed of multiple mesh, also has the animation of door opening. There are many cabinets in the machine room. How can I replicate it with the best performance, clone or instance?
It depends on the use case, of course.
But you are saying that the problem is happening during animation cloning, no?
Do you have the model hosted somewhere?
Availability is not guaranteed.
Is it possible to enable cors on the server? or maybe host it on github? it will help us very much to load it in the playground and help you much better
Great! that’s a start
https://playground.babylonjs.com/#1GDEU4
Could you add the code that has been causing the issues?
The problem is that you are creating a never ending loop - you are cloning an animation on the instance object, which is added to the parent object. So the animations array keeps on growing.
But it seems like it is unneeded - the animation array of the instance already has the animations of the parent object
A commendation on your patience in helping zhang.