Search Issue Tracker

Won't Fix

Votes

3

Found in

2018.4

2019.3

2019.3.9f1

2020.1

2020.2

Issue ID

1236557

Regression

No

[IL2CPP] Crash on il2cpp::icalls::mscorlib::System::RuntimeType::get_DeclaringMethod when calling DriveInfo.GetDrives() in build

IL2CPP

-

How to reproduce:
1. Open attached project "Case_1236557"
2. In the Menu bar select File -> Build And Run

Reproducible with: 2018.4.21f1, 2019.3.10f1, 2020.1.0b6, 2020.2.0a7
Could not test with: 2017.4.39f1 (IL2CPP not available for Standalone)

First lines of the stack trace:
0x5CB0E5E0 (GameAssembly) [D:\Unity\2020.2\2020.2.0a7_cea774d83c47\Editor\Data\il2cpp\libil2cpp\icalls\mscorlib\System.IO\MonoIO.cpp:483] il2cpp::icalls::mscorlib::System::RuntimeType::get_DeclaringMethod
0x5CE6AAC7 (GameAssembly) [D:\LargeDownloads\New Unity Project (12)\Temp\StagingArea\Data\il2cppOutput\Assembly-CSharp.cpp:409] TestGetDrives_Update_m89A744938CBE22556580C0558427D9707F3DD1D2
0x5CB3257F (GameAssembly) [D:\Unity\2020.2\2020.2.0a7_cea774d83c47\Editor\Data\il2cpp\libil2cpp\vm\Runtime.cpp:564] il2cpp::vm::Runtime::Invoke
0x5CB01D16 (GameAssembly) [Da:\Unity\2020.2\2020.2.0a7_cea774d83c47\Editor\Data\il2cpp\libil2cpp\il2cpp-api.cpp:1107] il2cpp_runtime_invoke
0x5D6EBF47 (UnityPlayer) Baselib_Thread_YieldExecution

Note: does not crash with Mono

  1. Resolution Note:

    Unfortunately we do not support the drive info calls on IL2CPP builds. The crash should actually be a not supported managed exception rather than a crash, we will get that cleaned up asap. These calls are only available on desktop platforms and if they are needed for the project, Mono will have to be the selected back-end rather than IL2CPP.

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.