Search Issue Tracker

Won't Fix

Votes

2

Found in

2021.3.21f1

2022.2.12f1

2023.1.0b9

2023.2.0a8

Issue ID

UUM-31367

Regression

Yes

Crash on PhysicMaterial::GetInstantiatedMaterial when accessing Physics materials more than 64 thousand times

--

-

Reproduction steps:
1. Open the attached “Test Project” project
2. Open the “Scenes/SampleScene” Scene
3. Enter the Play Mode

Expected result: The Editor runs the “Script.cs” Script without any issues
Actual result: The Editor crashes

Reproducible with: 2021.2.0a21, 2021.2.19f1, 2021.3.21f1, 2022.2.12f1, 2023.1.0b9, 2023.2.0a8
Not reproducible with: 2020.3.46f1, 2021.2.0a20

Reproducible on: Windows 10

First lines of the stack trace:
0x00007ff6b6d0a592 (Unity) PhysicMaterial::GetInstantiatedMaterial
0x00007ff6b6cdb599 (Unity) Collider::GetClonedMaterial
0x00007ff6b626bf58 (Unity) Collider_Get_Custom_PropMaterial
0x0000014adcc734b1 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Collider:get_material (UnityEngine.Collider)
0x0000014adcc72e23 (Mono JIT Code) [Script.cs:10] Script:Start ()

Note:
- For “Not reproducible with” versions, the Console printed an error instead of crashing: “PxPhysics::createMaterial: limit of 64K materials reached.”

  1. Resolution Note:

    There are no fixes planned for this Bug

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.