Search Issue Tracker
Third Party Issue
Votes
0
Found in
6000.0.47f1
6000.1.12f1
6000.2.0b10
6000.3.0a3
Issue ID
UUM-112741
Regression
No
Crash on IMGUI::GUIWindow::OnGUI when rendering scene view window in play mode in a specific project
Reproduction steps:
1. Open the attached project "CrashRepro"
2. Focus scene view window
3. Click on “Main“ and “MainCamera“ in the Hierarchy window
4. Enter Play mode
5. Focus scene view window
Expected result: Scene view window is focused
Actual result: Editor crashes
Reproducible with: 6000.0.47f1, 6000.1.12f1, 6000.2.0b10, 6000.3.0a3
Reproducible on: Windows 11
Not reproducible on: No other environment tested
First few lines of stack trace:
{noformat}0x00007FFC4B04743C (Unity) IMGUI::GUIWindow::OnGUI
0x00007FFC4B045D61 (Unity) IMGUI::EndWindows
0x00007FFC49EB88CB (Unity) GUI_CUSTOM_Internal_EndWindows
0x0000020FA89EFD17 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.GUI:Internal_EndWindows ()
0x0000020FA89EFC4B (Mono JIT Code) UnityEngine.GUI:EndWindows ({noformat}
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 GUIManager::DoGUIEvent when focusing on the Game view window on a specific project
- Asset creation in the Project Browser is not always undone/inconsistent when the undo shortcut is pressed right after creating an asset
- JobTempAlloc memory leak warning is thrown when the Player is shut down
- Graphics State Collection warm-up does not work when using with Addressables Shaders
- "Baked Shadow Radius" field is visible but inactive when when the Shadow Type is set to "Hard Shadows" under the Light Component
Resolution Note:
Issue seems to be stemming from a third party asset's (tk2d) compatibility issues with U6. The crash originates from the tk2dCameraEditor.cs file, specifically PreviewWindowFunc's previewCamera.Render() call.
The current recommended practice would be to get a temporary render texture using RenderTexture.GetTemporary, set it as the target of the preview camera, render the preview camera and finally use Graphics.DrawTexture to output the render texture to the preview window. We've tested this approach within PreviewWindowFunc and it does not crash the editor.
For an example on how to do camera previews in Scene View, please take a look at: https://github.com/Unity-Technologies/UnityCsReference/blob/master/Modules/SceneView/CameraOverlay.cs