Search Issue Tracker

Fixed

Votes

31

Found in

2021.3.8f1

Issue ID

UUM-9632

Regression

No

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)

Comments (8)

  1. Petr77777

    Sep 05, 2022 05:35

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

  2. viktor_l

    Sep 02, 2022 14:56

    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)
    ```

    [1] https://issuetracker.unity3d.com/issues/backport-build-fails-with-il2cpp-error-when-building-in-il2cpp-scripting-backend-1

    [2] https://forum.unity.com/threads/il2cpp-android-build-failing-with-incremental-player-build-failed.1249945/#post-8410668

  3. unity_SRRtRLA1VPhGmw

    Aug 10, 2022 07:30

    Please fix!!

  4. unity_mMVjtuA7Lx8wZQ

    Aug 10, 2022 06:58

    A very important issue with the transition to the new version of Unity. Fix, pls

  5. Nimben

    Aug 09, 2022 08:40

    Fix it please!

  6. Interfeisovich

    Aug 08, 2022 15:42

    –°an not update Unity from version 2018 to version 2021 for Android 13 support. And there is no information on how to solve this problem. Without access to the source code, it is unlikely that I will be able to solve it. So hope only for this ticket.

  7. Petr777

    Aug 08, 2022 14:55

    This problem stop us from updating to 2021.3. Please fix

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.