Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug [IN-43583] Possible memory corruption/overwrite with High Quality Line Rendering

Discussion in '2023.1 Beta' started by schema_unity, Jun 10, 2023.

  1. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    I've been having an issue with builds of my project hard crashing at random points (2023.1b14, and happening in 2023.1b20). It would happen seconds or minutes into running the build at seemingly random points.

    From debugging the stack traces look to be at different origins. However, all of them have in common that it happens somewhere in either allocation or deallocation of memory. From this pattern I assume this is due to memory corruption from overwrite and/or double deallocation.

    Here are some typical examples:

    Code (CSharp):
    1. 0x00007FFE0C33F222 (UnityPlayer) block_remove
    2. 0x00007FFE0C33FA3A (UnityPlayer) tlsf_free
    3. 0x00007FFE0B4378C3 (UnityPlayer) DynamicHeapAllocator::Deallocate
    4. 0x00007FFE0B43EC9B (UnityPlayer) DualThreadAllocator<DynamicHeapAllocator>::TryDeallocate
    5. 0x00007FFE0B43B360 (UnityPlayer) MemoryManager::Deallocate
    6. 0x00007FFE0B6BB13D (UnityPlayer) profiler_start_new_frame
    7. 0x00007FFE0B6A366E (UnityPlayer) `InitPlayerLoopCallbacks'::`2'::InitializationProfilerStartFrameRegistrator::Forward
    8. 0x00007FFE0B69AAD7 (UnityPlayer) ExecutePlayerLoop
    9. 0x00007FFE0B69AC84 (UnityPlayer) ExecutePlayerLoop
    10. 0x00007FFE0B69B034 (UnityPlayer) PlayerLoop
    11. 0x00007FFE0B8E36BB (UnityPlayer) PerformMainLoop
    12. 0x00007FFE0B8E5A1B (UnityPlayer) MainMessageLoop
    13. 0x00007FFE0B8E8D80 (UnityPlayer) UnityMainImpl
    14. 0x00007FFE0B8E8F8B (UnityPlayer) UnityMain
    Code (CSharp):
    1.  
    2. 0x00007FFEBD6A7D32 (UnityPlayer) block_remove
    3. 0x00007FFEBD6A854A (UnityPlayer) tlsf_free
    4. 0x00007FFEBC7A7983 (UnityPlayer) DynamicHeapAllocator::Deallocate
    5. 0x00007FFEBC7ACEE2 (UnityPlayer) DelayedPointerDeletionManager::CleanupPendingMainThreadPointersInternal
    6. 0x00007FFEBC7AE8A9 (UnityPlayer) DualThreadAllocator<DynamicHeapAllocator>::Allocate
    7. 0x00007FFEBC7AAE88 (UnityPlayer) MemoryManager::Allocate
    8. 0x00007FFEBCADA630 (UnityPlayer) dynamic_array_detail::dynamic_array_data::resize_buffer
    9. 0x00007FFEBC6D6BBC (UnityPlayer) dynamic_array<double,0>::resize_buffer_nocheck
    10. 0x00007FFEBC9453EF (UnityPlayer) RenderingCommandBuffer::PPtrResolver<Material>::Resolve
    11. 0x00007FFEBC93EAA8 (UnityPlayer) RenderingCommandBuffer::PrepareState
    12. 0x00007FFEBC999445 (UnityPlayer) ScriptableRenderContext::ExecuteScriptableRenderLoop
    13. 0x00007FFEA2F3BCE2 (GameAssembly) [\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\Unity.RenderPipelines.HighDefinition.Runtime__2.cpp:70710] HDRenderPipeline_Render_mD5A5DFADAEB2A8DB36E4261A8154AB6206D56557
    14. 0x00007FFEA32056CD (GameAssembly) [\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\UnityEngine.CoreModule__4.cpp:27502] RenderPipelineManager_DoRenderLoop_Internal_mB646C8738F4A9859101F3BE94809E2E10BBDB1FB
    15. 0x00007FFE9FE70D16 (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2023.1.0b14\Editor\Data\il2cpp\libil2cpp\vm\Runtime.cpp:638] il2cpp::vm::Runtime::InvokeWithThrow
    16. 0x00007FFE9FE707B9 (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2023.1.0b14\Editor\Data\il2cpp\libil2cpp\vm\Runtime.cpp:623] il2cpp::vm::Runtime::Invoke
    17. 0x00007FFEBC99B1CD (UnityPlayer) ScriptableRenderContext::ExtractAndExecuteRenderPipeline
    18. 0x00007FFEBC83A4FC (UnityPlayer) RenderManager::RenderCamerasWithScriptableRenderLoop
    19. 0x00007FFEBC83AC5C (UnityPlayer) RenderManager::RenderCameras
    20. 0x00007FFEBCA0F45F (UnityPlayer) PlayerRender
    21. 0x00007FFEBCA06C37 (UnityPlayer) ExecutePlayerLoop
    22. 0x00007FFEBCA06DE4 (UnityPlayer) ExecutePlayerLoop
    23. 0x00007FFEBCA07194 (UnityPlayer) PlayerLoop
    24. 0x00007FFEBCC4E86B (UnityPlayer) PerformMainLoop
    25. 0x00007FFEBCC50BCB (UnityPlayer) MainMessageLoop
    26. 0x00007FFEBCC53F30 (UnityPlayer) UnityMainImpl
    27. 0x00007FFEBCC5413B (UnityPlayer) UnityMain
    28.  

    Code (CSharp):
    1.  
    2. 0x00007FFE0C33F222 (UnityPlayer) block_remove
    3. 0x00007FFE0C33FA3A (UnityPlayer) tlsf_free
    4. 0x00007FFE0B4378C3 (UnityPlayer) DynamicHeapAllocator::Deallocate
    5. 0x00007FFE0B43EC9B (UnityPlayer) DualThreadAllocator<DynamicHeapAllocator>::TryDeallocate
    6. 0x00007FFE0B43B360 (UnityPlayer) MemoryManager::Deallocate
    7. 0x00007FFE0B4380D4 (UnityPlayer) operator delete
    8. 0x00007FFE0B6ED36F (UnityPlayer) std::_Tree_val<std::_Tree_simple_types<HWND__ * __ptr64> >::_Erase_tree<std::allocator<std::_Tree_node<HWND__ * __ptr64,void * __ptr64> > >
    9. 0x00007FFE0B6EA70F (UnityPlayer) ContainerClear<std::map<DeprecatedFastPropertyNameSerialization,float,std::less<DeprecatedFastPropertyNameSerialization>,std::allocator<std::pair<DeprecatedFastPropertyNameSerialization const ,float> > > >
    10. 0x00007FFE0B6DC028 (UnityPlayer) UnityPropertySheet::operator=
    11. 0x00007FFE0B6DF777 (UnityPlayer) Material::CopyPropertiesFromMaterial
    12. 0x00007FFE0B25FDC4 (UnityPlayer) Material_CUSTOM_CopyPropertiesFromMaterial_Injected
    13. 0x00007FFE001B6049 (GameAssembly) [\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\Unity.DemoTeam.Hair.Runtime.cpp:16394] HairInstance_UpdateRendererState_mDF3D80D342772090F4792EBA1923809AFDDF3EA9
    14. 0x00007FFE001B6A69 (GameAssembly) [\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\Unity.DemoTeam.Hair.Runtime.cpp:16193] HairInstance_UpdateRenderingState_m960FD4D03064646506BBED4A8CED51AA88A46A23
    15. 0x00007FFE001B30E4 (GameAssembly) [\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\Unity.DemoTeam.Hair.Runtime.cpp:14428] HairInstance_HandlePrerequisiteCompleted_m0CE6D3A6CA3FF2827B6961860CA7A58C7B92D6EB
    16. 0x00007FFE001B422D (GameAssembly) [\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\Unity.DemoTeam.Hair.Runtime.cpp:14480] HairInstance_LateUpdate_mD2B573892A690C28007C6C6858C0E1D174E855E1
    17.  
    To debug this, I first began to deconstruct my scene, which was not very complex (just one animated character). Turning off the hair got rid of the crashes.

    I investigated more, and turning off High Quality Line Rendering either on the hair or via HDRP settings also removed the crashes.

    Further testing revealed that it was the composition mode the Line Rendering was set to.

    Setting the HQ Line Rendering Composition mode to "After Temporal Antialiasing" in the HDRP settings is causing the issue (I had been using it since a custom pass was messing with the depth buffer creating artifacts on the hair. Turning off custom passes did not get rid of the crashes, however.)
    (edit: see posts down below)

    Here is some more information that might be useful:

    • Happens on both il2cpp and mono
    • Happens with incremental garbage collection and also without
    • Happens on Direct3D_11, Direct3D_12, but seemingly not Vulcan (which ran significantly slower)
    • Does not happen in editor (both edit and play mode). It only happens on a build
    • It didn't seem to happen when building development builds. With release builds it would happen quickly (30 sec - 2 min).
    • Tested on Windows 10, Intel i9-12900KF, NVIDIA 3090 with latest drivers
    • Tested Unity versions: 2023.1b14 and 2023.1b20
    I've ran the build with the '-debugallocator' cmd line argument, but I couldn't see any difference in the stack traces.


    I'm not sure if I can quickly throw together and test a stripped down project for reproducing as I'm currently very busy, but I will try should it be necessary.
     
    Last edited: Jun 13, 2023
  2. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    The crashes still seem to happen on other composition modes, though less frequently. I will try some things to see if it really is caused by line rendering, or if that just makes it easier for it to trigger.

    EDIT:
    It seems like the crashes are happening on all composition modes, but they happen a lot more frequently on "After Temporal Antialiasing". I have gotten the crash on all modes, also while turning custom pass off.

    It doesn't seem to happen when turning off High Quality Line Renderer, still.

    The crashes do not happen in a development build. I had it running for 30+ minutes, while without development build it crashes within 30 sec.
     
    Last edited: Jun 11, 2023
  3. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    So... it doesn't crash in development build.

    But it does crash when I run the development build with the "-debugallocator" argument.


    Code (CSharp):
    1. ========== OUTPUTTING STACK TRACE ==================
    2. 0x00007FFE99189A4A (UnityPlayer) profiling::ProfilerManager::DisposeProfilerRecorder
    3. 0x00007FFE987FCE0B (UnityPlayer) ProfilerRecorder_CUSTOM_Control_Injected
    4. 0x00007FFE380BFD84 (GameAssembly) [\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\UnityEngine.CoreModule.cpp:8952] ProfilerRecorder_Control_m523BF56A25C70F4A89D3D1FF79B2596E8F3A7873
    5. 0x00007FFE380C020B (GameAssembly) [\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\UnityEngine.CoreModule.cpp:9103] ProfilerRecorder_Dispose_m6154715CD36B2CDE7B9DB390E0FEC335D75C96EB
    6. 0x00007FFE38208D0D (GameAssembly) [\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\UnityEngine.CoreModule__3.cpp:32020] Recorder_Finalize_mBF7E97C65CF9B2082B073AC844783635EF623330
    7. 0x00007FFE38FC8D26 (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2023.1.0b20\Editor\Data\il2cpp\libil2cpp\vm\Runtime.cpp:638] il2cpp::vm::Runtime::InvokeWithThrow
    8. 0x00007FFE38FC87C9 (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2023.1.0b20\Editor\Data\il2cpp\libil2cpp\vm\Runtime.cpp:623] il2cpp::vm::Runtime::Invoke
    9. 0x00007FFE38FFAAED (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2023.1.0b20\Editor\Data\il2cpp\libil2cpp\gc\GarbageCollector.cpp:200] il2cpp::gc::GarbageCollector::RunFinalizer
    10. 0x00007FFE3904FA08 (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2023.1.0b20\Editor\Data\il2cpp\external\bdwgc\finalize.c:1318] GC_invoke_finalizers
    11. 0x00007FFE38FF98F0 (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2023.1.0b20\Editor\Data\il2cpp\libil2cpp\gc\GarbageCollector.cpp:121] il2cpp::gc::FinalizerThread
    12. 0x00007FFE3903DA69 (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2023.1.0b20\Editor\Data\il2cpp\libil2cpp\os\Thread.cpp:217] il2cpp::os::Thread::RunWrapper
    13. 0x00007FFE390286B3 (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2023.1.0b20\Editor\Data\il2cpp\libil2cpp\os\Win32\ThreadImpl.cpp:29] il2cpp::os::ThreadStartWrapper
    14. 0x00007FFF66107614 (KERNEL32) BaseThreadInitThunk
    15. 0x00007FFF666A26A1 (ntdll) RtlUserThreadStart
    16. ========== END OF STACKTRACE ===========
     
  4. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    Probably best to do a bug report , else chances are small to get this fixed. I already have submitted 5 critical bug reports for 2023.1, one of these is also about high quality lines. It seems to take a few weeks to month to get them fixed.
     
    schema_unity likes this.
  5. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    I managed to reproduce the bug in a simple project with just one hair asset. It takes a bit longer for the bug to happen (probably due to less memory access), but it does happen after ~15 minutes for me.

    I sent in the project with my bug report. I hope it gets addressed soon, as it pretty much makes the high quality hair unusable.

    Incident number: IN-43583
     
    Qleenie likes this.
  6. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    Could you please post here in case QA rejects the report (which often is the case, as they might not be able to do a build etc.) in that case I would also try to reproduce and submit a case, as this feature is very important for us.
     
  7. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    Did you hear back from QA about the issue?
     
  8. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    Nothing yet, unfortunately. Only the initial email saying that they received the report. it's marked as "open" on atlassian.

    Did you get a similar issue?
     
  9. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    The bug has been rejected initially, since the reviewer wasn't able to reproduce it. I expected as much since the build would sometimes only crash after 20 minutes, and judging from the emails between "under review" and the answer, only 30 minutes passed, so subtracting download/setup time, the build might not have been running long enough on their side.

    I've reopened it with an improved version, in which I just copied the hair a couple of times, which as I expected did the trick.Non-development builds from this project will crash in under a minute for me.

    I uploaded the project here: https://drive.google.com/file/d/18G8XO2o65B_cTzsr2CrRdVASdxzZ-owM/view?usp=sharing (there is also an already built version in there for reference)

    so anyone interested can try and reproduce the issue. I used Unity 2023.1.0b20 for this.

    Let me know if you can reproduce the issue, since this is pretty critical for anyone using the high quality lines.
     
  10. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    Hey, I am testing the build right now. So far the build is running for like 10 minutes without a crash on a NVIDIA 3080 (not latest driver, this I'll try next). I guess the build inside is a non dev build?
     
  11. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    stopped it after running for nearly 30 minutes, no crash. I saw a slight increase in GPU memory, but this is usually not a reliable indicator (was like 200MB increase during the 30 minutes of running).
     
  12. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    after updating drivers to latest, still running fine (did a 10 minutes run in fullscreen, around 24 fps, full GPU usage, around 2.2GB of GPU mem used, not really increasing over time).
    Maybe it's something with your GPU? I had issues with my first 3080, it crashed after running something full load for a while, after exchanging issue was gone.
     
  13. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    last thing I tried was do a new build, this also running fine since a few minutes, no crash....

    BTW, where did you get the hair asset from? I am always on the search for new hair assets, difficult to find good ones.
     
  14. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    I will try to update my drivers and try again. It would be good if it was just that. I shouldn't have ruled out the possibility of drivers being the issue. I guess I did because it was only happen on builds and not in editor, though I realize now that memory management for the hardware might be different as well.

    I had the same issue as you with the hair assets. I eventually learned making hair in blender.
     
  15. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    Unfortunately, updating the drivers didn't help. Still getting crashes within like 30 sec.

    Code (CSharp):
    1. ========== OUTPUTTING STACK TRACE ==================
    2.  
    3. 0x00007FFD40BD2965 (UnityPlayer) block_remove
    4. 0x00007FFD40BD312A (UnityPlayer) tlsf_free
    5. 0x00007FFD3FCBC193 (UnityPlayer) DynamicHeapAllocator::Deallocate
    6. 0x00007FFD3FCC356B (UnityPlayer) DualThreadAllocator<DynamicHeapAllocator>::TryDeallocate
    7. 0x00007FFD3FCBFC30 (UnityPlayer) MemoryManager::Deallocate
    8. 0x00007FFD3FF40E5D (UnityPlayer) profiler_start_new_frame
    9. 0x00007FFD3FF28C2E (UnityPlayer) `InitPlayerLoopCallbacks'::`2'::InitializationProfilerStartFrameRegistrator::Forward
    10. 0x00007FFD3FF1EEDB (UnityPlayer) ExecutePlayerLoop
    11. 0x00007FFD3FF1F078 (UnityPlayer) ExecutePlayerLoop
    12. 0x00007FFD3FF1F413 (UnityPlayer) PlayerLoop
    13. 0x00007FFD401721BB (UnityPlayer) PerformMainLoop
    14. 0x00007FFD4017451B (UnityPlayer) MainMessageLoop
    15. 0x00007FFD40177950 (UnityPlayer) UnityMainImpl
    16. 0x00007FFD40177B6B (UnityPlayer) UnityMain
    17. 0x00007FF647CE11F2 (TestHairHDRP) __scrt_common_main_seh
    18. 0x00007FFE014B7614 (KERNEL32) BaseThreadInitThunk
    19. 0x00007FFE02A426F1 (ntdll) RtlUserThreadStart
    20.  
    21. ========== END OF STACKTRACE ===========
    22.  
     
  16. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    I just tested and it also crashed on a completely different second machine (with ATI instead of intel, and a 2080 instead of a 3090).

    Did you run the build that was already in the build folder @Qleenie , or did you build it yourself. I wonder if there is something with my unity install that maybe creates builds with this bug. I'll install and try building the project from the other machine.
     
  17. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    I ran with the build unchanged in Build folder for like 30 minutes, then did a new build, which I again ran for like 10 minutes.
    So it cannot be your Unity installation.
     
  18. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    I'll test your build on a few different machines with different GPU / CPU / Windows versions and see if any is giving same issue, which might help in narrowing down the reason.
     
    schema_unity likes this.
  19. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    I tried to run it on the other machine again for like 10 minutes. Just when I thought the first crash was a fluke, it did crash again, in the same spot, though with a slightly different stack trace.

    Not sure how to proceed from here. I have two machines that reproduce the crash.

    One more question if you don't mind. Are you running windows 10 or 11, since I'm still on 10. (grasping to straws right now)
     
  20. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    I tested with windows 10, next test will be on laptop with windows 11 in a second.
     
  21. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    OK, it's crashing on the Laptop (Win 11, 2080 super GPU), stacktrace:
    Code (CSharp):
    1. ========== OUTPUTTING STACK TRACE ==================
    2.  
    3. 0x00007FFDC4F96C72 (UnityPlayer) PrepareComputeBufferParameters<OverridingParameterPreparer>
    4. 0x00007FFDC4F914A0 (UnityPlayer) GpuProgramParameters::PrepareOverridingValues
    5. 0x00007FFDC519BB7B (UnityPlayer) GfxDeviceD3D11Base::SetShaderPropertiesCopied
    6. 0x00007FFDC5962A03 (UnityPlayer) GfxDeviceWorker::RunCommand
    7. 0x00007FFDC59613CB (UnityPlayer) GfxDeviceWorker::RunExt
    8. 0x00007FFDC5961317 (UnityPlayer) GfxDeviceWorker::RunGfxDeviceWorker
    9. 0x00007FFDC4F49877 (UnityPlayer) Thread::RunThreadWrapper
    10. 0x00007FFE488626AD (KERNEL32) BaseThreadInitThunk
    11. 0x00007FFE49C0A9F8 (ntdll) RtlUserThreadStart
    12.  
    13. ========== END OF STACKTRACE ===========
     
  22. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    And another run gave the following stacktrace:
    Code (CSharp):
    1. An abnormal situation has occurred: the PlayerLoop internal function has been called recursively. Please contact Customer Support with a sample project so that we can reproduce the problem and troubleshoot it.
    2. An abnormal situation has occurred: the PlayerLoop internal function has been called recursively. Please contact Customer Support with a sample project so that we can reproduce the problem and troubleshoot it.
    3. GfxDeviceD3D11Base::WaitForLastPresentationAndGetTimestamp() was called multiple times in a row without calling GfxDeviceD3D11Base::PresentFrame(). This may result in a deadlock.
     
  23. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    This was the one I got when I first ran it on the 2080 machine. At the second time I got the allocator one.
     
  24. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    One thing to mention is that it takes a lot longer for it to crash on the 2080 machine (a few minutes), while on my 3090 it happens almost instantly (within 30 sec)
     
  25. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    on my 3080 it did not crash after 30 minutes, and on the 2080 it crashed two times after 1 minute
     
  26. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    A bug like this is the worst kind of bug. I hope we can get someone from the Unity team to seriously take a look at it. Shipping HQLines in 2023.1 with this bug would be pretty bad.
     
  27. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    agreed. can you add all the stacktraces to your internal ticket? you can also mention that someone else was able to reproduce, also link me for questions if needed.
     
  28. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    Will do. I added a link to this thread as well. Thank you for your help.
     
    Qleenie likes this.
  29. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    it's on our best interest to get this resolved, too. there's another issue that this feature does not work in VR, but a fix seems to be i review for 2023.2 alpha at least and will hopefully be down ported.
     
    schema_unity likes this.
  30. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    on a third run i got the exact stack trace as you:
    Code (CSharp):
    1. ========== OUTPUTTING STACK TRACE ==================
    2.  
    3. 0x00007FFDC5B02965 (UnityPlayer) block_remove
    4. 0x00007FFDC5B0312A (UnityPlayer) tlsf_free
    5. 0x00007FFDC4BEC193 (UnityPlayer) DynamicHeapAllocator::Deallocate
    6. 0x00007FFDC4BF356B (UnityPlayer) DualThreadAllocator<DynamicHeapAllocator>::TryDeallocate
    7. 0x00007FFDC4BEFC30 (UnityPlayer) MemoryManager::Deallocate
    8. 0x00007FFDC4E70E5D (UnityPlayer) profiler_start_new_frame
    9. 0x00007FFDC4E58C2E (UnityPlayer) `InitPlayerLoopCallbacks'::`2'::InitializationProfilerStartFrameRegistrator::Forward
    10. 0x00007FFDC4E4EEDB (UnityPlayer) ExecutePlayerLoop
    11. 0x00007FFDC4E4F078 (UnityPlayer) ExecutePlayerLoop
    12. 0x00007FFDC4E4F413 (UnityPlayer) PlayerLoop
    13. 0x00007FFDC50A21BB (UnityPlayer) PerformMainLoop
    14. 0x00007FFDC50A451B (UnityPlayer) MainMessageLoop
    15. 0x00007FFDC50A7950 (UnityPlayer) UnityMainImpl
    16. 0x00007FFDC50A7B6B (UnityPlayer) UnityMain
    17. 0x00007FF7862511F2 (TestHairHDRP) __scrt_common_main_seh
    18. 0x00007FFE488626AD (KERNEL32) BaseThreadInitThunk
    19. 0x00007FFE49C0A9F8 (ntdll) RtlUserThreadStart
    20.  
    21. ========== END OF STACKTRACE ===========
     
  31. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    @schema_unity I now also got a first crash on my main PC, it took around 10 minutes. The crash log looks very different this time, so this could be very interesting for QA, will put stack trace at bottom of this post!

    I did test on two more PCs (one Desktop with 2080 GPU with i7 CPU, one with AMD GPU + AMP CPU). Both have same crash as post before. So far I tested on 4 machines, 3 did crash within one minute, one runs much longer before crash:

    1) GPU 2080 + i7 CPU + Win 10 + RAM 16GB = Crash < 1 minute
    2) GPU 2080 super mobile + i7 CPU + Win 11 + RAM 16GB = Crash < 1 minute
    3) GPU RX 6700 XT + CPU Ryzen 7 + Win 10 + RAM 32GB = Crash < 1 minute
    4) GPU 3080 + CPU Ryzen 7 + Win 10 + RAM 64GB = Crash >10 minutes, one time it ran for 30+ minutes

    Here is the stack trace of 4):
    Code (CSharp):
    1. ========== OUTPUTTING STACK TRACE ==================
    2.  
    3. 0x00007FFE50192A22 (UnityPlayer) block_remove
    4. 0x00007FFE501931B4 (UnityPlayer) tlsf_free
    5. 0x00007FFE4F27C263 (UnityPlayer) DynamicHeapAllocator::Deallocate
    6. 0x00007FFE4F2819B2 (UnityPlayer) DelayedPointerDeletionManager::CleanupPendingMainThreadPointersInternal
    7. 0x00007FFE4F283379 (UnityPlayer) DualThreadAllocator<DynamicHeapAllocator>::Allocate
    8. 0x00007FFE4F27F708 (UnityPlayer) MemoryManager::Allocate
    9. 0x00007FFE4F5B4D05 (UnityPlayer) dynamic_array_detail::dynamic_array_data::reserve
    10. 0x00007FFE4F0A0A5F (UnityPlayer) Material_CUSTOM_GetShaderKeywords_Injected
    11. 0x000001D37F530D6A (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Material:GetShaderKeywords_Injected (intptr)
    12. 0x000001D37F530C93 (Mono JIT Code) UnityEngine.Material:GetShaderKeywords ()
    13. 0x000001D37F530BDB (Mono JIT Code) UnityEngine.Material:get_shaderKeywords ()
    14. 0x000001D37F52E4F3 (Mono JIT Code) UnityEngine.Rendering.LineRendering/BindRendererToComputeKernel:.ctor (UnityEngine.Rendering.CommandBuffer,UnityEngine.Rendering.LineRendering/RendererData)
    15. 0x000001D37F528163 (Mono JIT Code) UnityEngine.Rendering.LineRendering:ExecuteGeometryPass (UnityEngine.Rendering.CommandBuffer,UnityEngine.Rendering.LineRendering/GeometryPassData)
    16. 0x000001D37F5261FB (Mono JIT Code) UnityEngine.Rendering.LineRendering/<>c__DisplayClass12_0:<DrawInternal>b__4 (UnityEngine.Rendering.LineRendering/GeometryPassData,UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraphContext)
    17. 0x000001D3641E460B (Mono JIT Code) UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraphPass`1<PassData_REF>:Execute (UnityEngine.Experimental.Rendering.RenderGraphModule.InternalRenderGraphContext)
    18. 0x000001D3641E3339 (Mono JIT Code) UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraph:ExecuteCompiledPass (UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraph/CompiledPassInfo&,int)
    19. 0x000001D3641E311B (Mono JIT Code) UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraph:ExecuteRenderGraph ()
    20. 0x000001D3641DA95B (Mono JIT Code) UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraph:Execute ()
    21. 0x000001D3641DA80B (Mono JIT Code) UnityEngine.Experimental.Rendering.RenderGraphModule.RenderGraphExecution:Dispose ()
    22. 0x000001D3585A4A4B (Mono JIT Code) UnityEngine.Rendering.HighDefinition.HDRenderPipeline:ExecuteWithRenderGraph (UnityEngine.Rendering.HighDefinition.HDRenderPipeline/RenderRequest,UnityEngine.Rendering.HighDefinition.AOVRequestData,System.Collections.Generic.List`1<UnityEngine.Rendering.RTHandle>,System.Collections.Generic.List`1<UnityEngine.Rendering.RTHandle>,UnityEngine.Rendering.ScriptableRenderContext,UnityEngine.Rendering.CommandBuffer)
    23. 0x000001D354F41813 (Mono JIT Code) UnityEngine.Rendering.HighDefinition.HDRenderPipeline:ExecuteRenderRequest (UnityEngine.Rendering.HighDefinition.HDRenderPipeline/RenderRequest,UnityEngine.Rendering.ScriptableRenderContext,UnityEngine.Rendering.CommandBuffer,UnityEngine.Rendering.HighDefinition.AOVRequestData)
    24. 0x000001D354B5F0D3 (Mono JIT Code) UnityEngine.Rendering.HighDefinition.HDRenderPipeline:Render (UnityEngine.Rendering.ScriptableRenderContext,System.Collections.Generic.List`1<UnityEngine.Camera>)
    25. 0x000001D354B5D044 (Mono JIT Code) UnityEngine.Rendering.RenderPipeline:InternalRender (UnityEngine.Rendering.ScriptableRenderContext,System.Collections.Generic.List`1<UnityEngine.Camera>)
    26. 0x000001D32EE1E213 (Mono JIT Code) UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset,intptr,UnityEngine.Object)
    27. 0x000001D32EE1E493 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_object_intptr_object (object,intptr,intptr,intptr)
    28. 0x00007FFE4E86D6A4 (mono-2.0-bdwgc) mono_jit_set_domain
    29. 0x00007FFE4E7B85C4 (mono-2.0-bdwgc) mono_object_get_virtual_method
    30. 0x00007FFE4E7B86D5 (mono-2.0-bdwgc) mono_runtime_invoke
    31. 0x00007FFE4F472C8C (UnityPlayer) ScriptableRenderContext::ExtractAndExecuteRenderPipeline
    32. 0x00007FFE4F30F20C (UnityPlayer) RenderManager::RenderCamerasWithScriptableRenderLoop
    33. 0x00007FFE4F30F91C (UnityPlayer) RenderManager::RenderCameras
    34. 0x00007FFE4F4E85DF (UnityPlayer) PlayerRender
    35. 0x00007FFE4F4DEC1B (UnityPlayer) ExecutePlayerLoop
    36. 0x00007FFE4F4DEDB8 (UnityPlayer) ExecutePlayerLoop
    37. 0x00007FFE4F4DF153 (UnityPlayer) PlayerLoop
    38. 0x00007FFE4F731B6B (UnityPlayer) PerformMainLoop
    39. 0x00007FFE4F733ECB (UnityPlayer) MainMessageLoop
    40. 0x00007FFE4F7372F0 (UnityPlayer) UnityMainImpl
    41. 0x00007FFE4F73750B (UnityPlayer) UnityMain
    42. 0x00007FF7E28211F2 (TestHairHDRP) __scrt_common_main_seh
    43. 0x00007FFF2E977614 (KERNEL32) BaseThreadInitThunk
    44. 0x00007FFF2F1C26F1 (ntdll) RtlUserThreadStart
    45.  
    46. ========== END OF STACKTRACE ===========
     
  32. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    Thank you. I'll add that to the report
     
    Qleenie likes this.
  33. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    Any updates to this issue? If they don’t have enough info or still reject, I’d try to build a separate project and submit same bug again.
     
  34. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    Yes, just tonight the bug was processed again and good news. It has been confirmed. Internal ID: UUM-41319
     
    Qleenie likes this.
  35. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    That's good news! I'd estimate a fixing time of 4 month, based on my former experience.
     
    schema_unity likes this.
  36. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    Oof, I can imagine they have a lot on their plate. As long as it is fixed in the official 2023.1 release I can't really complain. I'm still a few weeks from producing some first prototype test releases for my project, and for that I was planning to use dev builds anyway.
     
    Qleenie likes this.
  37. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
  38. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    Yeah, this should be the ticket. At least the internal ID matches, though the description is indeed a bit strange. I'm just speculating, but maybe only one stacktrace was looked at, and then assumed the method it was happen to crash on was just running out of memory.

    I only hope this bug's severity isn't underestimated.
     
  39. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    784
    Maybe it's worth to post this in HDRP forum, as it's now officially released with 2023.1 (I already posted on the announcement thread yesterday). This thread here is in an archived forum. Would you like to do it or shall I?
     
    schema_unity likes this.
  40. schema_unity

    schema_unity

    Joined:
    Jun 13, 2018
    Posts:
    109
    Good idea. You can post it if you like.
     
    Qleenie likes this.
  41. johnpa_

    johnpa_

    Unity Technologies

    Joined:
    May 23, 2017
    Posts:
    3
    Hi everyone. First, apologies for the delay in addressing this bug, and for the headaches it has caused. The good news is that after investigating it today, I believe we have located the problem and are getting the fix into flight now. The issue had to do with profiling marker usage in the high quality lines feature. I'll update the thread once the fix is landed and backported, cheers.
     
    optimise, Qleenie and schema_unity like this.