Search Issue Tracker
Fixed
Votes
2
Found in
2023.2.0a13
Issue ID
UUM-34302
Regression
Yes
Memory leaks and the Editor crashes eventually when in Play mode
Reproduction steps:
1. Open the attached “MemoryLeakIssue-2023.2.zip“ project
2. Open the “01-Boot” scene
3. Press the “F5” key and click on the "起動" button in the Game window
4. Click on the top-left corner of the Game window
5. Click on the "00.Menu”, “Offline Battle" and then "Start Battle" buttons
6. Open the “Activity Monitor” app and observe the Memory of the Unity Process
Expected result: Memory does not leak
Actual result: Memory leaks and Editor eventually crashes
Reproducible with: 2023.2.0a1, 2023.2.0a13
Not reproducible with: 2023.1.0a26, 2023.1.0b14
Could not test with: 2020.3.47f1, 2021.3.24f1, 2022.2.17f1 (Errors in the Console)
Reproduced on: macOS Monterey 12.6 (Intel), macOS Darwin 13.2.1 (M1) (by the reporter)
Not reproduced on: Windows 11
Notes:
- ”GC Allocated in Frame” is constantly spiking, therefore, might be the cause of the Memory leak
- Reproduced crash Stack Trace is different from the user's
- Could not test on Builds due to errors in the Console
First few lines of Stack Trace:
#0 0x00000100ea9511 in void WriteLineVertex<false>(unsigned char*&, math::float4x4 const&, float vector[3] const&, ColorRGBA32 const&, math::float1 const&, math::float1 const&, float vector[2] const&)
#1 0x0000010309dd84 in void BuildParticleLineSegment<false, unsigned short>(unsigned long, unsigned char*&, unsigned short*&, unsigned int&, math::float4x4 const&, LineBuilderData const*, math::float1 const&, math::float1 const&, math::float1 const&, ColorRGBA32)
#2 0x0000010309c89f in ParticleSystemTrailGeometryJob::RenderJobCommon(ParticleSystemTrailGeometryJob&, void*, void*, unsigned int, unsigned int)
#3 0x000001030990e1 in ParticleSystemTrailGeometryJob::RenderJob(SharedGeometryJobData*, unsigned int)
#4 0x0000010104cc43 in ujob_execute_job(ujob_control_t*, ujob_lane_t*, ujob_job_t*, ujob_handle_t, int)
User's first few lines of Stack Trace:
#0 0x0000029e1cfed8 in mono_jit_runtime_invoke
#1 0x0000029e355018 in do_runtime_invoke
#2 0x0000029e354f58 in mono_runtime_invoke
#3 0x00000100c37e94 in scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
#4 0x00000100c12c6c in ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
-
AlexandreOversoc
May 05, 2023 12:51
The problem also arises when building from Unity editor on Windows/Linux for Mac. The Mac build will result in a significant memory leak, causing the Mac to request killing an application due to insufficient available RAM. The issue is not present on Linux and Windows.
Thanks
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android] [Particle System] "ParticleSystem.GeometryJob" sometimes takes up to ~20 ms in the worker thread when initializing 5 Particle Systems
- Can't change OpenXR settings when switching Build Profiles
- L(a,b) expression in float fields has erratic behaviour when ordering due to using instanceID as an index
- InvalidOperationException is thrown when switching to a custom Debug Draw Mode in Scene View
- [Android][Vulkan] Skybox and Environment effects flicker in the Player when using the Vulkan Graphics API
Resolution Note:
Fixed by https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-31722