Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Major Visual Studio to Unity switching errors

Discussion in 'Editor & General Support' started by andyz, Mar 30, 2020.

  1. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,251
    Toggling between Visual Studio and Unity (VS Community and Unity 2018 LTS, latest of both) ahs become a recipe for disaster of late.
    Do it too quickly and all manner of things can happen such as:

    1. Unity just crashes out completely (bug case #1231220)
    2. Script being edited is lost in inspector and shows in project as not a C# file (must reimport to avoid a never ending error popup in the console)
    3. If you added a script in VS, not Unity, you can get errors and problems on returning

    Either 2018 LTS or Microsoft's VS & unity plugin seem to have got worse in terms of stability
    Is anyone aware of such issues?
     
  2. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,251
    Crash again on switching back to Unity - 3rd time in 2 days bug #1231220

    Log file says nothing much

    Code (CSharp):
    1. Mono: successfully reloaded assembly
    2. - Completed reload, in  6.167 seconds
    3. Platform modules already initialized, skipping
    4. Load scene 'Temp/__Backupscenes/0.backup' time: 21.172700 ms
    5. LightmapEditorSettings: switching bake backend from 1 to 0.
    6. Unloading 1038 Unused Serialized files (Serialized files now loaded: 0)
    7. System memory in use before: 280.7 MB.
    8. Crash!!!
    error.log says "
    mono-2.0-bdwgc.dll caused an Access Violation (0xc0000005)
    in module mono-2.0-bdwgc.dll at 0033:695db0f2."

    Lovely image for you:
     

    Attached Files:

  3. N_to_the_ILS

    N_to_the_ILS

    Joined:
    Apr 14, 2017
    Posts:
    3
    I think that I have the same problem: Frequent crashes when switching back to unity from VS.

    Symptom: Unity freezes and only fix seems to be to end the process from Task Manager.

    When: More often when I have changed a serialized field in VS, especially renaming the variable. I only have this problem with one project so it might be a problem of that particular project. Maybe more often when I switch to unity by clicking in the Unity window rather than alt-tabbing.

    I have not so far had any problems with cs-files like andyz described.

    -Unity LTS 2018.4.28 or .29
    -VS Community 17 or 19 (16.8.1)