Search Issue Tracker
Fixed
Fixed in 2021.3.9f1, 2022.1.12f1
Votes
2
Found in
2021.3.7f1
2022.1.1f1
Issue ID
UUM-7772
Regression
No
[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
Note:
-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)
-
panderson9149
May 03, 2023 05:59
I am getting this same error in Unity 2021.3.24f1. Any one figure this one out?
-
f_lag
Nov 03, 2022 00:59
upgraded to 2021.3.11f1 and am getting this error. The full log is:
C:\Program Files\Unity\Hub\Editor\2021.3.11f1\Editor\Data\il2cpp\build\deploy\il2cpp.exe @Library\Bee\artifacts\rsp\18025427417359174229.rsp
Error: 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)
at Unity.IL2CPP.DataModel.BuildLogic.TypeReferenceResolver.ResolveAssemblyTypeReferences(CecilSourcedAssemblyData assembly, ReadOnlyHashSet`1 typeReferences, ReadOnlyHashSet`1 genericInstances)
at Unity.IL2CPP.DataModel.BuildLogic.DataModelBuilder.<>c__DisplayClass15_0.<ResolveReferences>b__0(CecilSourcedAssemblyData data)
at System.Threading.Tasks.Parallel.<>c__DisplayClass33_0`2.<ForEachWorker>b__0(Int32 i)
at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica`1.ExecuteAction(Boolean& yieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica.Execute()
--- End of inner exception stack trace ---
at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction`1 action, ParallelOptions options, Boolean stopOnFirstFailure)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection exceptions, CancellationToken cancelToken, Exception otherException)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IList`1 list, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, Action`1 body)
at Unity.IL2CPP.DataModel.BuildLogic.Utils.ParallelHelpers.ForEach[TSource](IEnumerable`1 source, Action`1 func, Boolean enableSerial)
at Unity.IL2CPP.DataModel.BuildLogic.DataModelBuilder.Build()
at Unity.IL2CPP.Contexts.Components.DataModelComponent.Load(LoadSettings loadSettings, Boolean ownsTypeContext, Boolean ownsBuilder, DataModelBuilder& builder)
at Unity.IL2CPP.AssemblyConversion.Phases.InitializePhase.Run(AssemblyConversionContext context)
at Unity.IL2CPP.AssemblyConversion.Classic.ClassicConverter.Run(AssemblyConversionContext context)
at Unity.IL2CPP.AssemblyConversion.AssemblyConverter.ConvertAssemblies(AssemblyConversionInputData data, AssemblyConversionParameters parameters, AssemblyConversionInputDataForTopLevelAccess dataForTopLevel) -
mbentley3123
Oct 03, 2022 17:19
I was getting this in 2021.3.9f1. Upgraded to 2021.3.11f1, and I still get it.
My message is:
E:\Program Files\Unity\Hub\Editor\2021.3.11f1\Editor\Data\il2cpp\build\deploy\il2cpp.exe @Library\Bee\artifacts\rsp\13264927737741608120.rsp
Error: 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')) (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)
at Unity.IL2CPP.DataModel.BuildLogic.TypeReferenceResolver.ResolveAssemblyTypeReferences(CecilSourcedAssemblyData assembly, ReadOnlyHashSet`1 typeReferences, ReadOnlyHashSet`1 genericInstances)
at Unity.IL2CPP.DataModel.BuildLogic.DataModelBuilder.<>c__DisplayClass15_0.<ResolveReferences>b__0(CecilSourcedAssemblyData data)
at System.Threading.Tasks.Parallel.<>c__DisplayClass33_0`2.<ForEachWorker>b__0(Int32 i)
at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica`1.ExecuteAction(Boolean& yieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica.Execute()
--- End of inner exception stack trace ---
at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction`1 action, ParallelOptions options, Boolean stopOnFirstFailure)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection exceptions, CancellationToken cancelToken, Exception otherException)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IList`1 list, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, Action`1 body)
at Unity.IL2CPP.DataModel.BuildLogic.Utils.ParallelHelpers.ForEach[TSource](IEnumerable`1 source, Action`1 func, Boolean enableSerial)
at Unity.IL2CPP.DataModel.BuildLogic.DataModelBuilder.Build()
at Unity.IL2CPP.Contexts.Components.DataModelComponent.Load(LoadSettings loadSettings, Boolean ownsTypeContext, Boolean ownsBuilder, DataModelBuilder& builder)
at Unity.IL2CPP.AssemblyConversion.Phases.InitializePhase.Run(AssemblyConversionContext context)
at Unity.IL2CPP.AssemblyConversion.Classic.ClassicConverter.Run(AssemblyConversionContext context)
at Unity.IL2CPP.AssemblyConversion.AssemblyConverter.ConvertAssemblies(AssemblyConversionInputData data, AssemblyConversionParameters parameters, AssemblyConversionInputDataForTopLevelAccess dataForTopLevel)
---> (Inner Exception #1) 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)
at Unity.IL2CPP.DataModel.BuildLogic.TypeReferenceResolver.ResolveAssemblyTypeReferences(CecilSourcedAssemblyData assembly, ReadOnlyHashSet`1 typeReferences, ReadOnlyHashSet`1 genericInstances)
at Unity.IL2CPP.DataModel.BuildLogic.DataModelBuilder.<>c__DisplayClass15_0.<ResolveReferences>b__0(CecilSourcedAssemblyData data)
at System.Threading.Tasks.Parallel.<>c__DisplayClass33_0`2.<ForEachWorker>b__0(Int32 i)
at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica`1.ExecuteAction(Boolean& yieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica.Execute()<--- -
PixitSoftware
Sep 06, 2022 11:03
Yes 2021.3.9f1 doesn't fix the issue;
System.AggregateException: One or more errors occurred. (Found a method reference we cannot resolve to a method definition: UnityEngine.Touch[] UnityEngine.Input::get_touches())
I am getting this error -
Petr77777
Sep 05, 2022 05:32
We also confirm that 2021.3.9f1 doesn't fix the issue. Please fix!
-
viktor_l
Sep 02, 2022 14:54
2021.3.9f1 doesn't fix the issue. It still throws an `ArgumentNullException` inside `Unity.IL2CPP.DataModel.dll`.
```
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)
at Unity.IL2CPP.DataModel.BuildLogic.TypeReferenceResolver.ResolveAssemblyTypeReferences(CecilSourcedAssemblyData assembly, ReadOnlyHashSet`1 typeReferences, ReadOnlyHashSet`1 genericInstances)
at Unity.IL2CPP.DataModel.BuildLogic.DataModelBuilder.<>c__DisplayClass15_0.<ResolveReferences>b__0(CecilSourcedAssemblyData data)
at System.Threading.Tasks.Parallel.<>c__DisplayClass33_0`2.<ForEachWorker>b__0(Int32 i)
at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
```
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Select Preset "None" icon changes after switching tabs
- [Android] Crash when using xxHash3 and targeting the ARMv7 Architecture with IL2CPP Scripting Backend
- GameObject reference in a Script Component becomes missing when unpacking a variant of another Prefab variant
- Project Settings vertical separator position is not synchronized with the mouse position when dragging it horizontally
- Crash on PhysicsDebugDraw::SelectFiltering::Update when entering play mode with Physics Debug window docked and unfocused
Resolution Note (fix version 2022.1.12f1):
Fixed in: 2022.1.12f1
Resolution Note (fix version 2021.3.9f1):
Fixed in: 2021.3.9f1