Search Issue Tracker
Fixed
Fixed in 2020.3.38f1, 2021.3.9f1, 2022.1.12f1, 2022.2.0b2, 2023.1.0a1
Votes
0
Found in
2022.1.3f1
2022.2.0a14
2023.1.0a1
Issue ID
UUM-607
Regression
Yes
[IL2CPP] Player hangs for 20 seconds after closing it when running threads
Reproduction steps:
1. Open the user's attached "SlowShutdown.zip" project
2. Go to Edit > Project Settings > Player > Other Settings > Configuration and make sure IL2CPP is set as Scripting Backend
3. Build and Run for PC, Mac & Linux Standalone
4. After the project is built and the Player opens, close it
Expected result: Player closes instantly
Actual result: Player hangs and closes after 20 seconds
Reproducible with: 2021.1.0a8, 2021.3.3f1, 2022.1.1f1, 2022.2.0a14
Not reproducible with: 2019.4.39f1, 2020.3.34f1, 2021.1.0a7
Not reproducible with: Mono Scripting Backend
Tested and reproduced with: Windows 10
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
- Crash on GizmoDrawingPhysics2D::DrawCompositeCollider2DGizmo when opening a Scene that has corrupted GameObjects with Tilemap Components
- Scrolling vertically and horizontally is very fast when in Play Mode and RuntimeInputBackend is set to UIToolkitInputBackendOption.Default
- Crash on MemoryProfiler::UnregisterAllocation when initializing entities and leaving Play Mode with Occlusion Culling enabled
- Crash on mdb_page_alloc when opening a project that was running while the PC shut down
- macOS Player freeze when using RunInBackground and Command+Tabbing to and from the application
Resolution Note (fix version 2020.3.38f1):
In 2020.3 the player didn't hang for 20 seconds, but has the same underlying issue. The issue is that IL2CPP leaks an internal thread object each time a thread is created. The shutdown code in 2021.2+ caused these leaked thread objects to slow the player close.
So this fix only cleans up that memory leak (which is relatively small).