Search Issue Tracker

By Design

Votes

0

Found in

2021.3.35f1

2022.3.20f1

2023.2.10f1

2023.3.0b7

Issue ID

UUM-63831

Regression

No

Player crash on il2cpp_rgctx_method when iterating over an unsafely casted collection while using IL2CPP Scripting Backend

--

-

Reproduction steps:
1. Open the attached “repro-project“
2. Make sure the Scripting Backend is set to IL2CPP in the Player Project Settings
3. File → Build And Run
4. Observe the Player crash

Reproducible with: 2021.3.35f1, 2022.3.20f1, 2023.2.10f1, 2023.3.0b7

Reproduced on: Windows 10, Windows 11 (by reporter)
Not reproducible on: No other environment tested

Note: Not reproducible with Mono Scripting Backend

First few lines of the stack trace:
0x00007FFBCCC564B4 (GameAssembly) [C:\Program Files\Unity\2021.3.35f1_157b46ce122a_x64\Data\il2cpp\libil2cpp\codegen\il2cpp-codegen-il2cpp.h:707] il2cpp_rgctx_method
0x00007FFBCD22ED1C (GameAssembly) [C:\…\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\Generics__3.cpp:22631] List_1_GetEnumerator_mD8294A7FA2BEB1929487127D476F8EC1CDC23BFC_gshared
0x00007FFBCCC57F6C (GameAssembly) [C:\…\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\GenericMethods__1.cpp:8963] List_1_GetEnumerator_m4AD79AD52587D5F098E3E34E8804224113431D76
0x00007FFBCD13552E (GameAssembly) [C:\…\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\GenericMethods__1.cpp:31616] CrashScript_CrashTest_TisRuntimeObject_m548AC620BB3091041E02CBEA6FE4510546AB9CA6_gshared
0x00007FFBCCD284A8 (GameAssembly) [C:\…\Library\Bee\artifacts\WinPlayerBuildProgram\il2cppOutput\cpp\NewAssembly.cpp:303] CrashScript_CrashTest_TisPlayerSampleHorizontalDivisionEntity_t5442D67C898127C42A005EBDC3510FF1264677FC_m03B0C517D71D4C243B0E17A64523B2026D63FC19

  1. Resolution Note:

    Using Unsafe.As<T>(object) to cast a generic instance into a different generic instance is not supported.

Comments (1)

  1. Ramdom20

    Feb 13, 2024 11:23

    U

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.