Search Issue Tracker

Won't Fix

Fixed in 6000.1.4f1, 6000.2.0b2, 7000.0.0a27

Votes

2

Found in

6000.1.0b11

6000.2.0a7

7000.0.0a1

Issue ID

UUM-100690

Regression

No

Crash on RuntimeFieldInfo::ResolveType with IL2CPP and returns 0 with Mono when calling GC.GetAllocatedBytesForCurrentThread Method

-

Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scenes/SampleScene.unity” Scene
3. Build and Run

Expected result: The Player does not crash and API returns the allocated amount
Actual result: Player crashes at launch or GC.GetAllocatedBytesForCurrentThread returns 0

Reproducible with: 2022.3.60f1 6000.0.43f1, 6000.1.0b11, 6000.2.0a7

Reproducible on:
Windows Standalone Player IL2CPP (crashes)
Windows Standalone Player Mono (API returns 0)
Play Mode (API returns 0)

Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested

First few lines of Stacktrace:
GameAssembly!il2cpp::icalls::mscorlib::System::Reflection::RuntimeFieldInfo::ResolveType
GameAssembly!RuntimeFieldInfo_ResolveType_mF17FFCD06EDFA7968BB9ED901558058E8B91DD82+0x9
GameAssembly!GcPrinter_Awake_m70B2CC3821E81162A83AD8533DB1C92C0DBD53DF+0x4b
GameAssembly!il2cpp::vm::Runtime::InvokeWithThrow+0x49
GameAssembly!il2cpp::vm::Runtime::Invoke+0x59

  1. Resolution Note:

    The crash has been fixed. Unfortunately, GC.GetAllocatedBytesForCurrentThread is not implemented and we currently do not have any plans for implementation.

Comments (1)

  1. PetrisPeper

    May 16, 2025 18:04

    Will this also be fixed in 6000.0? The issue lists that version as affected but not as in review.

Add comment

Log in to post comment