[BUG✔] Crash when generating objects in menu screen (This bug has already been fixed.)

Reproduction Steps:

  1. Run the scene
  2. Press the Z key to open the menu and wait for object generation to complete (this process is somewhat laggy)
  3. Press the Z key again to close the menu, then reopen the menu (sometimes crashes on the first reopen, sometimes on the second)

Problem Description:

  1. The process of generating objects after opening the menu is normal (though slightly laggy)
  2. The process of closing the menu also executes normally (tested both with and without deleting objects upon closing)
  3. However, when reopening the menu, crashes may occur:
    • Sometimes it crashes immediately
    • Sometimes it crashes during object generation

Suspected Cause:
When closing the menu, the ObjectMountTarget node disappears first, causing subsequent child objects to lose their hierarchy path, resulting in a crash.
(In the main project, I modified the logic so that when closing the menu, I first change a variable to make child objects disappear before closing the menu — this prevents crashes.)

:warning: Additional Note:
If you enable the “Change Variable” action within the “Disappear/Delete” action of the object [bug]’s VS (state machine), the crash no longer occurs.
(In other words, if child objects are deleted when the menu closes, they regenerate correctly when the menu is reopened.)

  1. 1

Confirmed the crash and reported this to the developers. Thank you for the thorough report!

1 Like