Tencent / puerts

PUER(普洱) Typescript. Let's write your game in UE or Unity with TypeScript.
Other
5.08k stars 707 forks source link

[Unity] Bug: IL2cpp crash console.log(new Vector(1,1,1)); #1376

Closed mingxxming closed 1 year ago

mingxxming commented 1 year ago

前置阅读 | Pre-reading

Puer的版本 | Puer Version

2.0.0-pre.4(master)

Unity的版本 | Unity Version

2021.3.19f1

发生在哪个平台 | Platform

Android

错误信息 | Error Message

No response

问题重现 | Bug reproduce

console.log(new Vector(1,1,1));

mingxxming commented 1 year ago

il2cpp::metadata::Il2CppTypeHash::Hash(Il2CppType const) E:/Projects/rgd/game/u3d/release/2023_6_6/GC_OHAYOO_MOCK_19_20.apk/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp/metadata/Il2CppTypeHash.cpp:21 google::sparsehash_internal::sh_hashtable_settings<KeyWrapper<Il2CppType const>, il2cpp::metadata::Il2CppTypeHash, unsigned long, 4>::hash(KeyWrapper<Il2CppType const> const&) const E:/Projects/rgd/game/u3d/release/2023_6_6/GC_OHAYOO_MOCK_19_20.apk/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp/utils/../../external/google/sparsehash/internal/hashtable-common.h:244 google::sparse_hashtable<std::__ndk1::pair<KeyWrapper<Il2CppType const> const, unsigned long>, KeyWrapper<Il2CppType const>, il2cpp::metadata::Il2CppTypeHash, google::sparse_hash_map<KeyWrapper<Il2CppType const>, unsigned long, il2cpp::metadata::Il2CppTypeHash, KeyWrapper<Il2CppType const>::EqualsComparer, google::libc_allocator_with_realloc<std::__ndk1::pair<KeyWrapper<Il2CppType const> const, unsigned long> > >::SelectKey, google::sparse_hash_map<KeyWrapper<Il2CppType const>, unsigned long, il2cpp::metadata::Il2CppTypeHash, KeyWrapper<Il2CppType const>::EqualsComparer, google::libc_allocator_with_realloc<std::ndk1::pair<KeyWrapper<Il2CppType const> const, unsigned long> > >::SetKey, KeyWrapper<Il2CppType const>::EqualsComparer, google::libc_allocator_with_realloc<std::__ndk1::pair<KeyWrapper<Il2CppType const> const, unsigned long> > >::find(KeyWrapper<Il2CppType const> const&) E:/Projects/rgd/game/u3d/release/2023_6_6/GC_OHAYOO_MOCK_19_20.apk/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp/utils/../../external/google/sparsehash/internal/sparsehashtable.h:872 google::sparse_hash_map<KeyWrapper<Il2CppType const>, unsigned long, il2cpp::metadata::Il2CppTypeHash, KeyWrapper<Il2CppType const>::EqualsComparer, google::libc_allocator_with_realloc<std::ndk1::pair<KeyWrapper<Il2CppType const> const, unsigned long> > >::find(KeyWrapper<Il2CppType const> const&) E:/Projects/rgd/game/u3d/release/2023_6_6/GC_OHAYOO_MOCK_19_20.apk/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp/utils/../../external/google/sparsehash/sparse_hash_map.h:239 il2cpp::vm::Reflection::GetTypeObject(Il2CppType const) E:/Projects/rgd/game/u3d/release/2023_6_6/GC_OHAYOO_MOCK_19_20.apk/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp/vm/Reflection.cpp:267 Object_GetType_mE10A8FC1E57F3DF29972CCBC026C2DC3942263B3 E:/Projects/rgd/game/u3d/release/2023_6_6/GC_OHAYOO_MOCK_19_20.apk/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/mscorlib__7.cpp:22152 RuntimeInvoker_TrueRuntimeObject(void ()(), MethodInfo const, void, void*, void) E:/Projects/rgd/game/u3d/release/2023_6_6/GC_OHAYOO_MOCK_19_20.apk/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/Il2CppInvokerTable.cpp:99682 il2cpp::vm::Runtime::InvokeWithThrow(MethodInfo const, void, void*) E:/Projects/rgd/game/u3d/release/2023_6_6/GC_OHAYOO_MOCK_19_20.apk/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/libil2cpp/vm/Runtime.cpp:596 puerts::ReflectionWrapper(MethodInfo, void ()(), pesapi_callback_info__, bool, puerts::WrapData) E:/Projects/rgd/game/u3d/release/2023_6_6/GC_OHAYOO_MOCK_19_20.apk/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/Puerts_il2cpp.cpp:1383 puerts::MethodCallback(pesapi_callback_info__) E:/Projects/rgd/game/u3d/release/2023_6_6/GC_OHAYOO_MOCK_19_20.apk/unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/Puerts_il2cpp.cpp:236 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) :? v8::internal::MaybeHandle v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate, v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::BuiltinArguments) :? v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate) :? Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit :?

zombieyang commented 1 year ago

todo:this为valuetype但函数this类型为object时,需要一次boxing