NullReferenceException: Object reference not set to an instance of an object
HybridCLR.Editor.DHE.MethodCompareCache.CompareExceptionHandler (dnlib.DotNet.Emit.ExceptionHandler e1, dnlib.DotNet.Emit.ExceptionHandler e2) (at Library/PackageCache/com.focus-creative-games.hybridclr_unity@8c290d286c/Editor/DHE/MethodCompareCache.cs:590)
复现代码:
class A
{
private object mLock = new object();
public void Func1()
{
lock (mLock)
{
var e = Func2();
if (e != null)
throw e;
throw new InvalidOperationException("xxxx");
}
}
private Exception Func2()
{
return null;
}
}
问题2
没有变化的函数,被计算为不等价,复现代码:
class A<T> where T : UnityEngine.Object
{
private UnityEngine.Object mObject;
public A(UnityEngine.Object obj)
{
mObject = obj;
}
public T Object
{
get
{
return mObject as T;
}
}
}
环境
问题1
计算等价性时,报错:
复现代码:
问题2
没有变化的函数,被计算为不等价,复现代码:
输出:
change mehtod:T A`1::get_Object() token:100663298
问题3
多线程情况下,
GetRuntimeMetadataIl2CppType
中,可能创建多个相同的dhType
问题4
s_dheTypes
在il2cpp::vm::GlobalMetadata::Clear
中没有释放