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.

Bug Crashes libil2cpp.so Il2CppComDelegate_Finalize

Discussion in 'Editor & General Support' started by Shefich, Nov 25, 2022.

  1. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    84
    I have too many crashes like this one:
    Code (CSharp):
    1. 0
    2. libil2cpp.so
    3. ContextCallback_Invoke_m872CCCD40428B88C2612772491BE5157895B5F61_OpenStatic(ContextCallback_tE8AFBDBFCC040FDA8DA8C1EEFE9BD66B16BDA007*, Il2CppObject*, MethodInfo const*)
    4. 1
    5. libil2cpp.so
    6. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    7. 2
    8. libil2cpp.so
    9. AwaitTaskContinuation.cs
    10. _ctor
    11. 3
    12. libil2cpp.so
    13. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    14. 4
    15. libil2cpp.so
    16. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    17. 5
    18. libil2cpp.so
    19. SynchronizationContextAwaitTaskContinuation.cs
    20. Run
    21. 6
    22. libil2cpp.so
    23. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    24. 7
    25. libil2cpp.so
    26. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    27. 8
    28. libil2cpp.so
    29. Task.cs
    30. FinishContinuations
    31. 9
    32. libc.so
    33. (Missing UUID 4431b35d55c1d9b5f8568451110b8281)
    34. 10
    35. libil2cpp.so
    36. Task_1_TrySetResult_m2EE766FD3F76F4824990F4A93ED1F7253ECE014C_gshared
    37. 11
    38. libil2cpp.so
    39. TaskCompletionSource_1_TrySetResult_m7A0F162733257CA73B347B6BB9677F25A0AB0F9B_gshared
    40. 12
    41. libil2cpp.so
    42. AwaitableAndroidJavaProxy_1__setResult_m45286E6F9FFDD4D9A351DB3E6AE69FE15495E395_gshared
    43. 13
    44. libil2cpp.so
    45. RuntimeInvoker_TrueVoid_t4861ACF8F4594C3437BB48B6E56783494B843915_Navigation_t4D2E201D65749CF4E104E8AC1232CF1D6F14795C(void (*)(), MethodInfo const*, void*, void**, void*)
    46. 14
    47. libil2cpp.so
    48. il2cpp::vm::Runtime::InvokeWithThrow(MethodInfo const*, void*, void**)
    49. 15
    50. libc.so
    51. (Missing UUID 4431b35d55c1d9b5f8568451110b8281)
    52. 16
    53. libil2cpp.so
    54. il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**)
    55. 17
    56. libil2cpp.so
    57. il2cpp::vm::Runtime::InvokeConvertArgs(MethodInfo const*, void*, Il2CppObject**, int, Il2CppException**)
    58. 18
    59. libil2cpp.so
    60. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    61. 19
    62. libc.so
    63. (Missing UUID 4431b35d55c1d9b5f8568451110b8281)
    64. 20
    65. libil2cpp.so
    66. il2cpp::vm::Runtime::InvokeArray(MethodInfo const*, void*, Il2CppArray*, Il2CppException**)
    67. 21
    68. libil2cpp.so
    69. il2cpp::icalls::mscorlib::System::Reflection::RuntimeMethodInfo::InternalInvoke(Il2CppReflectionMethod*, Il2CppObject*, Il2CppArray*, Il2CppException**)
    70. 22
    71. libil2cpp.so
    72. il2cpp::icalls::mscorlib::System::RuntimeTypeHandle::HasInstantiation(Il2CppReflectionRuntimeType*)
    73. 23
    74. libil2cpp.so
    75. RuntimeMethodInfo.cs
    76. Invoke
    77. 24
    78. libil2cpp.so
    79. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    80. 25
    81. libil2cpp.so
    82. MethodBase.cs
    83. Invoke
    84. 26
    85. libil2cpp.so
    86. AndroidJavaProxy.cs
    87. Invoke
    88. 27
    89. libil2cpp.so
    90. AndroidReflection.cs
    91. SetNativeExceptionOnProxy
    92. 28
    93. libil2cpp.so
    94. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    95. 29
    96. libil2cpp.so
    97. _AndroidJNIHelper_InvokeJavaProxyMethod_mCA9BD35B5AE99B6DFABBFE9968DD1EBE931F70C2
    98. 30
    99. libil2cpp.so
    100. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    101. 31
    102. libil2cpp.so
    103. RuntimeInvoker_FalseIntPtr_t_RuntimeObject_IntPtr_t_Int32_t680FF22E76F6EFAD4375103CBBFFA0421349384C(void (*)(), MethodInfo const*, void*, void**, void*)
    104. 32
    105. libc.so
    106. (Missing UUID 4431b35d55c1d9b5f8568451110b8281)
    107. 33
    108. libil2cpp.so
    109. RuntimeInvoker_FalseIntPtr_t_RuntimeObject_IntPtr_t_IntPtr_t(void (*)(), MethodInfo const*, void*, void**, void*)
    110. 34
    111. libil2cpp.so
    112. il2cpp::vm::Runtime::InvokeWithThrow(MethodInfo const*, void*, void**)
    113. 35
    114. libil2cpp.so
    115. il2cpp::vm::Runtime::InvokeWithThrow(MethodInfo const*, void*, void**)
    116. 36
    117. libil2cpp.so
    118. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    119. 37
    120. libil2cpp.so
    121. il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**)
    122. 38
    123. libunity.so
    124. scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
    125. 39
    126. libil2cpp.so
    127. il2cpp::vm::Thread::Attach(Il2CppDomain*)
    128. 40
    129. libunity.so
    130. __ashldi3
    131. 41
    132. libunity.so
    133. ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
    134. 42
    135. libunity.so
    136. UnityJavaProxy_invoke(_JNIEnv*, _jobject*, long long, _jstring*, _jobjectArray*)
    Started to appear after I switched to Unity 2021.3.12.
    Also can be seen on Unity 2021.3.13 and 2021.3.14.
    I am not using Incremental garbage collection.
     
  2. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    84
    Unity 2021.3.15 also has this bug.
     
  3. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    84
    I got stacktrace with more information. Looks like the crash caused byt Unity Advertisment banner.


    Code (CSharp):
    1. Crashed: Thread #1
    2. SIGSEGV 0x000000002c59909c
    3. 0
    4. libil2cpp.so
    5. il2cpp::vm::GlobalMetadata::GetMethodInfo(Il2CppClass const*, int)
    6. 1
    7. libil2cpp.so
    8. il2cpp::vm::SetupMethodsLocked(Il2CppClass*, il2cpp::os::FastAutoLock const&)
    9. 2
    10. libc.so
    11. (Missing BuildId 00be8c4fc1e3ff439b7de04fef5dc81b)
    12. 3
    13. libc.so
    14. (Missing BuildId 00be8c4fc1e3ff439b7de04fef5dc81b)
    15. 4
    16. libil2cpp.so
    17. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    18. 5
    19. libil2cpp.so
    20. il2cpp::vm::Class::InitLocked(Il2CppClass*, il2cpp::os::FastAutoLock const&)
    21. 6
    22. libil2cpp.so
    23. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    24. 7
    25. libil2cpp.so
    26. il2cpp::metadata::Il2CppTypeEqualityComparer::AreEqual(Il2CppType const*, Il2CppType const*)
    27. 8
    28. libil2cpp.so
    29. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    30. 9
    31. libil2cpp.so
    32. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    33. 10
    34. libil2cpp.so
    35. il2cpp::vm::Class::Init(Il2CppClass*)
    36. 11
    37. libil2cpp.so
    38. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    39. 12
    40. libil2cpp.so
    41. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    42. 13
    43. libil2cpp.so
    44. il2cpp::vm::ClassInlines::InitFromCodegenSlow(Il2CppClass*)
    45. 14
    46. libil2cpp.so
    47. il2cpp::vm::ClassInlines::InitFromCodegenSlow(Il2CppClass*, bool)
    48. 15
    49. libil2cpp.so
    50. il2cpp::vm::GlobalMetadata::InitializeRuntimeMetadata(unsigned int*, bool)
    51. 16
    52. libil2cpp.so
    53. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    54. 17
    55. libil2cpp.so
    56. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    57. 18
    58. libil2cpp.so
    59. _AndroidJNIHelper_CreateJavaRunnable_m25981D4249F420FA78240CDC2F7E53B9EAD5F31A
    60. 19
    61. libil2cpp.so
    62. _AndroidJNIHelper_CreateJNIArgArray_mFB22FA0559B96CAA29D2A63EA56EF62F0280AA39
    63. 20
    64. libil2cpp.so
    65. AndroidJavaObject.cs
    66. _Call
    67. 21
    68. libil2cpp.so
    69. AndroidJavaRunnable.cs
    70. _ctor
    71. 22
    72. libil2cpp.so
    73. AndroidBanner.cs
    74. Show
    75. 23
    76. libil2cpp.so
    77. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    78. 24
    79. libil2cpp.so
    80. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    81. 25
    82. libil2cpp.so
    83. UnityAdsSingleton.cs
    84. ShowBannerAd
    85. 26
    86. libil2cpp.so
    87. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    88. 27
    89. libil2cpp.so
    90. GameScreen.cs
    91. Show
    92. 28
    93. libil2cpp.so
    94. GameScreen.cs
    95. Update
    96. 29
    97. libil2cpp.so
    98. ScreenManager.cs
    99. Show
    100. 30
    101. libil2cpp.so
    102. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    103. 31
    104. libil2cpp.so
    105. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    106. 32
    107. libil2cpp.so
    108. ScreenManager.cs
    109. Show
    110. 33
    111. libil2cpp.so
    112. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    113. 34
    114. libil2cpp.so
    115. SingletonComponent_1_get_Instance_m0A4547D0A125DE6002C5B71832DF842742492E37_gshared
    116. 35
    117. libil2cpp.so
    118. GameManager.cs
    119. PlayGame
    120. 36
    121. libil2cpp.so
    122. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    123. 37
    124. libil2cpp.so
    125. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    126. 38
    127. libil2cpp.so
    128. PuzzleGroupData.cs
    129. GetPuzzle
    130. 39
    131. libil2cpp.so
    132. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    133. 40
    134. libil2cpp.so
    135. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    136. 41
    137. libil2cpp.so
    138. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    139. 42
    140. libil2cpp.so
    141. GameManager.cs
    142. PlayNewGame
    143. 43
    144. libil2cpp.so
    145. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    146. 44
    147. libil2cpp.so
    148. Object.cs
    149. op_Inequality
    150. 45
    151. libil2cpp.so
    152. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    153. 46
    154. libil2cpp.so
    155. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    156. 47
    157. libil2cpp.so
    158. UnityEvent.cs
    159. Invoke
    160. 48
    161. libil2cpp.so
    162. EventFunction_1__ctor_m8527E59AE02A1117319F24ADABBF52E2FE8EA368_gshared
    163. 49
    164. libil2cpp.so
    165. ExecuteEvents_Execute_TisRuntimeObject_mDC4455B743BE4A6BA46DD741D0E0AB150FF1209A_gshared
    166. 50
    167. libil2cpp.so
    168. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    169. 51
    170. libil2cpp.so
    171. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    172. 52
    173. libil2cpp.so
    174. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    175. 53
    176. libil2cpp.so
    177. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    178. 54
    179. libil2cpp.so
    180. __Il2CppComDelegate_Finalize_mC9F8EA94444C3AF0A43CC723A23EE4D8B7984F8C
    181. 55
    182. libil2cpp.so
    183. StandaloneInputModule.cs
    184. ProcessTouchPress
    185. 56
    186. libil2cpp.so
    187. StandaloneInputModule.cs
    188. ProcessTouchEvents
    189. 57
    190. libil2cpp.so
    191. il2cpp::vm::Object::IsInst(Il2CppObject*, Il2CppClass*)
    192. 58
    193. libc.so
    194. (Missing BuildId 00be8c4fc1e3ff439b7de04fef5dc81b)
    195. 59
    196. libil2cpp.so
    197. StandaloneInputModule.cs
    198. Process
    199. 60
    200. libil2cpp.so
    201. RuntimeInvoker_TrueVisualElementStyleSheetSet_t01465769E0D9109A677300311A7058701873A23B(void (*)(), MethodInfo const*, void*, void**, void*)
    202. 61
    203. libil2cpp.so
    204. il2cpp::vm::Runtime::InvokeWithThrow(MethodInfo const*, void*, void**)
    205. 62
    206. libil2cpp.so
    207. il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**)
    208. 63
    209. libunity.so
    210. scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
    In project used Unity Advertisment Legacy 4.4.1 alongside with Unity Ads Unity Mediation Plugin 3.4.1. but the crash comes from loading Unity Ads banner as I see in the logs.
     
  4. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    84
    The crash coming from this method:

    Code (CSharp):
    1. public void ShowBannerAd()
    2.     {
    3.         Debug.Log("[ShowBannerAd] trying to show unity banner");
    4.         if (CrashlyticsInit._instance != null) CrashlyticsInit._instance.LogCrashlitics("[ShowBannerAd] trying to show unity banner");
    5.         if (!isInitialised) return;
    6.         Debug.Log("[ShowBannerAd] Unity's bannerIsShown: " + bannerIsShown);
    7.         // Set up options to notify the SDK of show events:
    8.         BannerOptions options = new BannerOptions
    9.         {
    10.             clickCallback = OnBannerClicked,
    11.             hideCallback = OnBannerHidden,
    12.             showCallback = OnBannerShown
    13.         };
    14.  
    15.         Debug.Log("[ShowBannerAd] Unity's command to show unity banner. isLoaded: " + Advertisement.Banner.isLoaded);
    16.         Advertisement.Banner.SetPosition (BannerPosition.BOTTOM_CENTER); //just to be sure
    17.  
    18.         // Show the loaded Banner Ad Unit:
    19.         if (!bannerIsShown) Advertisement.Banner.Show("banner", options);
    20.     }
    I am receiving this log: "[ShowBannerAd] trying to show unity banner", and then crash occurs.