Search Unity

Compilation related crash

Discussion in 'Editor & General Support' started by asdasdadij, May 19, 2020.

  1. asdasdadij

    asdasdadij

    Joined:
    May 18, 2020
    Posts:
    6
    Related to my other post, which you actually don't need for this one.

    After moving my Unity installation, I moved my scripts to new Unity project.
    On first launch Unity needs to reserialize scripts and do all its metaing jobs.
    In my case it didn't do that. The Unity will launch, prompt me the splash image.
    Display a window saying something like "Compiling scripts" and then it just disappears.
    Task Manager confirms that Unity's process simply ceases to exist.

    I made sure about four times that its due to my scripts, that by launching project with empty Asset folder and with my project files in it.

    My Editor log:
    https://pastebin.com/raw/XCC8E3BE

    I see a number of errors, but which causes an actual crash?
     
  2. DiegoDePalacio

    DiegoDePalacio

    Unity Technologies

    Joined:
    Oct 28, 2009
    Posts:
    507
    Hi @asdasdadij,

    Have you tried to delete the `Library` and `Temp` folders, before trying to open your project again?
     
    asdasdadij likes this.
  3. asdasdadij

    asdasdadij

    Joined:
    May 18, 2020
    Posts:
    6
    I tried it now. No (apparent) change, still exits. Unity's threads/workers(?) go from 4 to 8, to 16, to 8, to 4, to 2, to 1 to non-existent.

    Editor.log now:
    https://pastebin.com/raw/RNQtHMUP
     
  4. DiegoDePalacio

    DiegoDePalacio

    Unity Technologies

    Joined:
    Oct 28, 2009
    Posts:
    507
    Hi @asdasdadij,

    In your log, I couldn't find anything that can help you to solve your issue.

    My recommendation is to create a new project and start adding your scripts one by one if you have a small amount of them or by groups if you have more than a few until you find the exact script that is causing the crash.

    This will help to isolate the problem and to be able to find the issue easily.


    Good luck with it!
     
    asdasdadij likes this.
  5. asdasdadij

    asdasdadij

    Joined:
    May 18, 2020
    Posts:
    6
    I did manage to isolate the asset that causes it and these last lines seem to be related:
    Code (CSharp):
    1.  
    2. Refreshing native plugins compatible for Editor in 0.45 ms, found 0 plugins.
    3. Preloading 0 native plugins for Editor in 0.00 ms.
    4. Parent directory must exist before creating asset at Assets/_RelativeMotion/SimpleLogChannels/Data/SLCData.asset.
    5. UnityEditor.AssetDatabase:CreateAsset(Object, String)
    6. SimpleLogChannels.SLC:LoadData() (at Assets\SimpleLogChannels\Scripts\SLC.cs:98)
    7. SimpleLogChannels.SLC:.cctor() (at Assets\SimpleLogChannels\Scripts\SLC.cs:57)
    8. System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor(IntPtr)
    9. System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor(RuntimeTypeHandle)
    10. UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes(Type[])
    11.  
    12. [C:\buildslave\unity\build\Modules/AssetDatabase/Editor/V2/V1Compatibility.cpp line 1886]
    13. (Filename: Assets/SimpleLogChannels/Scripts/SLC.cs Line: 98)
    The lines 95-100 of this script are:
    Code (CSharp):
    1. if(s_logData == null)
    2.                 {
    3.                     s_logData = ScriptableObject.CreateInstance<SLCData>();
    4.                     AssetDatabase.CreateAsset(s_logData, kLogDataAssetPath);
    5.                     AssetDatabase.Refresh();
    6.                 }
    I would give you more, but this is a paid asset and likely under copyright. Its SimpleLogChannels.

    Is this something that improves the insight and could get me closer towards solving this issue?
     
    DiegoDePalacio likes this.
  6. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    Looks like SimpleLogChannels doesn't make sure the directory it's writing to exists.

    Also, Unity doesn't send bad code you put in a bug report to third parties, just send the project as a bug report. If some code's able to crash the editor by doing valid calls, that's a bug that Unity needs to fix.
     
  7. asdasdadij

    asdasdadij

    Joined:
    May 18, 2020
    Posts:
    6
    Can I create that directory for it in Windows Explorer or is this something hidden from me inside Unity's engine?

    Parent directory must exist before creating asset at Assets/_RelativeMotion/SimpleLogChannels/Data/SLCData.asset.

    Isn't really clear enough for trial and error.
     
  8. DiegoDePalacio

    DiegoDePalacio

    Unity Technologies

    Joined:
    Oct 28, 2009
    Posts:
    507
    I think that you can try:
    • Create the folder `Assets/_RelativeMotion/SimpleLogChannels/Data/SLCData.asset`, if is missing;
    • Check if a completely empty project with only the content of the `Assets/_RelativeMotion` folder is still crashing;
    • Try removing the whole plugin (all the content inside of the _RelativeMotion folder). You need to be aware that the last update of such plugin was made almost 4 years ago, as you can check on their asset store page: https://assetstore.unity.com/packages/tools/utilities/simple-log-channels-67674#description;
    • Contact the developer, maybe they're aware of the problem and they can help you on how to solve your issue. You can contact them here: https://rmotion.wixsite.com/home/contact.

    I hope you can solve your issue soon!
     
    asdasdadij likes this.