Hello, I used Unity as my game server, but now I'm encountering a problem and it crashes several times a day. And there are only dmp and no other logs in the directory, so I opened an editor to display the logs,This problem has been bothering me for a while. It seems to be related to physical simulation. I opened 40 physical scenes for the player's room
Can you build the player with "Copy PDB Files" option and send me UnityPlayer.dll & the PDB file that gets copied next to it?
Thanks, I received it. It seems it crashes somewhere where you call Physics.Simulate() from your script. I cannot tell which script is calling it, unfortunately. Something seems to go wrong with detecting trigger enter/exits. Also, it seems you are using the China version of Unity. While they are similar in practice, they do have their differences and I do not have access to view its code. The support for them is handled by Unity China over at https://developer.unity.cn/.
Thank you, as there is no dedicated technical support for Chinese forums, I have asked before but have not received a response. May I ask how you know the problem occurred in the trigger enter, can I locate which script in some way, and why the logic in the trigger enter can cause crashes? Can I use try catch to avoid crashes, or what other way to avoid crashes? I really want to locate the script and avoid crashes now
Is there an infinite loop in the trigger enter or an array out of bounds in the trigger enter? Can I use try catch to avoid crashes? Shouldn't it usually be an error? Why is it a direct crash
I opened the .dmp file you sent me in Visual Studio and pointed it at the PDB file you sent me. I found this callstack: It seems it's accessing invalid memory for one of the trigger enter/exit colliders. Try/catch will not work, it's an internal engine crash in native code. Do you have many trigger colliders in your scene? Perhaps it's worth trying to delete them 1 by 1 until you find the culprit? How many places do you have Physics.Simulate() from?
I have over 40 physic scenes, and each scene will be simulated by myself. There are triggers in each scene, which are used to switch scene. I did a crash when entering the trigger used for switching scene before, but the probability was particularly low, and my intuition was also that the trigger used for this switching scenario caused the crash
I suggest reporting a bug on this using the in-editor bug reporter. I will move this post to the Physics forum in case somebody there has some better tips. I don't know enough about that system.