Search Issue Tracker
Fixed in 2021.3.9f1, 2022.1.12f1
[Backport] Build fails with IL2CPP error when building in IL2CPP Scripting Backend
How to reproduce:
1. Open project "1422009"
2. Open Edit -> Player Settings -> Player
3. Set Scripting Backend to IL2CPP
4. Open File -> Build Settings
5. Build the project
6. Observe the Console
Expected result: project builds successfully
Actual result: project build failed with the error "IL2CPP error (no further information about what managed code was being converted is available)"
Reproducible with: 2021.3.4f1, 2022.1.3f1, 2022.2.0a12
Not reproducible with: 2022.2.0a13
Could not test with: 2019.4.39f1, 2020.3.35f1 (couldn't clear or fix errors in the console window before build)
Reproducible on: Windows 10 Pro
-There might be other errors than mentioned before but ignore them.
-Issue only appears when building in IL2CPP Scripting Backend
-Error first lines:
IL2CPP error (no further information about what managed code was being converted is available)
System.AggregateException: One or more errors occurred. (Value cannot be null. (Parameter 'definition'))
---> System.ArgumentNullException: Value cannot be null. (Parameter 'definition')
at Unity.IL2CPP.DataModel.TypeContext.GetDef(TypeDefinition definition)
at Unity.IL2CPP.DataModel.BuildLogic.TypeReferenceResolver.ResolveTypeReference(TypeReference typeReference, MappingContext mappingContext, CecilSourcedAssemblyData assembly)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Crash on WriteParticleLineVertex when the "Generate Lighting Data" property is enabled in the Particle System
- UI overlay becomes visible in ray-traced reflections when HDR Color output is enabled
- Crash on EditorOnlyPlayerSettings::GetDefaultTextureCompressionFormat when switching or opening a specific project with Android or IOS Platform
- [Mobile] Player silently crashes on a mobile device when using a lot of "Camera" GameObjects (40 and more) in the Scene
- Scene is modified after exiting Play Mode when Graphics Compositor is enabled in HD RP