[BUG]菜单界面生成对象崩溃(包括生成对象卡顿)//メニュー画面でオブジェクト生成時のクラッシュ(生成時のカクつきを含む)// Crash when generating objects in menu screen (including lag during generation)

复现方法:

菜单界面生成对象崩溃.rar (594.3 KB)

1.运行场景
2.按键盘Z键打开菜单等待对象生成完毕(这个过程有点卡)
3.再次按键盘Z键关闭菜单后,再次打开菜单(有时候1次有时候2次会造成崩溃)

问题描述:
1.打开菜单后生成对象过程很正常(但是有点卡顿)
2.关闭菜单后这个过程也正常执行(我测试了一下关闭菜单时候先删除对象,和关闭菜单不删除对象)
3.再次打开后有时候会直接崩溃(有时候会生成对象过程中崩溃)

猜测:关闭菜单时候ObjectMountTarget节点优先消失,后续子对象找不到层级路径造成崩溃
(主项目里面我让关闭菜单时候改变变量先让子对象消失,菜单再跟着关闭,没有出现崩溃情况)

:warning:额外注意:如果将【对象】【bug】的vs(状态机)的【消失/削除/disappear】动作里的【改变变量】启用就不会造成崩溃
(也就是在关闭菜单时候删除子对象,再次打开菜单后会正常生成)

1.1

2.

///

JP:

菜单界面生成对象崩溃.rar (594.3 KB)

再現方法:

  1. シーンを実行

  2. Z キーを押してメニューを開き、オブジェクト生成が完了するまで待つ(この時少しカクつく)

  3. 再度 Z キーを押してメニューを閉じた後、再度メニューを開く

    (1 回または 2 回開いたときにクラッシュすることがある)

問題の説明:

メニューを開いてオブジェクトを生成する過程は正常だが、少しカクつく。

メニューを閉じる過程も正常に実行される。

(閉じる際にオブジェクトを削除する場合と削除しない場合の両方をテストした)

しかし、再度メニューを開いたときに、

・直接クラッシュする

・オブジェクト生成中にクラッシュする

という現象が発生する。

推測:

メニューを閉じる際に ObjectMountTarget ノードが先に消えてしまい、

その後の子オブジェクトが階層パスを見つけられなくなることでクラッシュが発生している可能性がある。

(本プロジェクトでは、メニューを閉じる前に変数を切り替えて子オブジェクトを先に消し、その後メニューを閉じるようにしたところ、クラッシュは発生しなくなった。)

:warning:補足:

もし「オブジェクト(bug)の VS(ステートマシン)」の

「消失 / 削除 /disappear」アクション内の「変数を変更」を有効にすると、

クラッシュは発生しなくなる。

(つまり、メニュー閉鎖時に子オブジェクトを削除しておけば、再度メニューを開いたときに正常に生成される。)

1.1

2.

///

EN:

菜单界面生成对象崩溃.rar (594.3 KB)

Reproduction Steps:

  1. Run the scene

  2. Press Z to open the menu and wait for objects to finish generating (this process is a bit laggy)

  3. Press Z again to close the menu, then open the menu again

    (Sometimes it crashes on the first reopen, sometimes on the second)

Problem Description:

Opening the menu and generating objects works normally (but with some lag).

Closing the menu also works normally.

(I tested both deleting and not deleting objects when closing the menu.)

However, when reopening the menu:

  • It may crash immediately

  • Or it may crash during object generation

Suspected Cause:

When closing the menu, the ObjectMountTarget node disappears first,

and subsequent child objects cannot find their hierarchy path, leading to 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 the menu itself closes. With this change, no crashes occur.)

:warning:Additional Note:

If you enable “Change Variable” in the “Disappear/Delete” action

within the VS (state machine) of the object [bug],

the crash no longer happens.

(In other words, if child objects are deleted when the menu closes,

they generate correctly when the menu is reopened.)

1.1

2.

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

1 Like