Compilation related crash

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?

Hi @asdasdadij ,

Have you tried to delete the Library and Temp folders, before trying to open your project again?

1 Like

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

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!

1 Like

I did manage to isolate the asset that causes it and these last lines seem to be related:

Refreshing native plugins compatible for Editor in 0.45 ms, found 0 plugins.
Preloading 0 native plugins for Editor in 0.00 ms.
Parent directory must exist before creating asset at Assets/_RelativeMotion/SimpleLogChannels/Data/SLCData.asset.
UnityEditor.AssetDatabase:CreateAsset(Object, String)
SimpleLogChannels.SLC:LoadData() (at Assets\SimpleLogChannels\Scripts\SLC.cs:98)
SimpleLogChannels.SLC:.cctor() (at Assets\SimpleLogChannels\Scripts\SLC.cs:57)
System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor(IntPtr)
System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor(RuntimeTypeHandle)
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes(Type[])

[C:\buildslave\unity\build\Modules/AssetDatabase/Editor/V2/V1Compatibility.cpp line 1886]
(Filename: Assets/SimpleLogChannels/Scripts/SLC.cs Line: 98)

The lines 95-100 of this script are:

if(s_logData == null)
                {
                    s_logData = ScriptableObject.CreateInstance<SLCData>();
                    AssetDatabase.CreateAsset(s_logData, kLogDataAssetPath);
                    AssetDatabase.Refresh();
                }

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?

1 Like

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.

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.

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: Simple Log Channels | Utilities Tools | Unity Asset Store;
  • 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!

1 Like