# Crash on exit (dmGameObject::ReparentChildNodes)

**URL:** <https://forum.defold.com/t/crash-on-exit-dmgameobject-reparentchildnodes/76171>\
**Category:** Questions\
**Created:** [March 2, 2024, 7:01pm UTC](https://forum.defold.com/t/crash-on-exit-dmgameobject-reparentchildnodes/76171 "2024-03-02T19:01:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pawel](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pawel/32/24623_2.png) [@Pawel](https://forum.defold.com/u/Pawel)\
**Post date:** [March 2, 2024, 7:01pm UTC](https://forum.defold.com/t/crash-on-exit-dmgameobject-reparentchildnodes/76171/1 "2024-03-02T19:01:13Z")

</div>

I’m using Monarch to manage collections in a game I’m doing at Gamedev Camp and it turns out that when I load one area with collection factory and get back to the first area (also loaded and created with collection factory) and when I exit game in that state I always get such crash:

[2024-03-02 19\_41\_rrw.txt](https://forum.defold.com/uploads/short-url/5KJTNGyCTEhsWQcCUNaSVJTGfHh.txt) (50.0 KB)

On first sight it looks like there are some problems with reparenting / deleting instances?

How can I investigate it further?

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [March 3, 2024, 10:25am UTC](https://forum.defold.com/t/crash-on-exit-dmgameobject-reparentchildnodes/76171/2 "2024-03-03T10:25:12Z")

</div>

Can you isolate this down to a small project that you can share here? I don’t think Monarch has anything to do with it.

---

<div class="post-metadata">

**Author:** ![Pawel](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pawel/32/24623_2.png) [@Pawel](https://forum.defold.com/u/Pawel)\
**Post date:** [March 4, 2024, 11:57am UTC](https://forum.defold.com/t/crash-on-exit-dmgameobject-reparentchildnodes/76171/3 "2024-03-04T11:57:59Z")

</div>

I shared the whole project with you. I can’t isolate it to something smaller, as I don’t know where the issue really comes from. I described you the repro steps in DM.

It’s happening when switchin collections created with collectionfactory steered by Monarch, therefore I suspected the Monarch code. I’m also using platypus, and there is reparenting of objects, when switching ground, but I can’t read more from the crash call stack ☹
