Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Bug Android: DllNotFoundException when using System calls such as ToString() or DateTime.Now

Discussion in 'Editor & General Support' started by StayThirsty, Feb 14, 2022.

  1. StayThirsty

    StayThirsty

    Joined:
    Jul 6, 2013
    Posts:
    42
    Running on Android 5.1.1 (Nexus 10 tablet) and I'm getting this error:
    Code (CSharp):
    1. DllNotFoundException: /data/app/com.DefaultCompany.project-1/lib/arm/libmono-native.so assembly:<unknown assembly> type:<unknown type> member:(null)
    using ECS, unity physics, hybrid renderer, burst, and Mono
    Unity version 2021.2.11f1
    logcat:
    Code (CSharp):
    1. linker lib_burst_generated.so: unused DT entry: type 0x6ffffef5 arg 0x28708
    2. linker lib_burst_generated.so: unused DT entry: type 0x6ffffffe arg 0x2bee8
    3. linker lib_burst_generated.so: unused DT entry: type 0x6fffffff arg 0x2
    4. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    5. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    6. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    7. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    8. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    9. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    10. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    11. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    12. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    13. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    14. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    15. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    16. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    17. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    18. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    19. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    20. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    21. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    22. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    23. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    24. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    25. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    26. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    27. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    28. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    29. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    30. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    31. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    32. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    33. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    34. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    35. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    36. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    37. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    38. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    39. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    40. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    41. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    42. linker libmono-native.so: unused DT entry: type 0x6ffffffe arg 0x2150
    43. linker libmono-native.so: unused DT entry: type 0x6fffffff arg 0x2
    44. Unity DllNotFoundException: /data/app/com.DefaultCompany.project-1/lib/arm/libmono-native.so assembly:<unknown assembly> type:<unknown type> member:(null)
    45. Unity   at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag()
    46. Unity   at Interop+Sys..cctor () [0x00000] in <8381b4eb633d4e20a2796f7a88eaf7e5>:0
    47. Unity Rethrow as TypeInitializationException: The type initializer for 'Sys' threw an exception.
    48. Unity  at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <8381b4eb633d4e20a2796f7a88eaf7e5>:0
    49. Unity  at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <8381b4eb633d4e20a2796f7a88eaf7e5>:0
    50. Unity   at System.IO.File.Exists (System.String path) [0x00043] in <8381b4eb633d4e20a2796f7a88eaf7e5>:0
    51. Unity   at Unity.Scenes.LiveLinkUtility.ReadPlayerLiveLinkCacheGUID () [0x00010] in <6b899379367449fdbe23c1d59f68211f>:0
    52. Unity   at Unity.Scenes.LiveLinkUtility.LiveLinkBoot () [0x00053] in <6b899379367449fdbe23c1d59f68211f>:0
    53. Unity   a
    54. Unity DllNotFoundException: /data/app/com.DefaultCompany.project-1/lib/arm/libmono-native.so assembly:<unknown assembly> type:<unknown type> member:(null)
    55. Unity   at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag()
    56. Unity   at Interop+Sys..cctor () [0x00000] in <8381b4eb633d4e20a2796f7a88eaf7e5>:0
    57. Unity Rethrow as TypeInitializationException: The type initializer for 'Sys' threw an exception.
    58. Unity  at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <8381b4eb633d4e20a2796f7a88eaf7e5>:0
    59. Unity  at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <8381b4eb633d4e20a2796f7a88eaf7e5>:0
    60. Unity   at System.IO.File.Exists (System.String path) [0x00043] in <8381b4eb633d4e20a2796f7a88eaf7e5>:0
    61. Unity   at Unity.Scenes.SceneSystem.OnCreate () [0x00052] in <6b899379367449fdbe23c1d59f68211f>:0
    62. Unity  at Unity.Entities.ComponentSystemBase.CreateInstance (Unity.Entities.World world, Unity.Entities.SystemState* statePtr) [0x00
    63.  
    I suspect the Nexus 10 is just too old. Running on 10 years with Android 5.1.1 as its maximum upgradable version :(
     
    Last edited: Feb 15, 2022
  2. StayThirsty

    StayThirsty

    Joined:
    Jul 6, 2013
    Posts:
    42
    Turns out this bug happens when using System calls, such as ToString() or System.DateTime.Now, when building on Android (Nexus 10 android v5.1.1) using Mono. The error does not happen when building on IL2CPP

    I've submitted a bug report to Unity
     
    onehitdragon likes this.
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,420
    Just so you know, I suspect that Unity will support Mono less and less and less until it just stops working.

    This is simply because mainline Google Play store requires apps to be compiled in 64bit, which requires IL2CPP.
     
  4. StayThirsty

    StayThirsty

    Joined:
    Jul 6, 2013
    Posts:
    42
    Yeah, I just read last night that Google is requiring 64bit builds. Its unfortunate because half of my devices fail to build on IL2CPP, especially when using preview packages such as Entities :(
     
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,420
    That is where you should file your bugs! :)

    Obviously it's unlikely they'll fix any version of Entities besides latest and greatest.
     
  6. StayThirsty

    StayThirsty

    Joined:
    Jul 6, 2013
    Posts:
    42
    I will! :)
     
  7. Tortuap

    Tortuap

    Joined:
    Dec 4, 2013
    Posts:
    137
    Any news about this ? Can you link your bug report ?
     
  8. StayThirsty

    StayThirsty

    Joined:
    Jul 6, 2013
    Posts:
    42
    email from unity:

     
  9. StinkySteak

    StinkySteak

    Joined:
    Jul 7, 2017
    Posts:
    23
    Just got several reviews on our google play store, telling our game doesn't work (and all of them were using android 5.1), We have the same error if we are on Mono, but solved with IL2CPP, we encounter this issue while debugging things eventhough this issue doesnt exist on production.