Search Issue Tracker

Fixed

Fixed in 2021.3.16f1, 2022.2.9f1, 2023.1.0b9, 2023.2.0a6

Votes

4

Found in

2021.3.13f1

2023.2.0a1

Issue ID

UUM-18685

Regression

Yes

Build crashes on il2cpp::vm::Class::GetVirtualMethod when Building and Running a project using IL2CPP Scripting Backend

--

-

Reproduction steps:
1. Open the user’s attached project
2. Build And Run

Expected result: The build does not crash
Actual result: The build crashes instantly

Reproducible with: 2021.3.12f1, 2021.3.13f1
Not reproducible with: 2020.3.41f1, 2021.3.11f1, 2022.1.22f1, 2022.2.0b14, 2023.1.0a18

Reproduced on: Windows 10 Pro

Notes:
1. Not reproducible when using Mono Scripting Backend
2. Not reproducible when the “Script Debugging” build setting is toggled off

First few lines of the stack trace:
{{0x00007FFA5171FA34 (GameAssembly) [C:\Program Files\Unity\2021.3.12f1_124a83641d18\Data\il2cpp\libil2cpp\vm\Class.cpp:2242] il2cpp::vm::Class::GetVirtualMethod }}
{{0x00007FFA51691864 (GameAssembly) [C:\Program Files\Unity\2021.3.12f1_124a83641d18\Data\il2cpp\libil2cpp\metadata\GenericMetadata.cpp:289] il2cpp::metadata::GenericMetadata::InflateRGCTXLocked }}
{{0x00007FFA516C4C39 (GameAssembly) [C:\Program Files\Unity\2021.3.12f1_124a83641d18\Data\il2cpp\libil2cpp\metadata\GenericMethod.cpp:322] il2cpp::metadata::GenericMethod::InflateRGCTXLocked }}
{{0x00007FFA516C362B (GameAssembly) [C:\Program Files\Unity\2021.3.12f1_124a83641d18\Data\il2cpp\libil2cpp\metadata\GenericMethod.cpp:251] il2cpp::metadata::GenericMethod::CreateMethodLocked }}
{{0x00007FFA516C481D (GameAssembly) [C:\Program Files\Unity\2021.3.12f1_124a83641d18\Data\il2cpp\libil2cpp\metadata\GenericMethod.cpp:181] il2cpp::metadata::GenericMethod::GetMethod}}

Comments (3)

  1. francismoy

    Mar 14, 2023 11:42

    Sorry, I don't know how to edit/remove the previous comment. The version where it's failing for me is 2021.3.19f1

  2. francismoy

    Mar 14, 2023 11:40

    Should this be corrected in 2019.3.19f1? As I mentioned here: https://forum.unity.com/threads/crashes-when-memory-profiler-capturing.1369818/, I'm unable to capture without the app crashing with this Unity version.

  3. hiddenachievement

    Nov 24, 2022 02:29

    We are also hitting this with 2021.3.14f1. In our debugging of the issue, we found that a build created with BuildOptions.Development will crash instantly with a very similar call stack to the one posted, while a build created without that option but everything else the same will run correctly.

    The call stack in 2021.3.14f1:
    0x00007FFFF4564614 (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\il2cpp\libil2cpp\vm\Class.cpp:2242] il2cpp::vm::Class::GetVirtualMethod
    0x00007FFFF44D4FEB (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\il2cpp\libil2cpp\metadata\GenericMetadata.cpp:289] il2cpp::metadata::GenericMetadata::InflateRGCTXLocked
    0x00007FFFF4565076 (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\il2cpp\libil2cpp\vm\Class.cpp:1576] il2cpp::vm::Class::InitLocked
    0x00007FFFF44D4FD4 (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\il2cpp\libil2cpp\metadata\GenericMetadata.cpp:288] il2cpp::metadata::GenericMetadata::InflateRGCTXLocked
    0x00007FFFF4529659 (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\il2cpp\libil2cpp\metadata\GenericMethod.cpp:254] il2cpp::metadata::GenericMethod::CreateMethodLocked
    0x00007FFFF4531E6F (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\il2cpp\libil2cpp\vm\GlobalMetadata.cpp:367] il2cpp::vm::GlobalMetadata::InitializeAllMethodMetadata
    0x00007FFFF4513412 (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\il2cpp\libil2cpp\vm-utils\Debugger.cpp:239] il2cpp::utils::Debugger::Start
    0x00007FFFF45543BC (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\il2cpp\libil2cpp\vm\Runtime.cpp:385] il2cpp::vm::Runtime::Init
    0x00007FFFF44F08EF (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2021.3.14f1\Editor\Data\il2cpp\libil2cpp\il2cpp-api.cpp:97] il2cpp_init

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.