question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mesh.MergeMeshes crashes on more than 65336 vertices mesh with allow32BitsIndeces on - BUG

See original GitHub issue

BABYLON.Mesh.MergeMeshes(…) crashes if the meshes to merge have more than 65336 even though flag allow32BitsIndices = true.

Attached is a full test suite with html, gtlf file, bin, and textures. The file includes an html to run on local server, which will load a gltf that has multiple meshes of the same material, with more than 65536 vertices.

An attempt to merge all meshes with same materials is done on lines 118 - 147 of the bug.html script, producing a failure.

Function: BABYLON.Mesh.MergeMeshes(meshesWithSameMaterial, disposeSource, allow32BitsIndices, meshSubclass, subdivideWithSubMeshes);

Result: TypeError: this.indices.push is not a function

babylon.js:1 BJS - [01:53:21]: Error running tasks-done callbacks.
m._ErrorEnabled @ babylon.js:1
e._decreaseWaitingTasksCount @ babylon.js:1
(anonymous) @ babylon.js:1
e.onDoneCallback @ babylon.js:1
(anonymous) @ babylon.js:1
(anonymous) @ babylon.js:1
f @ babylon.js:1
(anonymous) @ babylon.js:1
Promise.then (async)
(anonymous) @ babylon.js:1
f @ babylon.js:1
o @ babylon.js:1
XMLHttpRequest.send (async)
l @ babylon.js:1
n @ babylon.js:1
m.LoadFile @ babylon.js:1
g @ babylon.js:1
r @ babylon.js:1
(anonymous) @ babylon.js:1
load (async)
c._checkManifestFile @ babylon.js:1
c @ babylon.js:1
P._loadData @ babylon.js:1
P.ImportMesh @ babylon.js:1
e.runTask @ babylon.js:1
e.run @ babylon.js:1
e._runTask @ babylon.js:1
e.load @ babylon.js:1
createScene @ bug.html:163
(anonymous) @ bug.html:170
babylon.js:1 TypeError: this.indices.push is not a function
    at q.merge (babylon.js:1)
    at Function.p.MergeMeshes (babylon.js:1)
    at e.assetsManager.onFinish (bug.html:144)
    at e._decreaseWaitingTasksCount (babylon.js:1)
    at babylon.js:1
    at e.onDoneCallback (babylon.js:1)
    at babylon.js:1
    at babylon.js:1
    at f (babylon.js:1)
    at babylon.js:1

bug.zip

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
deltakoshcommented, Aug 3, 2018

Will check that

1reaction
deltakoshcommented, Jul 31, 2018

I found the bug 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

MergeMeshes creates bug in multimaterial since 4.1.0
Hi all - I've found a bug that was introduced in 4.1.0 and persists in 4.2 alpha. When merging meshes the normals of...
Read more >
fluent3DMeshToFoam and mergeMeshes crash with large ...
Dear all, i am currently trying to convert ICEM generated large hexahedral meshes (170 mio cells; exported in ASCII) to openFOAM via.
Read more >
[Mesh] Unity crash when creating a large mesh (180 million ...
In the top menu go to Window/DoIt -- this tries to create a Mesh . ... crash when creating a large mesh (180...
Read more >
How to Merge Meshes - BabylonJS Documentation
When set, vertices inserted into this Mesh. Meshes can then be merged into a Mesh sub-class. Use your own merge function. If you...
Read more >
Blender crashes when manipulating a large number of ...
It would probably be better to use a lattice modifier but if you wish to deselect vertices the following method seems to work...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found