# Gui.clone\_tree(nil)

**URL:** <https://forum.defold.com/t/gui-clone-tree-nil/76093>\
**Category:** Questions\
**Created:** [February 26, 2024, 8:07am UTC](https://forum.defold.com/t/gui-clone-tree-nil/76093 "2024-02-26T08:07:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NaakkaDev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/naakkadev/32/34927_2.png) [@NaakkaDev](https://forum.defold.com/u/NaakkaDev)\
**Post date:** [February 26, 2024, 8:07am UTC](https://forum.defold.com/t/gui-clone-tree-nil/76093/1 "2024-02-26T08:07:17Z")

</div>

I managed to call **gui.clone\_tree()** with **nil** param due to derping with _self_ and noticed that the engine starts spamming new nodes till the limit is hit and then it spits out an error about the node limit being hit. This gave me a though that maybe the engine should check if the gui.clone\_tree() receives a nil param and then return with an error instead of creating.. nil nodes?

Granted the **Could not create the node since the buffer is full (512).** error is already a decent indicator that something went wrong but I have a feeling it can be “dangerous” to create infinite nodes.

Oh.. just tried what happens with max node limit (8192) and the whole thing crashed now. 😄

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [February 26, 2024, 8:51am UTC](https://forum.defold.com/t/gui-clone-tree-nil/76093/2 "2024-02-26T08:51:55Z")

</div>

Thanks!  
Help us out by reporting issues in our [GitHub repository](https://github.com/defold/defold/issues).

---

<div class="post-metadata">

**Author:** ![NaakkaDev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/naakkadev/32/34927_2.png) [@NaakkaDev](https://forum.defold.com/u/NaakkaDev)\
**Post date:** [February 26, 2024, 9:02am UTC](https://forum.defold.com/t/gui-clone-tree-nil/76093/3 "2024-02-26T09:02:18Z")

</div>

I was about to do that but then got stuck deciding between bug report and feature request so I posted here. Though this was before I tested with 8192 nodes. I assume this would be a bug report?

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [February 26, 2024, 9:13am UTC](https://forum.defold.com/t/gui-clone-tree-nil/76093/4 "2024-02-26T09:13:55Z")

</div>

Yes, I’d say this is a bug.
