Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Unity crash after code compilation

Discussion in '2021.2 Beta' started by Bastienre4, Jul 25, 2021.

  1. Bastienre4

    Bastienre4

    Joined:
    Jul 8, 2014
    Posts:
    191
    Hello,
    When Unity recompile (either because I modify a script or because I update a package), Unity almost always crash after the code compilation.

    I already submited a bug report (Case 1352394).

    Code (CSharp):
    1. =================================================================
    2.     Native Crash Reporting
    3. =================================================================
    4. Got a UNKNOWN while executing native code. This usually indicates
    5. a fatal error in the mono runtime or one of the native libraries
    6. used by your application.
    7. =================================================================
    8.  
    9. =================================================================
    10.     Managed Stacktrace:
    11. =================================================================
    12. =================================================================
    13. Received signal SIGSEGV
    14. Obtained 10 stack frames
    15. 0x00007ff76f0abfee (Unity) TypeTree::~TypeTree
    16. 0x00007ff76e9258b8 (Unity) dynamic_array<TypeTree,0>::~dynamic_array<TypeTree,0>
    17. 0x00007ff76ff2e16f (Unity) std::_List_node<RecordedObject,void * __ptr64>::_Free_non_head<stl_allocator<std::_List_node<RecordedObject,void * __ptr64>,124,16> >
    18. 0x00007ff76ff302a2 (Unity) PropertyUndoManager::Flush
    19. 0x00007ff76fc16d03 (Unity) Application::TickTimer
    20. 0x00007ff7700492e5 (Unity) MainMessageLoop
    21. 0x00007ff77004d9ab (Unity) WinMain
    22. 0x00007ff771340d62 (Unity) __scrt_common_main_seh
    23. 0x00007ffae38354e0 (KERNEL32) BaseThreadInitThunk
    24. 0x00007ffae544485b (ntdll) RtlUserThreadStart
    25.  
    Any ideas where this come from? Am I the only one with this issue?

    Have a nice day
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    Thanks for the report @Bastienre4, we'll have a look at it.
     
    Bastienre4 likes this.
  3. Bastienre4

    Bastienre4

    Joined:
    Jul 8, 2014
    Posts:
    191
    LeonhardP likes this.
  4. Bastienre4

    Bastienre4

    Joined:
    Jul 8, 2014
    Posts:
    191
    Any news on this topic?
     
  5. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    Hi @Bastienre4,

    We have a potential fix for the crashes but the devs are still investigating the root cause.

    A potential workaround for now is to ensure that undo recordings are being flushed at the exact point it is required rather than waiting for the editor to flush and potentially introducing elements of another undo action.

    In your project this can be achieved by adding Undo.IncrementCurrentGroup to Graph.cs
    After Line 77. UndoUtility.RecordObjectComplete(this, UndoUtility.GetLastOperationNameOr("Graph Change"));
     
    Bastienre4 likes this.
  6. Bastienre4

    Bastienre4

    Joined:
    Jul 8, 2014
    Posts:
    191
    Thank you VERY much for keeping me updated AND providing a workaround.

    Have a nice day.
     
    LeonhardP likes this.
  7. Bastienre4

    Bastienre4

    Joined:
    Jul 8, 2014
    Posts:
    191
    I tried your workaround.

    Now it crash whenever I open a flow canvas window. :(

    upload_2021-9-7_14-43-39.png
     
  8. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    I got some additional information from the devs:
    The good news is, that the fix was just approved. In the best case scenario, it could land in time for b12.
     
    Bastienre4 and mahdi_jeddi like this.
  9. Bastienre4

    Bastienre4

    Joined:
    Jul 8, 2014
    Posts:
    191
    Awesome. Thanks for the heads up.
     
    LeonhardP likes this.
  10. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    You're welcome! It's not going to be in b12 but b13 seems likely.
     
    Bastienre4 likes this.
  11. Shivakuvira

    Shivakuvira

    Joined:
    Sep 26, 2022
    Posts:
    2
    any update on this certain bug? because im still facing whenever i try to work with canvas.
     
  12. LiveGuide125

    LiveGuide125

    Joined:
    Jun 21, 2022
    Posts:
    1
    When i go into play mode my game crashes and it says i have obtained 0 stack frames