Search Issue Tracker

Third Party Issue

Votes

0

Found in

2022.3.32f1

6000.0.5f1

Issue ID

UUM-73492

Regression

No

Crash on profiler_begin_instance_id when entering Play Mode with a certain VFX enabed

-

How to reproduce:
1. Open the attached "MuzzleCrashRepro" project
2. Open the “Assets/Level/Scenes/SampleScene.unity“ Scene
3. Enter Play Mode

Reproducible with: 2022.3.32f1, 6000.0.5f1
Couldn’t test with: 2021.3.39f1 (Game view is black and errors in the Console when in Play Mode)

Reproducible on: macOS 14.5 Sonoma (Intel), Windows 11 (reported by user)
Not reproducible on: No other environment tested

Notes:
- Crash occurs when any of the “MuzzleFlash“ GameObjects are enabled in the Hierarchy and entering Play Mode
- Couldn’t test if the issue is reproducible in Player due to building getting stuck on compiling shaders

First few lines of stack trace:
0x00007FFD4A348362 (Unity) profiler_begin_instance_id
0x00007FFD4B129AE9 (Unity) VFXRenderer_Render
0x00007FFD4A069827 (Unity) BatchRenderer::RenderBatch
0x00007FFD4A06013E (Unity) BatchRenderer::Add
0x00007FFD4A266207 (Unity) ScriptableRenderLoopDraw

  1. Resolution Note:

    The game is using a plugin (QuickOutline) that is incorrectly handling VFX.
    This plugin gathers renderers and adds 2 extra materials to them. This is not expected with VFX and it does not make sense.
    This extra materials result in extra drawcalls with invalid data, which result in a crash.
    One way to avoid the crash would be to filter the list of renderers used by the plugin to only use MeshRenderer and SkinnedMeshRenderer, which seems to be the only ones expected to work with it.
    The code adding the materials is in Assets/QuickOutline/Scripts/Outline.cs
    ```
    void OnEnable() {
    foreach (var renderer in renderers) {

    // Append outline shaders
    var materials = renderer.sharedMaterials.ToList();

    materials.Add(outlineMaskMaterial);
    materials.Add(outlineFillMaterial);

    renderer.materials = materials.ToArray();
    }
    }
    ```

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.