Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Crash migrating from 2019.3

Discussion in '2020.2 Beta' started by segant, May 9, 2020.

  1. segant

    segant

    Joined:
    May 3, 2017
    Posts:
    196
    Editor doesn't even open. I changed universal package in order of 8.0.1, 8.1.0 ,9.0.0-preview.14 from manifest.json. None of them worked. I get this crash for first time after deleting library folder. Others attempts just closed in Initialize Graphics section without crash
    From stack trace before crashing I think it crashes in UnityEngine.Rendering.ScriptableRenderContext.Submit_Internal ()

    [Library/PackageCache/com.unity.render-pipelines.universal@9.0.0-preview.14/Runtime/UniversalRenderPipeline.cs line 159]

    Stacktrace:

    at <unknown> <0xffffffff>
    at (wrapper managed-to-native) UnityEngine.Rendering.ScriptableRenderContext.Submit_Internal_Injected (UnityEngine.Rendering.ScriptableRenderContext&) [0x00007] in <9fed455f2a0f419e99c9093c831550e0>:0
    at UnityEngine.Rendering.ScriptableRenderContext.Submit_Internal () [0x00001] in <9fed455f2a0f419e99c9093c831550e0>:0
    at UnityEngine.Rendering.ScriptableRenderContext.Submit () [0x00009] in <9fed455f2a0f419e99c9093c831550e0>:0
    at UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext,UnityEngine.Rendering.Universal.CameraData,bool) [0x000f7] in C:\Users\Eray\Documents\My Dream - Part 1\MyDreamPart1\Library\PackageCache\com.unity.render-pipelines.universal@9.0.0-preview.14\Runtime\UniversalRenderPipeline.cs:238
    at UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext,UnityEngine.Camera) [0x0003e] in C:\Users\Eray\Documents\My Dream - Part 1\MyDreamPart1\Library\PackageCache\com.unity.render-pipelines.universal@9.0.0-preview.14\Runtime\UniversalRenderPipeline.cs:187
    at UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext,UnityEngine.Camera[]) [0x00056] in C:\Users\Eray\Documents\My Dream - Part 1\MyDreamPart1\Library\PackageCache\com.unity.render-pipelines.universal@9.0.0-preview.14\Runtime\UniversalRenderPipeline.cs:159
    at UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext,UnityEngine.Camera[]) [0x0001f] in <9fed455f2a0f419e99c9093c831550e0>:0
    at UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset,intptr,Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle) [0x00044] in <9fed455f2a0f419e99c9093c831550e0>:0
    at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object_intptr_AtomicSafetyHandle (object,intptr,intptr,intptr) [0x00031] in <9fed455f2a0f419e99c9093c831550e0>:0
    at <unknown> <0xffffffff>
    at (wrapper managed-to-native) UnityEngine.Camera.Render (UnityEngine.Camera) [0x00013] in <9fed455f2a0f419e99c9093c831550e0>:0
    at UnityEditor.PreviewRenderUtility.Render (bool,bool) [0x000c3] in <599a88f0dc984e9a84071cb802b80734>:0
    at UnityEditor.MaterialEditor.DoRenderPreview (UnityEditor.PreviewRenderUtility,bool) [0x00275] in <599a88f0dc984e9a84071cb802b80734>:0
    at UnityEditor.MaterialEditor.RenderStaticPreview (string,UnityEngine.Object[],int,int) [0x00050] in <599a88f0dc984e9a84071cb802b80734>:0
    at UnityEditor.AssetPreviewUpdater.CreatePreviewForAsset (UnityEngine.Object,UnityEngine.Object[],string) [0x00097] in <599a88f0dc984e9a84071cb802b80734>:0
    at (wrapper runtime-invoke) <Module>.runtime_invoke_object_object_object_object (object,intptr,intptr,intptr) [0x0002b] in <599a88f0dc984e9a84071cb802b80734>:0

    =================================================================
    Got a SIGSEGV while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.
    =================================================================

    Received signal SIGSEGV
    Stack trace:
    0x00007ff6a6aeaa87 (Unity) MemoryManager::Allocate
    0x00007ff6a6b003dc (Unity) malloc_internal
     
    Last edited: May 9, 2020
  2. segant

    segant

    Joined:
    May 3, 2017
    Posts:
    196
    Last edited by a moderator: Jul 9, 2020
  3. Enrico-Monese

    Enrico-Monese

    Joined:
    Dec 18, 2015
    Posts:
    77
    Also trying to upgrade a project, no luck yet.
    I however am on macOS and get a different error when trying to open the project, the Editor just disappears(no bug reporter popup) after loading for a couple seconds to a minute usually, .

    Unity version 2020.2.0a10, same happens on 2020.1.0b6


    Start importing Assets/Art/Lander/Lander.prefab using Guid(ca008123d37d5469c96968ec8e63f22e) Importer(-1,00000000000000000000000000000000) Stack overflow in unmanaged: IP: 0x7fff6e5332a9, fault addr: 0x7ffee8a90ff8
    Stack overflow in unmanaged: IP: 0x1436431fc, fault addr: 0x7ffee8a8eff8
    Stack overflow in unmanaged: IP: 0x7fff6e534639, fault addr: 0x7ffee8a8dff8
    Stack overflow in unmanaged: IP: 0x143564647, fault addr: 0x7ffee8a8cfe8
    Stack overflow in unmanaged: IP: 0x7fff6e5332e2, fault addr: 0x7ffee8a8bfb0
    Stack overflow in unmanaged: IP: 0x143564637, fault addr: 0x7ffee8a8aff8
    Stack overflow in unmanaged: IP: 0x14364323d, fault addr: 0x7ffee8a89ff8
    Stack overflow: IP: 0x1436231c1, fault addr: 0x7ffee8a87fe8
    Stacktrace:
    [Unity Package Manager (Upm)]
    Parent process [12588] was terminated


    Edit: created a new project and started copying over stuff a bit at a time, and it appears to crash on importing prefabs, other asset types seem to be fine
    Edit 2: seems a different prefab every time, even ones that imported fine in previous attempts
     
    Last edited: May 14, 2020
  4. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    When updating to a new TECH stream I find it’s pretty much always a good idea to delete the Library folder first. Though that generally means waiting countless hours for a reimport (and then waiting that amount again after resetting your project to the platform it was originally set to - thanks Unity!).

    Not saying that will definitely fix your issue though. But worth a try if you don’t hear back from any Unity staff.
     
  5. Enrico-Monese

    Enrico-Monese

    Joined:
    Dec 18, 2015
    Posts:
    77
    Already tried that, and it didn't change anything since the editor crashes even if you create a new project and manually copy over a prefab from the old one
     
  6. segant

    segant

    Joined:
    May 3, 2017
    Posts:
    196
    Just move Assets/Art/Lander/Lander.prefab prefab other folder and open it and add it.And add prefab's mesh object fbx later. But for me it's giving multiple errors.
     
    Last edited: May 14, 2020
  7. segant

    segant

    Joined:
    May 3, 2017
    Posts:
    196
    I found the reason. Shader variant file cause this. After deleting it. It opens but when i clear then create new one and preload it. It doesnt open again.
     
  8. Raul_T

    Raul_T

    Joined:
    Jan 10, 2015
    Posts:
    363
    Having the same issue with our beta/experimental branch of our project, also both 2020.1 and 2020.2
     
  9. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,628
    Please report a bug.
     
  10. Raul_T

    Raul_T

    Joined:
    Jan 10, 2015
    Posts:
    363
    How would I do it? There is no crash dialogue, the Unity splash screen just disappears when the editor should start and nothing happens. Also the project is 90gb and under NDA so even if the dialogue shows, I can't do a full report submission, and I can't seem to reproduce it in a clean project either...

    I'll try to get to the root of the issue in the following days if I get the time (now I'm stuck with development in the 2019.3 dev branch and possibly migrating to 2019.4 soon). Maybe there is some file that 2020 doesnt like. I'll look more through the logs.

    P.s. haven't got the time to try what @segant did to open it but sounds plausible for our project too, we make heavy use of shader variants. I'll have to look into it maybe its the same issue.
     
    Last edited: Jun 11, 2020
  11. segant

    segant

    Joined:
    May 3, 2017
    Posts:
    196
    I'm 100% sure its because of shader variant file. If you added that in preload section in graphic settings. It won't open. But if you just save it. Then there is no problem.
     
    Raul_T likes this.
  12. Raul_T

    Raul_T

    Joined:
    Jan 10, 2015
    Posts:
    363
    Thanks! Just checked and the project doesnt have any shader variant collection in the preload section atm and it still fails to open.

    upload_2020-6-11_14-1-40.png

    When you mentioned about removing the variant collection in the older post, did you meant from the preloaded shaders list, or removing the actual shadervariants file from the project itself? Because I didn't tried removing the file itself yet.
     
  13. segant

    segant

    Joined:
    May 3, 2017
    Posts:
    196
    Try removing shader variant files with their meta. And can you take a look at editor log at \AppData\Local\Unity\Editor\Editor.log
    And how could you check it if you can't open it? If you downgraded it just take a look at editor log after upgrade. And try removing shader variant files. And forgot to say i think urp assets may cause it. If it's not fixed after deleting variant files .
     
    Last edited: Jun 11, 2020
  14. Raul_T

    Raul_T

    Joined:
    Jan 10, 2015
    Posts:
    363
    Thanks, I'll try it out later.

    We have a new branch in version control for 2020, in which I merged everything from the 2019.3 branch. I checked the graphics settings in 2019.3, the branches should also be 1:1.

    P.S. We have the issue on built-in pipeline so SRPs are out of question for us.
     
    Last edited: Jun 12, 2020
  15. segant

    segant

    Joined:
    May 3, 2017
    Posts:
    196
    @Raul_MadGoat Just move these files out of project folder. You don't have to delete them.
     
    Raul_T likes this.
  16. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,628
    You can run Unity bug reporter manually (the app is located next to Unity.exe). If you can't share the project, can you at least share a crash dump? Here's how to collect them:

    https://docs.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps

    Make sure to use DumpType 2 (full dump).
     
    Raul_T likes this.
  17. Raul_T

    Raul_T

    Joined:
    Jan 10, 2015
    Posts:
    363
    Thanks! Didn't knew the bug reporter works standalone. Will look into getting the crash dump.
     
  18. Raul_T

    Raul_T

    Joined:
    Jan 10, 2015
    Posts:
    363
    In the meanwhile, I have found the culprit of my crash. Not related to shaders at all, instead it was a dll from a third party plugin that for some reason doesn't want to import in 2020.x at all. I managed to reproduce it consistently in a repro project as well.

    This is the exception message I found in the dump file:
    0xC0000005 - The thread tried to read from or write to a virtual address for which it does not have the appropriate access.

    Anyways here is the bug report for this, maybe you find something useful. I have also included the full dump file and a small repro project
    Case #1255177

    P.S. bug report is on 2020.1b, but the issue is present on both 2020.1b and 2020.2a

    Edit: Now I updated the dll to a newer version and the project starts normally. So I'm a bit confused, not sure if the issue with this is some edge case on unity side, or just something obsolette in the plugin's side, since the newer version of the plugin seems to work on 2020.x...
     
    Last edited: Jun 12, 2020
  19. Enrico-Monese

    Enrico-Monese

    Joined:
    Dec 18, 2015
    Posts:
    77
    Still trying to figure it out for my project. Seems related to scripts like yours however.
    I narrowed it down to a line in a script of a third party assetstore plugin. Commenting it out makes the project open fine. Still investigating what exactly is the problem.

    I think it is related to code doing things during some prefab OnEnable or similar. If I recall correctly there already were some bugs like this that were causing crashes.

    Ps: what are the rules for including paid assets in bug repro projects?
     
    Last edited: Jun 23, 2020
  20. Raul_T

    Raul_T

    Joined:
    Jan 10, 2015
    Posts:
    363
    The reply I got from unity was that they don't support asset related issues and to contact the asset developer. Not sure if they even looked into the crash at all or just closed the ticket since I mentioned its related to a 3rd party asset.

    But in my case the issue actually got fixed by an update on the asset side. Still odd that something like that can completely brick the editor (not even the error handler showing up), especially since in 2019.x cycle it worked perfectly, so I suspect there is something that definitely changed/broke with 2020...
     
  21. Enrico-Monese

    Enrico-Monese

    Joined:
    Dec 18, 2015
    Posts:
    77
    Well, I further tracked it down to what I believe to be a problem with serialization. The problem is a [System.Serializable] attribute on a subclass of a generic class.
    Even if the code is from a third party asset the issue is still with editor, had I coded that myself the issue would still be there...
     
  22. Raul_T

    Raul_T

    Joined:
    Jan 10, 2015
    Posts:
    363
    Interesting. I believe my issue was also related to serialization. While looking through the logs I saw that the last messages before the crash were warnings about serialization depth limit being exceeded.

    Is your class by any chance doing recursive serialization?

    Might it be an issue with the serializer in 2020.x?