Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Bug (IN-27321) Unity 2022.2.1 keep crashing

Discussion in 'Graphics for ECS' started by optimise, Dec 30, 2022.

  1. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,137
    Editor just keep crashing when working on project but it's not happening at Unity 2021.3.x LTS. Seems like it's regression at graphics rendering side.

    Obtained 54 stack frames

    0x00007ff7bb3c71c2 (Unity) GeometryJobTasks::ScheduleSharedGeometryJobs

    0x00007ff7bb3c7341 (Unity) GfxDevice::ScheduleSharedGeometryJobsInternal

    0x00007ff7bb6a7511 (Unity) GfxDeviceClient::ScheduleSharedGeometryJobsInternal

    0x00007ff7bce4a234 (Unity) ParticleSystemGeometryJob::ScheduleJobs

    0x00007ff7baee2104 (Unity) DispatchGeometryJobs

    0x00007ff7baebc67e (Unity) Camera::CustomRender

    0x00007ff7baeca3d4 (Unity) RenderManager::RenderCameras

    0x00007ff7bbfe5330 (Unity) RepaintController::RenderPlayModeViewCameras

    0x00007ff7bc4872be (Unity) EditorGUIUtility::RenderPlayModeViewCamerasInternal

    0x00007ff7baa43b53 (Unity) EditorGUIUtility_CUSTOM_RenderPlayModeViewCamerasInternal_Injected

    0x000002e96105ae18 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.EditorGUIUtility:RenderPlayModeViewCamerasInternal_Injected (UnityEngine.RenderTexture,int,UnityEngine.Vector2&,bool,bool)

    0x000002e96105ad23 (Mono JIT Code) UnityEditor.EditorGUIUtility:RenderPlayModeViewCamerasInternal (UnityEngine.RenderTexture,int,UnityEngine.Vector2,bool,bool)

    0x000002e961059a73 (Mono JIT Code) UnityEditor.PlayModeView:RenderView (UnityEngine.Vector2,bool)

    0x000002e79e174a3b (Mono JIT Code) UnityEditor.GameView:OnGUI ()

    0x000002e79e165cda (Mono JIT Code) UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect)

    0x000002e79e165af3 (Mono JIT Code) UnityEditor.DockArea:DrawView (UnityEngine.Rect)

    0x000002e79e15610b (Mono JIT Code) UnityEditor.DockArea:OldOnGUI ()

    0x000002e79df1ce0f (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)

    0x000002e79dfe94db (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)

    0x000002e79dfe7173 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoIMGUIRepaint ()

    0x000002e79dfe5594 (Mono JIT Code) UnityEngine.UIElements.UIR.RenderChainCommand:ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams,single,System.Exception&)

    0x000002e79dfe3b53 (Mono JIT Code) UnityEngine.UIElements.UIR.UIRenderDevice:EvaluateChain (UnityEngine.UIElements.UIR.RenderChainCommand,UnityEngine.Material,UnityEngine.Material,UnityEngine.Texture,UnityEngine.Texture,single,Unity.Collections.NativeSlice`1<UnityEngine.UIElements.UIR.Transform3x4>,Unity.Collections.NativeSlice`1<UnityEngine.Vector4>,UnityEngine.MaterialPropertyBlock,bool,System.Exception&)

    0x000002e79dfe0893 (Mono JIT Code) UnityEngine.UIElements.UIR.RenderChain:Render ()

    0x000002e79df42413 (Mono JIT Code) UnityEngine.UIElements.UIRRepaintUpdater:Update ()

    0x000002e8bee7f356 (Mono JIT Code) UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase)

    0x000002e8bee7f22b (Mono JIT Code) UnityEngine.UIElements.Panel:UpdateForRepaint ()

    0x000002e8bee7d6fb (Mono JIT Code) UnityEngine.UIElements.Panel:Repaint (UnityEngine.Event)

    0x000002e8bee7c6f7 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)

    0x000002e8bee7c363 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)

    0x000002e8bee7c11f (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:processEvent (int,intptr)

    0x000002e8bee7c03b (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)

    0x000002e8bee7be9d (Mono JIT Code) UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

    0x000002e8bee7bf56 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)

    0x00007ffba45e0394 (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)

    0x00007ffba451eb44 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3066)

    0x00007ffba451ecdc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3113)

    0x00007ff7bb4b2174 (Unity) scripting_method_invoke

    0x00007ff7bb492b24 (Unity) ScriptingInvocation::Invoke

    0x00007ff7bb48d785 (Unity) ScriptingInvocation::Invoke<void>

    0x00007ff7bb5d5e1a (Unity) Scripting::UnityEngine::GUIUtilityProxy::processEvent

    0x00007ff7bbfad1f8 (Unity) GUIView::processRetainedMode

    0x00007ff7bc589226 (Unity) GUIView::OnInputEvent

    0x00007ff7bbfad143 (Unity) GUIView::processInputEventFromAPI

    0x00007ff7bbfad018 (Unity) GUIView::processInputEvent

    0x00007ff7bc5822ac (Unity) GUIView::DoPaint

    0x00007ff7bc58b13c (Unity) GUIView::RepaintAll

    0x00007ff7bc0cc58e (Unity) PlayerLoopController::InternalUpdateScene

    0x00007ff7bc0d8d9d (Unity) PlayerLoopController::UpdateSceneIfNeededFromMainLoop

    0x00007ff7bc0d7191 (Unity) Application::TickTimer

    0x00007ff7bc55dd1a (Unity) MainMessageLoop

    0x00007ff7bc562050 (Unity) WinMain

    0x00007ff7bd92752e (Unity) __scrt_common_main_seh

    0x00007ffc3c067614 (KERNEL32) BaseThreadInitThunk

    0x00007ffc3d8626a1 (ntdll) RtlUserThreadStart
     
  2. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    Hi, yes it is. It seems particle system related so probably nothing to do with Entities Graphics. Thanks for the report, we'll let incoming QA repro it and get it to the correct team.
     
    optimise likes this.
  3. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    648
    Seeing the same thing in a non-ECS project, found this thread when googling the function at the top of the call stack.

    It's basically a showstopper for 2022.2.1f1, crashing the editor quite frequently and unpredictably.
     
  4. Holy-Manfred

    Holy-Manfred

    Joined:
    Nov 30, 2013
    Posts:
    15
    Any update on this issue? Still crashing frequently in 2022.2.2.f1
     
    Manamongods likes this.
  5. Rukas90

    Rukas90

    Joined:
    Sep 20, 2015
    Posts:
    169
    Same here. After updating to 2022.2.9, been experiencing non-stop crashing. Couldn't even update a package. Would always crash mid-way... Was forced to revert my project back to 2021
     
  6. VincentBreysse

    VincentBreysse

    Unity Technologies

    Joined:
    May 31, 2021
    Posts:
    28
  7. Thygrrr

    Thygrrr

    Joined:
    Sep 23, 2013
    Posts:
    705
    First things first - a potential workaround (for OP): Try setting your graphics API to Vulkan in player settings. From dozens of crashes in a day, I have been crash-free for three days now.

    DX12 might also work, but shadow mapping breaks for me; DisableRendering is not respected by the DX12 backend on the shadow caster pass (or something). But Vulkan works great.

    EDIT: I'm no longer able to reproduce the crash on either API; but I was able reproduce and un-produce the crashing before. So possibly, recent OS updates (e.g. KB5023706) or nVidia updates caused some unfortunate constellation of configurations to dissipate. I only used this machine like always, though. Just in case to let you know.


    I am sorry, but these cases perhaps say otherwise, or there are more crashes than one:

    IN-34770
    IN-34638
    IN-34634
    IN-34631
    IN-34592
    IN-34482
    IN-34398
    IN-34374
    IN-34369
    IN-34365
    IN-34685

    The frequent crash doesn't necessarily occur with particles, but rather randomly, but most likely on EditorApplication gains focus or after / just before domain reload; this crash most decidedly does not occur without Hybrid Renderer because I have a non-ECS work project on the same tech stream and URP version, on the same computer, open every workday, together with a dozen colleagues, and that one doesn't crash.

    The crash usually occurs in one of these places here:
    0x00007FFC29BA587B (d3d11) CreateDirect3D11SurfaceFromDXGISurface
    0x00007FF60A4EB9B6 (Unity) BufferD3D11::EndWrite
    0x00007FF60A4DEA53 (Unity) GfxDeviceD3D11Base::EndBufferWrite
    0x00007FF60A29CCD6 (Unity) GeometryJobTasks::putGeometryJobTaskInternal


    or
    0x00007FFBA151D0F5 (d3d11) EnableFeatureLevelUpgrade
    ... (rest similar or same)

    or
    0x00007FF68074B1AD (Unity) BufferD3D11::EndWrite
    ... (rest similar or same)

    or
    0x00007FF680206CA7 (Unity) DebugDidSyncFence_NoLock
    0x00007FF680206B9C (Unity) DebugDidSyncFence
    0x00007FF68020FB4F (Unity) CompleteFenceInternal

    ... (also goes to PutGeometryJobTaskInternal)
     
    Last edited: Mar 15, 2023
  8. VincentBreysse

    VincentBreysse

    Unity Technologies

    Joined:
    May 31, 2021
    Posts:
    28
    I was specifically talking about the ticket the OP linked here. The callstack it contains is very similar to the one reported in the other forum post I linked, which apparently reproduces without anything ECS related. It also explicitly mentions ParticleSystemGeometryJob::ScheduleJobs which means it's likely not in our area.

    Now regarding the other tickets you mentioned, at a first glance they definitely look like different issues than the one the OP raised. From your callstacks, it's not obvious that EG is at fault but it's still possible we caused those crashes indirectly somehow.

    In any case though, if you can't repro the crashes without Entities Graphics then I think we need to investigate them ASAP considering how frequent they seem to be. However we can't help much without repro projects, and none of your tickets actually includes any except the first one.

    It's also a bit weird because the whole team (which includes devs and QAs) is usually working with latest 2022.2 and DOTS packages and no one has reported such frequent crashes on desktop platforms. Even on big projects like Megacity and some others we have internally.
     
    Last edited: Mar 13, 2023
    Thygrrr likes this.
  9. LightYarn

    LightYarn

    Joined:
    Nov 18, 2012
    Posts:
    77