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)

  1. Resolution Note (fix version 2022.1.12f1):

    Fixed in: 2022.1.12f1

  2. Resolution Note (fix version 2021.3.9f1):

    Fixed in: 2021.3.9f1

Comments (3)

  1. 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

  2. Petr77777

    Sep 05, 2022 05:32

    We also confirm that 2021.3.9f1 doesn't fix the issue. Please fix!

  3. 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

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.