Hey All,
We’ve been working to find the cause of a crash that has made our beta unplayable, and we thought it might be worth posting to see if anyone else knows offhand what the cause might be. We can’t provide an example project because it’d be too involved, but for what it’s worth, we’ve submitted a copy of the project via the Unity Bug Reporter so that the staff can have a means to reproduce this.
We’ve got a 2D game that is comprised of a single scene and uses prefabs to store complex particle effects that get loaded into the scene at the start of the game. When the player uses a skill, the prefab game object for that skill’s particle effect gets set to active, and once the effect is done running it gets set back to inactive.
When the player switches maps, the game calls Resources.UnloadUnusedAssets() to release any textures/etc that aren’t being used anymore. Then when the player goes to use a skill that activates one of those same particle effect game objects again, the game or editor crashes to desktop and generates a dmp file. (It took us a long time to figure out that calling UnloadUnusedAssets was required to get the crash to occur)
The stack trace and exception are in the attached screenshot. It’s failing on a line in SpriteRenderData.cpp due to “write access violation. this → m_SharedMeshData was nullptr”.
Has anyone seen this issue before? And if not, does anyone have an idea of how to fix it? Based on the call stack, it looks like it’s coming from a particle system’s OnAwake.
Thanks in advance for any help you all can provide!
-Frost