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

Build issue (M1)

Discussion in '2022.1 Beta' started by antonkudin, Dec 24, 2021.

  1. antonkudin

    antonkudin

    Joined:
    Aug 4, 2014
    Posts:
    32
    Strange issue preventing builds, can anyone help? Burst package version is 1.6.3.


    System.TypeInitializationException: The type initializer for 'Burst.Backend.UnmanagedLibrary' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Sys' threw an exception. ---> System.DllNotFoundException: /Applications/Unity/Hub/Editor/2022.1.0b2/Unity.app/Contents/MonoBleedingEdge/lib/../lib/libmono-native.dylib assembly:<unknown assembly> type:<unknown type> member:(null)
    at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag()
    at Interop+Sys..cctor () [0x00000] in <310a9ad4970f473680d13544528e598a>:0


    There are other errors, full editor log attached.
     

    Attached Files:

    DrViJ likes this.
  2. antonkudin

    antonkudin

    Joined:
    Aug 4, 2014
    Posts:
    32
    Mac M1, with native version.
     
  3. misleb

    misleb

    Joined:
    Apr 28, 2016
    Posts:
    3
    I'm getting similar errors when trying to Build even a fresh unmodified 2D Core project template.

    Also Mac M1 native version.

    A new Core 3D project builds and plays fine.
     
  4. antonkudin

    antonkudin

    Joined:
    Aug 4, 2014
    Posts:
    32
    At least I'm not the only one!
     
  5. misleb

    misleb

    Joined:
    Apr 28, 2016
    Posts:
    3
    Yeah, I'm just back with 2021 for now. But I'm having some 2D performance issue. When a sprite is moving across the screen it can be jerky or jittery. Turning down quality settings to High from Ultra seemed to help at first but I had it start getting jittery again after playing a game for a couple minutes. It's just a little ball sprite bouncing off walls and such.

    But I might go back to 2022 and play around with the compiler options. I know you can us IL2CPP instead of Mono...
     
  6. DrViJ

    DrViJ

    Joined:
    Feb 9, 2013
    Posts:
    158
    Same problem on 2022.1.0b3 apple silicon version (WebGL builds)
     
  7. antonkudin

    antonkudin

    Joined:
    Aug 4, 2014
    Posts:
    32
    Still happening with 2022.1.0b4
     
  8. Newcomma

    Newcomma

    Joined:
    Feb 10, 2015
    Posts:
    89
    Same issue on b4, trace:

    Code (CSharp):
    1. Building /Users/work//Library/Bee/artifacts/WebGL/il2cppOutput/UnityICallRegistration.cpp failed with output:
    2.  
    3. Unhandled Exception:
    4. System.TypeInitializationException: The type initializer for 'Sys' threw an exception. ---> System.DllNotFoundException: /Applications/Unity/Hub/Editor/2022.1.0b4/Unity.app/Contents/MonoBleedingEdge/lib/../lib/libmono-native.dylib assembly:<unknown assembly> type:<unknown type> member:(null)
    5.   at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag()
    6.   at Interop+Sys..cctor () [0x00000] in <3cc0041a7bf849d5a824197f18576c2b>:0
    7.    --- End of inner exception stack trace ---
    8.   at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <3cc0041a7bf849d5a824197f18576c2b>:0
    9.   at System.IO.FileSystem.DirectoryExists (System.ReadOnlySpan`1[T] fullPath, Interop+ErrorInfo& errorInfo) [0x00000] in <3cc0041a7bf849d5a824197f18576c2b>:0
    10.   at System.IO.FileSystem.DirectoryExists (System.ReadOnlySpan`1[T] fullPath) [0x00000] in <3cc0041a7bf849d5a824197f18576c2b>:0
    11.   at System.IO.Directory.Exists (System.String path) [0x0001e] in <3cc0041a7bf849d5a824197f18576c2b>:0
    12.   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x000c1] in <3cc0041a7bf849d5a824197f18576c2b>:0
    13.   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00000] in <3cc0041a7bf849d5a824197f18576c2b>:0
    14.   at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
    15.   at Mono.Cecil.ModuleDefinition.GetFileStream (System.String fileName, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00006] in <a6860a9f6366437387ebdc1f225b7fd4>:0
    16.   at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00008] in <a6860a9f6366437387ebdc1f225b7fd4>:0
    17.   at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName) [0x00007] in <a6860a9f6366437387ebdc1f225b7fd4>:0
    18.   at Mono.Cecil.AssemblyDefinition.ReadAssembly (System.String fileName) [0x00000] in <a6860a9f6366437387ebdc1f225b7fd4>:0
    19.   at Unity.InternalCallRegistrationWriter.Collector.InternalCallCollector.AssemblyDefinitionFor (System.String path) [0x00001] in <0d3380eb5a25466c9471bc2ee62bbd90>:0
    20.   at Unity.InternalCallRegistrationWriter.Collector.InternalCallCollector.get_AssemblyDefinition () [0x00013] in <0d3380eb5a25466c9471bc2ee62bbd90>:0
    21.   at Unity.InternalCallRegistrationWriter.Collector.InternalCallCollector.CollectAllInternalCalls () [0x00008] in <0d3380eb5a25466c9471bc2ee62bbd90>:0
    22.   at Unity.InternalCallRegistrationWriter.Collector.InternalCallCollector.get_InternalCallsByType () [0x0000e] in <0d3380eb5a25466c9471bc2ee62bbd90>:0
    23.   at Unity.InternalCallRegistrationWriter.Runner.DefaultRunner.Run (Unity.InternalCallRegistrationWriter.Runner.InternalCallOptions options) [0x00022] in <0d3380eb5a25466c9471bc2ee62bbd90>:0
    24.   at Unity.InternalCallRegistrationWriter.Runner.DefaultRunner.ParseOptionsAndRun (System.String[] args) [0x00008] in <0d3380eb5a25466c9471bc2ee62bbd90>:0
    25.   at Unity.InternalCallRegistrationWriter.Program.Main (System.String[] args) [0x00001] in <0d3380eb5a25466c9471bc2ee62bbd90>:0
    26. [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'Sys' threw an exception. ---> System.DllNotFoundException: /Applications/Unity/Hub/Editor/2022.1.0b4/Unity.app/Contents/MonoBleedingEdge/lib/../lib/libmono-native.dylib assembly:<unknown assembly> type:<unknown type> member:(null)
    27.   at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag()
    28.   at Interop+Sys..cctor () [0x00000] in <3cc0041a7bf849d5a824197f18576c2b>:0
    29.    --- End of inner exception stack trace ---
    30.   at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <3cc0041a7bf849d5a824197f18576c2b>:0
    31.   at System.IO.FileSystem.DirectoryExists (System.ReadOnlySpan`1[T] fullPath, Interop+ErrorInfo& errorInfo) [0x00000] in <3cc0041a7bf849d5a824197f18576c2b>:0
    32.   at System.IO.FileSystem.DirectoryExists (System.ReadOnlySpan`1[T] fullPath) [0x00000] in <3cc0041a7bf849d5a824197f18576c2b>:0
    33.   at System.IO.Directory.Exists (System.String path) [0x0001e] in <3cc0041a7bf849d5a824197f18576c2b>:0
    34.   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x000c1] in <3cc0041a7bf849d5a824197f18576c2b>:0
    35.   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00000] in <3cc0041a7bf849d5a824197f18576c2b>:0
    36.   at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
    37.   at Mono.Cecil.ModuleDefinition.GetFileStream (System.String fileName, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00006] in <a6860a9f6366437387ebdc1f225b7fd4>:0
    38.   at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00008] in <a6860a9f6366437387ebdc1f225b7fd4>:0
    39.   at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName) [0x00007] in <a6860a9f6366437387ebdc1f225b7fd4>:0
    40.   at Mono.Cecil.AssemblyDefinition.ReadAssembly (System.String fileName) [0x00000] in <a6860a9f6366437387ebdc1f225b7fd4>:0
    41.   at Unity.InternalCallRegistrationWriter.Collector.InternalCallCollector.AssemblyDefinitionFor (System.String path) [0x00001] in <0d3380eb5a25466c9471bc2ee62bbd90>:0
    42.   at Unity.InternalCallRegistrationWriter.Collector.InternalCallCollector.get_AssemblyDefinition () [0x00013] in <0d3380eb5a25466c9471bc2ee62bbd90>:0
    43.   at Unity.InternalCallRegistrationWriter.Collector.InternalCallCollector.CollectAllInternalCalls () [0x00008] in <0d3380eb5a25466c9471bc2ee62bbd90>:0
    44.   at Unity.InternalCallRegistrationWriter.Collector.InternalCallCollector.get_InternalCallsByType () [0x0000e] in <0d3380eb5a25466c9471bc2ee62bbd90>:0
    45.   at Unity.InternalCallRegistrationWriter.Runner.DefaultRunner.Run (Unity.InternalCallRegistrationWriter.Runner.InternalCallOptions options) [0x00022] in <0d3380eb5a25466c9471bc2ee62bbd90>:0
    46.   at Unity.InternalCallRegistrationWriter.Runner.DefaultRunner.ParseOptionsAndRun (System.String[] args) [0x00008] in <0d3380eb5a25466c9471bc2ee62bbd90>:0
    47.   at Unity.InternalCallRegistrationWriter.Program.Main (System.String[] args) [0x00001] in <0d3380eb5a25466c9471bc2ee62bbd90>:0
    48. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
    49.  
     
  9. MasoInar

    MasoInar

    Joined:
    Feb 20, 2014
    Posts:
    125
    I have had the same problems on Apple Silicon WebGL builds (2022.1 alpha and beta). Case numbers 1363650 and 1387881
     
    DrViJ likes this.
  10. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    133
    I’m having this too on 2022.1.0b4. M1 Max.
     
  11. LeonhardP

    LeonhardP

    Unity Technologies

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

    Could you please submit bug reports for this issue if you're affected by this behavior? We're still missing reproducibles and would appreciate additional input.

    This case was closed as fixed because it was no longer reproducible on our end with 2022.1b2. If this issue remains unresolved for you in later versions of 2022.1, could you please send a reply to the associated email conversation? That will re-open the case.
     
  12. Newcomma

    Newcomma

    Joined:
    Feb 10, 2015
    Posts:
    89
    Submitted https://fogbugz.unity3d.com/default.asp?1399524 - not sure if beta bugs fall into a separate QA flow/cadence?
     
    Last edited by a moderator: Jan 31, 2022
  13. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
  14. Newcomma

    Newcomma

    Joined:
    Feb 10, 2015
    Posts:
    89
  15. hoanganhtran1010

    hoanganhtran1010

    Joined:
    Nov 25, 2021
    Posts:
    7
    I have same problem, my 2d simple game always loss a lot fps when character jumps
     
  16. antonkudin

    antonkudin

    Joined:
    Aug 4, 2014
    Posts:
    32
    Still not fixed in 2022.1.0b9.
     
  17. matt_cauldron

    matt_cauldron

    Joined:
    Dec 17, 2021
    Posts:
    48
  18. antonkudin

    antonkudin

    Joined:
    Aug 4, 2014
    Posts:
    32
  19. matt_cauldron

    matt_cauldron

    Joined:
    Dec 17, 2021
    Posts:
    48
    antonkudin likes this.
  20. nroth

    nroth

    Joined:
    Mar 10, 2018
    Posts:
    1
    I'm having the same exact issue, only on the latest macOS toolchain, with a different program. Mind sharing how you fixed this?
     
  21. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    Could you please submit a bug report with reproduction steps and a reproduction project attached?
     
  22. Elapotp

    Elapotp

    Joined:
    May 14, 2014
    Posts:
    98
    I have the same issue on a new Unity's ECS Network Racing Sample

    Apple MacBook Pro M1 Pro 32 GB
    Unity 2022.2.1f1

    Code (CSharp):
    1. DllNotFoundException: libVivoxNative assembly:<unknown assembly> type:<unknown type> member:(null)
    2. VivoxCoreInstancePINVOKE+SWIGExceptionHelper..cctor () (at Library/PackageCache/com.unity.services.vivox@15.1.180000-pre.1/Runtime/VivoxUnity/swig/VivoxCoreInstancePINVOKE.cs:128)
    3. Rethrow as TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception.
    4. VivoxCoreInstancePINVOKE..cctor () (at Library/PackageCache/com.unity.services.vivox@15.1.180000-pre.1/Runtime/VivoxUnity/swig/VivoxCoreInstancePINVOKE.cs:148)
    5. Rethrow as TypeInitializationException: The type initializer for 'VivoxCoreInstancePINVOKE' threw an exception.
    6. VivoxUnity.Client.get_Initialized () (at Library/PackageCache/com.unity.services.vivox@15.1.180000-pre.1/Runtime/VivoxUnity/Client.cs:220)
    7. VivoxUnity.Client.Initialize (VivoxUnity.VivoxConfig config) (at Library/PackageCache/com.unity.services.vivox@15.1.180000-pre.1/Runtime/VivoxUnity/Client.cs:66)
    8. Unity.Services.Vivox.VivoxServiceInternal.Initialize () (at Library/PackageCache/com.unity.services.vivox@15.1.180000-pre.1/Runtime/VivoxServiceInternal.cs:50)
    9. Unity.Entities.Racing.Gameplay.VivoxManager.Start () (at Assets/Scripts/Gameplay/Audio/VivoxManager.cs:85)
    10. VivoxUnity.Client.get_Initialized () (at Library/PackageCache/com.unity.services.vivox@15.1.180000-pre.1/Runtime/VivoxUnity/Client.cs:220)
    11. VivoxUnity.Client.Initialize (VivoxUnity.VivoxConfig config) (at Library/PackageCache/com.unity.services.vivox@15.1.180000-pre.1/Runtime/VivoxUnity/Client.cs:66)
    12. Unity.Services.Vivox.VivoxServiceInternal.Initialize () (at Library/PackageCache/com.unity.services.vivox@15.1.180000-pre.1/Runtime/VivoxServiceInternal.cs:50)
    13. Unity.Entities.Racing.Gameplay.VivoxManager.Start () (at Assets/Scripts/Gameplay/Audio/VivoxManager.cs:85)
    14. System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <1b72fc97b7c245a483150421232eb6a9>:0)
    15. UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:153)
    16. UnityEngine.UnitySynchronizationContext.Exec () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:83)
    17. UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)
    18.