I don’t know if it is fixed in 5.0.1p1 (677402) or not, since there are significant differences between that issue and mine. Also, since I’m mostly using my own class library (dll) instead of Assembly-CSharp in order to accelerate the compile speed, I’m not sure whether this fault belongs to me or not.
On iPhone Simulator i’ve got the exception at:
(Surely the exception is BAD_ACCESS which stands for NullReferenceException)
Colosseum`il2cpp::vm::Runtime::GetVirtualInvokeData(MethodInfo*, void*) at Runtime.cpp:517:
0x31eea10: pushl %ebp
0x31eea11: movl %esp, %ebp
0x31eea13: pushl %esi
0x31eea14: pushl %eax
0x31eea15: movl 0xc(%ebp), %eax
0x31eea18: movl 0x8(%ebp), %ecx
0x31eea1b: movl (%eax), %edx
0x31eea1d: movzwl 0x20(%ecx), %ecx
0x31eea21: movl 0x34(%edx), %edx
0x31eea24: movl (%edx,%ecx,4), %esi
0x31eea27: movl 0x8(%esi), %ecx
which is referenced by:
inline MethodInfo* GetVirtualMethodInfo (Il2CppCodeGenObject* pThis, MethodInfo* method)
{
VirtualInvokeData data = il2cpp::vm::Runtime::GetVirtualInvokeData (method, pThis);
return data.methodInfo;
}
Finally here is my own code compiled by il2app.
IL_0031:
{
___Phase = G_B9_0;
Environment_t1268 * L_3 = ColosseumBehaviour_get_Environment_m7978(__this, /*hidden argument*/&ColosseumBehaviour_get_Environment_m7978_MethodInfo);
NullCheck(L_3);
CommandQueue_1_t1388 * L_4 = Environment_get_CommandQueue_m8077(L_3, /*hidden argument*/&Environment_get_CommandQueue_m8077_MethodInfo);
IntPtr_t83 L_5 = { GetVirtualMethodInfo(__this, &SceneSplash_PhaseIncrementInternal_m7309_MethodInfo) };
Action_2_t1570 * L_6 = (Action_2_t1570 *)il2cpp_codegen_object_new (InitializedTypeInfo(&Action_2_t1570_il2cpp_TypeInfo));
Action_2__ctor_m9261(L_6, __this, L_5, /*hidden argument*/&Action_2__ctor_m9261_MethodInfo);
GameObject_t28 * L_7 = Component_get_gameObject_m3307(__this, /*hidden argument*/&Component_get_gameObject_m3307_MethodInfo);
String_t* L_8 = Conversions_ToString_m6568(NULL /*static, unused*/, ___Phase, /*hidden argument*/&Conversions_ToString_m6568_MethodInfo);
NullCheck(L_4);
CommandQueue_1_ExecuteAction_m9262(L_4, L_6, L_7, L_8, /*hidden argument*/&CommandQueue_1_ExecuteAction_m9262_MethodInfo);
return;
}
}
// System.Void Colosseum.Clients.SceneSplash::PhaseIncrementInternal(UnityEngine.GameObject,System.String)
void SceneSplash_PhaseIncrementInternal_m7309 (SceneSplash_t1277 * __this, GameObject_t28 * ___Source, String_t* ___Data, MethodInfo* method){
int32_t V_0 = 0;
bool V_1 = false;
{
int32_t L_0 = Int32_Parse_m4609(NULL /*static, unused*/, ___Data, /*hidden argument*/&Int32_Parse_m4609_MethodInfo);
V_0 = L_0;
ProgressTweener_t1266 * L_1 = (__this->___Slider_12);
int32_t L_2 = SceneSplash_get_TotalPhases_m7302(__this, /*hidden argument*/&SceneSplash_get_TotalPhases_m7302_MethodInfo);
NullCheck(L_1);
ProgressTweener_SetTarget_m7281(L_1, (((float)((double)((double)(((double)V_0))/(double)(((double)L_2)))))), /*hidden argument*/&ProgressTweener_SetTarget_m7281_MethodInfo);
int32_t L_3 = SceneSplash_get_TotalPhases_m7302(__this, /*hidden argument*/&SceneSplash_get_TotalPhases_m7302_MethodInfo);
V_1 = ((((int32_t)V_0) == ((int32_t)L_3))? 1 : 0);
if (!V_1)
{
goto IL_003d;
}
}
{
SplashTexts_t1282 * L_4 = (__this->___SplashTexts_8);
NullCheck(L_4);
Queue_1_t1283 * L_5 = SplashTexts_get_Texts_m7325(L_4, /*hidden argument*/&SplashTexts_get_Texts_m7325_MethodInfo);
NullCheck(L_5);
Queue_1_Clear_m9263(L_5, /*hidden argument*/&Queue_1_Clear_m9263_MethodInfo);
}
I’ve used ILSpy for its IL code and got the result as such:
IL_0040: ldvirtftn instance void Colosseum.Clients.SceneSplash::PhaseIncrementInternal(class [UnityEngine]UnityEngine.GameObject, string)
Thank you for reading, and I’m eager to know whether it’s a known bug or not, since I didn’t find any post concerning GetVirtualMethodInfo or GetVirtualInvokeData.