# SceneLoader.LoadAsync: Maximum call stack size exceeded

**URL:** <https://forum.babylonjs.com/t/sceneloader-loadasync-maximum-call-stack-size-exceeded/25823>\
**Category:** Bugs\
**Tags:** gltf\
**Created:** [December 6, 2021, 2:49pm UTC](https://forum.babylonjs.com/t/sceneloader-loadasync-maximum-call-stack-size-exceeded/25823 "2021-12-06T14:49:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZoeLeee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/zoeleee/32/20340_2.png) [@ZoeLeee](https://forum.babylonjs.com/u/ZoeLeee)\
**Post date:** [December 6, 2021, 2:49pm UTC](https://forum.babylonjs.com/t/sceneloader-loadasync-maximum-call-stack-size-exceeded/25823/1 "2021-12-06T14:49:56Z")

</div>

[https://playground.babylonjs.com/#WGZLGJ#4028](https://playground.babylonjs.com/#WGZLGJ#4028)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/1/9/19bb9ea001e2785de0c12fd97e7674e31c43d3d5.jpeg)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [December 6, 2021, 6:16pm UTC](https://forum.babylonjs.com/t/sceneloader-loadasync-maximum-call-stack-size-exceeded/25823/2 "2021-12-06T18:16:05Z")

</div>

you are trying to add a mesh to the scene which is already in the scene and you are also using 2 scenes in the playground,

I reorganized a bit the code here:  
[https://playground.babylonjs.com/#ZPY65X](https://playground.babylonjs.com/#ZPY65X)

---

<div class="post-metadata">

**Author:** ![ZoeLeee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/zoeleee/32/20340_2.png) [@ZoeLeee](https://forum.babylonjs.com/u/ZoeLeee)\
**Post date:** [December 7, 2021, 12:31am UTC](https://forum.babylonjs.com/t/sceneloader-loadasync-maximum-call-stack-size-exceeded/25823/3 "2021-12-07T00:31:21Z")

</div>

I want to add the imported mesh to the current scene or mesh child.

---

<div class="post-metadata">

**Author:** ![Blake](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/blake/32/21509_2.png) [@Blake](https://forum.babylonjs.com/u/Blake)\
**Post date:** [December 7, 2021, 12:47am UTC](https://forum.babylonjs.com/t/sceneloader-loadasync-maximum-call-stack-size-exceeded/25823/4 "2021-12-07T00:47:24Z")

</div>

> [@ZoeLeee](#):
>
> add the imported mesh to the current scene

Hey there, you can use ImportMesh to do this, like below. 🙂

> **[Babylon.js Playground](https://playground.babylonjs.com/#BCU1XR%233811)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![ZoeLeee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/zoeleee/32/20340_2.png) [@ZoeLeee](https://forum.babylonjs.com/u/ZoeLeee)\
**Post date:** [December 7, 2021, 1:05am UTC](https://forum.babylonjs.com/t/sceneloader-loadasync-maximum-call-stack-size-exceeded/25823/5 "2021-12-07T01:05:39Z")

</div>

This will be added to the scene immediately.I want to store it in the root mesh first,then render it.  
[https://playground.babylonjs.com/#WGZLGJ#4030](https://playground.babylonjs.com/#WGZLGJ#4030)

---

<div class="post-metadata">

**Author:** ![Blake](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/blake/32/21509_2.png) [@Blake](https://forum.babylonjs.com/u/Blake)\
**Post date:** [December 7, 2021, 1:38am UTC](https://forum.babylonjs.com/t/sceneloader-loadasync-maximum-call-stack-size-exceeded/25823/6 "2021-12-07T01:38:47Z")

</div>

Ah, I get what you’re after now - it looks like you’ve already found a way, but you can also do it by simply calling assetContainer.instantiateModelsToScene() 🍻  
[https://playground.babylonjs.com/#WGZLGJ#4034](https://playground.babylonjs.com/#WGZLGJ#4034)

Here’s the relevant [documentation](https://doc.babylonjs.com/divingDeeper/importers/assetContainers#duplicating-the-models) section for doing it this way. 🙂

---

<div class="post-metadata">

**Author:** ![ZoeLeee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/zoeleee/32/20340_2.png) [@ZoeLeee](https://forum.babylonjs.com/u/ZoeLeee)\
**Post date:** [December 7, 2021, 2:34am UTC](https://forum.babylonjs.com/t/sceneloader-loadasync-maximum-call-stack-size-exceeded/25823/7 "2021-12-07T02:34:51Z")

</div>

Thanks,i get it
