Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. We are making some changes to the DOTS forums.
    Dismiss Notice
  4. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  5. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Bug Creating a new project tells me to enter safe mode

Discussion in 'Editor & General Support' started by Spokloo, Jun 13, 2022.

  1. Spokloo

    Spokloo

    Joined:
    Jun 13, 2022
    Posts:
    10
    Hey, everytime I try to create a new project, I get this error. I tried to uninstall every versions of Unity I had installed and even Unity Hub and then reinstall everything but I still get this error. Whether I enter safe mode or ignore I get spammed in the console with an error message saying "The specified path was not found" (not sure if it's the actual message since it's a translation).
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    29,891
    Extra unwanted packages in new projects (collab, testing, rider and other junk):

    https://forum.unity.com/threads/temp-unityengine-testrunner-dll-error.1133938/#post-7287748

    About the fastest way I have found to make a project and avoid all this noise is to create the project, then as soon as you see the files appear, FORCE-STOP (hard-kill) Unity (with the Activity Manager or Task Manager), then go hand-edit the Packages/manifest.json file as outlined in the above post, then reopen Unity.

    Sometimes the package system gets borked from all this unnecessary churn and requires the package cache to be cleared:

    https://stackoverflow.com/questions/53145919/unity3d-package-cache-errors/69779122
     
  3. Spokloo

    Spokloo

    Joined:
    Jun 13, 2022
    Posts:
    10
    I've deleted the lines highlighted in the post you linked but the error is still here and I don't understand.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    29,891
    While it is a bummer the error is happening without you doing anything, you still have to look at the error and it certainly would be nice if you a) googled it, and b) posted it here, since I am not a mind-reader and cannot see your screen from where I am sitting here.
     
  5. Spokloo

    Spokloo

    Joined:
    Jun 13, 2022
    Posts:
    10
    I already sent the first screen telling me my project has compilation errors even though I just created it but the error message I get is litteraly "The specified path was not found" no further information or anything, it just spams me this message in the console (the original message is in French so that's why I didn't send it the first time but take a look)
     
  6. Spokloo

    Spokloo

    Joined:
    Jun 13, 2022
    Posts:
    10
  7. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    29,891
    I would start by getting rid of every non-ascii character first from all your directories.

    I would also remove spaces too...

    Use only A-Z and 0-9
     
    ricotico likes this.
  8. Spokloo

    Spokloo

    Joined:
    Jun 13, 2022
    Posts:
    10
    Still got the same issue with no spaces and only A-Z characters in the project path. Should I also remove the spaces in the version of unity ? Like instead of "Unity 2022.1.4f1" I rename the folder to "Unity2022.1.4f1" ? Even Program Files ?
     
  9. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    29,891
    I would not recommend that.

    Have you tried perhaps uninstalling it, then switching to English and reinstalling?

    I say this because when using the Turkic language locales, Unity had problems for years with the little special "i" character in pathnames. Not sure how widely it has been fixed and rolled out. I think it was some part of the IL2CPP toolchain did not like it, and the errors looked suspiciously like what you snipped above, that's all.
     
  10. Spokloo

    Spokloo

    Joined:
    Jun 13, 2022
    Posts:
    10
    Maybe but I don't see any characters in the french language that would cause issue in the pathnames. I already uninstalled it several times but I guess I could try doing it again but install it in english this time.
     
  11. Spokloo

    Spokloo

    Joined:
    Jun 13, 2022
    Posts:
    10
    I can't choose a language when installing it, so maybe there is an option within the editor to switch to English ? I can't check right now as it's reinstalling.

    EDIT: didn't find any settings to change the default language
     
    Last edited: Jun 16, 2022
  12. Spokloo

    Spokloo

    Joined:
    Jun 13, 2022
    Posts:
    10
    I've tried everything nothing works and I've still got the same issue...
     
  13. Spokloo

    Spokloo

    Joined:
    Jun 13, 2022
    Posts:
    10
    Hey I still have the same issue. I thought maybe it was related to the fact that I installed unity on my 2nd drive (not SSD) and that maybe I had some remnants of Unity on my SSD but after uninstalling everything, deleting every Unity folder I could find, and reinstalling everything on my SSD, still the same error after creating a new project. So I'm completely out of ideas
     
  14. Spokloo

    Spokloo

    Joined:
    Jun 13, 2022
    Posts:
    10
    Still got this issue, anyone?
     
  15. sampurchasesmontreal

    sampurchasesmontreal

    Joined:
    Mar 5, 2021
    Posts:
    1
    Having this problem too. Here is the error message:

    Internal build system error. BuildProgram exited with code -532462766.
    Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

    ---> System.BadImageFormatException: Could not load file or assembly 'ScriptCompilationBuildProgram.Data, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Format of the executable (.exe) or library (.dll) is invalid.
    File name: 'ScriptCompilationBuildProgram.Data, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' ---> System.BadImageFormatException: Could not load file or assembly 'T:\2021.3.8f1\Editor\Data\Tools\BuildPipeline\ScriptCompilationBuildProgram.Data.dll'. Format of the executable (.exe) or library (.dll) is invalid.
    File name: 'T:\2021.3.8f1\Editor\Data\Tools\BuildPipeline\ScriptCompilationBuildProgram.Data.dll'
    at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
    at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
    at CustomLoadContext.Load(AssemblyName assemblyName)
    at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName)
    at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
    at ScriptCompilationBuildProgram.ScriptCompilationBuildProgram.Main(String[] args)
    --- End of inner exception stack trace ---
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
    at Program.Main(String[] args)
     
  16. tonytopper

    tonytopper

    Joined:
    Jun 25, 2018
    Posts:
    118
    Getting a similar error. No idea what triggered it. Just happened after a recompilation. Visual Studio shows no errors. Tried updating Visual Studio. (Prior to updating VS the errors was reporting differently as: "system.badimageformatexception bad binary signature")

    Internal build system error. BuildProgram exited with code -532462766.
    Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
    ---> System.BadImageFormatException: Bad binary signature. (0x80131192)
    at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.Dispose()
    at System.Linq.Set`1.UnionWith(IEnumerable`1 other)
    at System.Linq.Enumerable.DistinctIterator`1.FillSet()
    at System.Linq.Enumerable.DistinctIterator`1.ToArray()
    at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
    at ScriptCompilationBuildProgram.ILPostProcessing.SetupInvocation(ConfigurationData configurationData, DotNetAssembly[] codeGenAssemblies, DotNetAssembly[] scriptAssemblies, AssemblyData[] scriptAssembliesData, NPath targetDirectory)
    at ScriptCompilationBuildProgram.ScriptCompilationBuildProgram.Main(String[] args)
    --- End of inner exception stack trace ---
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
    at Program.Main(String[] args)
     
  17. oleksp

    oleksp

    Joined:
    Saturday
    Posts:
    1