Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashed on Unity3D(2021.3.14f1 or higher) #1

Open
RiritoNinigaya opened this issue Jan 1, 2024 · 23 comments
Open

Crashed on Unity3D(2021.3.14f1 or higher) #1

RiritoNinigaya opened this issue Jan 1, 2024 · 23 comments

Comments

@RiritoNinigaya
Copy link
Contributor

Mono Mode is Crashed Unity3D(2021.3.14f1 or higher)... Idk why, but it's strange...

IL2Cpp Mode Is Not Crashed Unity3D!!!

@issuimo
Copy link
Owner

issuimo commented Jan 2, 2024

auto CoreModule = UnityResolve::Get("UnityEngine.CoreModule.dll");
auto camerafunction = CoreModule->Get("Camera", "UnityEngine");
float fov = camerafunction->GetValue<float>(camerafunction, "fieldOfView");

Modified code is as follows

auto CoreModule = UnityResolve::Get("UnityEngine.CoreModule.dll");
auto camerafunction = CoreModule->Get("Camera", "UnityEngine");
auto instance = UnityResolve::UnityType::Camera::GetMain();
float fov = camerafunction->GetValue<float>(instance, "fieldOfView");

@RiritoNinigaya
Copy link
Contributor Author

ok, thanks

@RiritoNinigaya
Copy link
Contributor Author

auto CoreModule = UnityResolve::Get("UnityEngine.CoreModule.dll");
auto camerafunction = CoreModule->Get("Camera", "UnityEngine");
float fov = camerafunction->GetValue<float>(camerafunction, "fieldOfView");

It is Not Crashing... Init Function is Calling Crash on Unity3D....

@RiritoNinigaya
Copy link
Contributor Author

ZZBEyd7XKI

Maybe it's Windows 10 Bug...

@issuimo
Copy link
Owner

issuimo commented Jan 2, 2024

It's not a Windows bug. Currently, we are fixing the issue. The error originates from the line

if (pField->static_field) pField->vTable = Invoke<void*>("mono_class_vtable", pDomain, pClass);

@RiritoNinigaya
Copy link
Contributor Author

again crash... T_T

@RiritoNinigaya
Copy link
Contributor Author

Exception thrown at 0x00007FF8BAEAC8F3 (mono-2.0-bdwgc.dll) in GeckoGirlProject.exe: 0xC0000005: Access violation reading location 0x0000000000000110.

And I'm Getting This Exception while Getting Camera Function...

@issuimo
Copy link
Owner

issuimo commented Mar 4, 2024

Exception thrown at 0x00007FF8BAEAC8F3 (mono-2.0-bdwgc.dll) in GeckoGirlProject.exe: 0xC0000005: Access violation reading location 0x0000000000000110.

And I'm Getting This Exception while Getting Camera Function...

Could you please provide the code?

@issuimo
Copy link
Owner

issuimo commented Mar 4, 2024

Exception thrown at 0x00007FF8BAEAC8F3 (mono-2.0-bdwgc.dll) in GeckoGirlProject.exe: 0xC0000005: Access violation reading location 0x0000000000000110.

我在获得相机功能时遇到此异常......

Perhaps you can use exception handling to solve it. (SEH)
try {} catch() {}
or
__try {} __except (EXCEPTION_EXECUTE_HANDLER) {}

@RiritoNinigaya
Copy link
Contributor Author

again crash... T_T

Error With New Version:

Exception thrown at 0x00007FFF08F560F5 (mono-2.0-bdwgc.dll) in GeckoGirlProject.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

@RiritoNinigaya
Copy link
Contributor Author

Code while crashing in mono:

if (address_[funcName] != nullptr) return reinterpret_cast<Return(UNITY_CALLING_CONVENTION*)(Args...)>(address_[funcName])(args...)

@RiritoNinigaya
Copy link
Contributor Author

Now i'm getting this error while getting camera function in il2cpp:

Exception thrown at 0x00007FFEEA3C739A (4dd5de18.dll) in Holoearth.exe: 0xC0000005: Access violation reading location 0x0000000000000038.

Code:

auto GetValue(void* obj, const std::string& name) -> RType { return *reinterpret_cast<RType*>(reinterpret_cast<uintptr_t>(obj) + Get<Field>(name)->offset); }

@issuimo
Copy link
Owner

issuimo commented Mar 4, 2024

现在我在 il2cpp 中获取相机功能时收到此错误:

Exception thrown at 0x00007FFEEA3C739A (4dd5de18.dll) in Holoearth.exe: 0xC0000005: Access violation reading location 0x0000000000000038.

法典:

auto GetValue(void* obj, const std::string& name) -> RType { return *reinterpret_cast<RType*>(reinterpret_cast<uintptr_t>(obj) + Get<Field>(name)->offset); }

GetValue is used to retrieve field values, but as far as I know, UnityEngine.Camera does not have any retrievable fields (fields of static properties do not have memory offsets).

@RiritoNinigaya
Copy link
Contributor Author

现在我在 il2cpp 中获取相机功能时收到此错误:

Exception thrown at 0x00007FFEEA3C739A (4dd5de18.dll) in Holoearth.exe: 0xC0000005: Access violation reading location 0x0000000000000038.

法典:

auto GetValue(void* obj, const std::string& name) -> RType { return *reinterpret_cast<RType*>(reinterpret_cast<uintptr_t>(obj) + Get<Field>(name)->offset); }

GetValue is used to retrieve field values, but as far as I know, UnityEngine.Camera does not have any retrievable fields (fields of static properties do not have memory offsets).

just the opposite, you can retrieve not static field value(as public int offset_name), but it will be difficult

@RiritoNinigaya
Copy link
Contributor Author

@issuimo
Copy link
Owner

issuimo commented Mar 4, 2024

Link as Proof of Concept What Camera Fields is retrievable

image
In fact, UnityEngine.Camera only has static fields. The content in the link you provided is the property ( float depth { get; set; } ) in UnityEngine.Camera, not a field in the form of ( float depth; ). Please use a method like float get_depth() to retrieve it.

@RiritoNinigaya
Copy link
Contributor Author

Link as Proof of Concept What Camera Fields is retrievable

image In fact, UnityEngine.Camera only has static fields. The content in the link you provided is the property ( float depth { get; set; } ) in UnityEngine.Camera, not a field in the form of ( float depth; ). Please use a method like float get_depth() to retrieve it.

OMG, I fixed get and set the field of view :D

@issuimo issuimo closed this as completed Mar 4, 2024
@RiritoNinigaya
Copy link
Contributor Author

reopen pls

@RiritoNinigaya
Copy link
Contributor Author

this is not the end yet, the issue with Mono remains to be resolved

@issuimo issuimo reopened this Mar 4, 2024
@issuimo
Copy link
Owner

issuimo commented Mar 4, 2024

Code while crashing in mono:

if (address_[funcName] != nullptr) return reinterpret_cast<Return(UNITY_CALLING_CONVENTION*)(Args...)>(address_[funcName])(args...)

Can you provide some call stack information?

@RiritoNinigaya
Copy link
Contributor Author

Code while crashing in mono:

if (address_[funcName] != nullptr) return reinterpret_cast<Return(UNITY_CALLING_CONVENTION*)(Args...)>(address_[funcName])(args...)

Can you provide some call stack information?

How?!

@RiritoNinigaya
Copy link
Contributor Author

RiritoNinigaya commented Mar 4, 2024

Code while crashing in mono:

if (address_[funcName] != nullptr) return reinterpret_cast<Return(UNITY_CALLING_CONVENTION*)(Args...)>(address_[funcName])(args...)

Can you provide some call stack information?

devenv_k6OT8fORqw

@issuimo
Copy link
Owner

issuimo commented Mar 5, 2024

Cheat Engine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants