Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.4.0f1
2018.2.13f1
Issue ID
1094958
Regression
No
Editor crashes with Camera::SetupRender or Camera::CustomRender when using multiple objects with custom reflective shader
How to reproduce:
1. Open attached "case_1094958-Experiments_smallRepro.zip" project in comment
2. Duplicate "Mirror" object in Hierarchy
Expected result: Selected object duplicates
Actual result: Editor crashes
Reproduced with: 2017.4.15f1, 2018.2.16f1, 2018.3.0b10, 2019.1.0a8
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 (2019.1.X):
Looking at the code there is some bad recursion happening in the script that is causing this to happen.
Calling for 'OnWillRenderObject' is creating a reflection camera (if none exists) in the function `CreateMirrorObjects`. If there is only one Mirror object in the scene this is okay as this function will only be called for the one camera.If there are two mirror objects, this function will be called in a way that continually creates new Cameras and then calls render on them. This will lead to a crash and stack overflow.
The correct fix here is to revise how you do the reflection calculation and not have recursion in your reflection rendering.