Search Issue Tracker

In Progress

Fix In Review for 2021.3.X, 2022.3.X

Fixed in 6000.0.2f1

Votes

0

Found in

2021.3.37f1

2022.3.23f1

2023.2.17f1

6000.0.0b14

7000.0.0a1

Issue ID

UUM-68499

Regression

No

[IL2CPP] Player crashes on il2cpp::vm::Class::GetFieldMarshaledSize when using Marshal.OffsetOf with Generic Struct

--

-

How to reproduce:
1. Open the user-attached project “IL2CPP_Crash”
2. Build And Run the project
3. Observe the crash in the Player

Reproducible with: 2021.3.37f1, 2022.3.23f1, 2023.2.17f1, 6000.0.0b14

Reproducible on: Windows 11 Pro

First few line of Stacktrace:
0x00007FFD44BBB89E (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2022.3.15f1\Editor\Data\il2cpp\libil2cpp\vm\Class.cpp:1793] il2cpp::vm::Class::GetFieldMarshaledSize 0x00007FFD44C187D0 (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2022.3.15f1\Editor\Data\il2cpp\libil2cpp\icalls\mscorlib\System.Runtime.InteropServices\Marshal.cpp:604] il2cpp::icalls::mscorlib::System::Runtime::InteropServices::Marshal::OffsetOf
0x00007FFD44CAF1C2 (GameAssembly) [C:\Projects\IL2CPP_Crash\IL2CPP_Crash\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\Assembly-CSharp.cpp:537] TestScript_Test2_mEF3017DF884CC8C4A91C4C39C2C0DAEA39EC1DCA
0x00007FFD44CAF414 (GameAssembly) [C:\Projects\IL2CPP_Crash\IL2CPP_Crash\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\Assembly-CSharp.cpp:477] TestScript_Update_m2C71EA169AE2E24BFBF2B756FFA6646F13C760FF 0x00007FFD44C1F516 (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2022.3.15f1\Editor\Data\il2cpp\libil2cpp\vm\Runtime.cpp:607] il2cpp::vm::Runtime::InvokeWithThrow

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.