You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[14:05:20.761] [MoreQOD] MarkLabel 2 169
[14:05:20.763] [MoreQOD] MarkLabel 2 169
[14:05:20.764] [MoreQOD] Blt_S 235
[14:05:20.764] [MoreQOD] Blt_S 237
[14:05:20.765] [MoreQOD] MarkLabel 5 277
[14:05:20.766] [MoreQOD] MarkLabel 5 277
[14:05:20.767] [MoreQOD] Blt_S 328
[14:05:20.768] [MoreQOD] Blt_S 330
[14:05:20.770] [MoreQOD] [ERROR] System.InvalidProgramException: Invalid IL code in (wrapper dynamic-method) object:getRank (Death.Items.Item): IL_0148: blt.s IL_01a9
at (wrapper managed-to-native) System.Delegate.CreateDelegate_internal(System.Type,object,System.Reflection.MethodInfo,bool)
at System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, System.Boolean throwOnBindFailure, System.Boolean allowClosed) [0x002f0] in <9aad1b3a47484d63ba2b3985692d80e9>:0
at System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method) [0x00000] in <9aad1b3a47484d63ba2b3985692d80e9>:0
at System.Reflection.Emit.DynamicMethod.CreateDelegate (System.Type delegateType) [0x00029] in <9aad1b3a47484d63ba2b3985692d80e9>:0
at MQOD.Sort.GenerateILGetRankIL () [0x00957] in <1efc024047cc4f579f5b6f749046551d>:0
at MQOD.SortShop.sortShop () [0x00028] in <1efc024047cc4f579f5b6f749046551d>:0
at MQOD.MQOD.OnLateUpdate () [0x0037a] in <1efc024047cc4f579f5b6f749046551d>:0
at MelonLoader.MelonEvent+<>c.<Invoke>b__1_0 (MelonLoader.LemonAction x) [0x00000] in <6425afb6ac6a429aaf770255d2f7de57>:0
at MelonLoader.MelonEventBase`1[T].Invoke (System.Action`1[T] delegateInvoker) [0x00018] in <6425afb6ac6a429aaf770255d2f7de57>:0
I have tracked the issue down to that last call of Blt_S, because we can see from the error that the offending code happens at offset IL_0148 which corresponds to 328 in decimal in the log:
...
il.Emit(OpCodes.Blt_S, labels[2]);
...
The generated IL uses the address IL_01a9 for labels[2] but from my logging I can see that MarkLabel(labels[2]) happens at ILOffset '169' decimal or 'A9' in hex. So IL_01a9 is off by exactly 100 in hex or 256 in decimal. So the generated IL should be "IL_0148: blt.s IL_00a9" and not "IL_0148: blt.s IL_01a9", right?
The text was updated successfully, but these errors were encountered:
The code:
The console log:
I have tracked the issue down to that last call of Blt_S, because we can see from the error that the offending code happens at offset IL_0148 which corresponds to 328 in decimal in the log:
The generated IL uses the address IL_01a9 for labels[2] but from my logging I can see that MarkLabel(labels[2]) happens at ILOffset '169' decimal or 'A9' in hex. So IL_01a9 is off by exactly 100 in hex or 256 in decimal. So the generated IL should be "IL_0148: blt.s IL_00a9" and not "IL_0148: blt.s IL_01a9", right?
The text was updated successfully, but these errors were encountered: