Search Issue Tracker
Fixed in 2019.1.X
Fixed in 2018.3.X
Votes
0
Found in
2018.3.0b1
Issue ID
1094479
Regression
Yes
Unhandled null reference exception in il2cpp.exe preventing UWP build
When building a specific Unity project for UWP, IL2CPP fails with a Null Reference exception (see below for error details and stacktrace).
I've been using the project regularly for testing/debugging UI/Input, and this issue just recently came up after pulling trunk. So far I've only seen it with this specific Unity project and doesn't seem to occur with others. The Unity project is attached.
Error details:
Failed running C:\Projects\unity\build\WindowsEditor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --map-file-parser="C:\Projects\unity\build\WindowsEditor\Data\Tools\MapFileParser\MapFileParser.exe" --directory="C:\Users\timke\Documents\Unity\UWPInputFieldBugRepro\Temp\StagingArea\Data\Managed" --generatedcppdir="C:\Users\timke\Documents\Unity\UWPInputFieldBugRepro\Temp\StagingArea\Il2CppOutputProject\Source\il2cppOutput"
stdout:
IL2CPP error for type '<PrivateImplementationDetails>/$ArrayType=12' in assembly 'C:\Users\timke\Documents\Unity\UWPInputFieldBugRepro\Temp\StagingArea\Data\Managed\UnityEngine.UI.dll'
Additional information: Build a development build for more information. Exception has been thrown by the target of an invocation.
il2cpp.exe didn't catch exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Unity.IL2CPP.Common.CecilExtensions.IsValueType(TypeReference typeReference) in C:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP.Common\CecilExtensions.cs:line 98
at Unity.IL2CPP.GenericSharing.GenericSharingAnalysis.GetUnderlyingSharedType(TypeReference inflatedType) in C:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\GenericSharing\GenericSharingAnalysis.cs:line 90
at Unity.IL2CPP.GenericSharing.GenericSharingAnalysis.GetSharedType(TypeReference type) in C:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\GenericSharing\GenericSharingAnalysis.cs:line 61
at Unity.IL2CPP.GenericsCollection.GenericContextAwareVisitor.ProcessGenericType(GenericInstanceType type, InflatedCollectionCollector generics, GenericInstanceMethod contextMethod) in C:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\GenericsCollection\GenericContextAwareVisitor.cs:line 233
at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.Visit(GenericInstanceType genericInstanceType, Context context) in C:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\GenericsCollection\GenericContextFreeVisitor.cs:line 219
at Unity.Cecil.Visitor.Visitor.Visit(FieldDefinition fieldDefinition, Context context) in C:\Projects\unity\External\il2cpp\il2cpp\Unity.Cecil.Visitor\Visitor.cs:line 303
at Unity.Cecil.Visitor.Visitor.Visit(TypeDefinition typeDefinition, Context context) in C:\Projects\unity\External\il2cpp\il2cpp\Unity.Cecil.Visitor\Visitor.cs:line 277
at Unity.Cecil.Visitor.Visitor.Visit(ModuleDefinition moduleDefinition, Context context) in C:\Projects\unity\External\il2cpp\il2cpp\Unity.Cecil.Visitor\Visitor.cs:line 256
at Unity.Cecil.Visitor.Visitor.Visit(AssemblyDefinition assemblyDefinition, Context context) in C:\Projects\unity\External\il2cpp\il2cpp\Unity.Cecil.Visitor\Visitor.cs:line 250
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Unity.Cecil.Visitor.Visitor.Visit[T](T node, Context context) in C:\Projects\unity\External\il2cpp\il2cpp\Unity.Cecil.Visitor\Visitor.cs:line 195
at Unity.IL2CPP.GenericsCollection.GenericsCollector.CollectPerAssembly(AssemblyDefinition assembly) in C:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\GenericsCollection\GenericsCollector.cs:line 36
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at Unity.IL2CPP.GenericsCollection.GenericsCollector.MergeCollections(IEnumerable`1 collections) in C:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\GenericsCollection\GenericsCollector.cs:line 42
at Unity.IL2CPP.AssemblyConverter.Apply() in C:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\AssemblyConverter.cs:line 143
at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies(IEnumerable`1 assemblyDirectories, IEnumerable`1 explicitAssemblies, NPath outputDir, NPath dataFolder, NPath symbolsFolder, NPath executableAssembiesFolder, NPath monoLibFolder, NPath monoEtcFolder, NPath[] searchDirectories, String entryAssemblyName, NPath[] extraTypesFiles) in C:\Projects\unity\External\il2cpp\il2cpp\Unity.IL2CPP\AssemblyConverter.cs:line 56
at il2cpp.Program.DoRun(String[] args) in C:\Projects\unity\External\il2cpp\il2cpp\il2cpp\Program.cs:line 193
at il2cpp.Program.Run(String[] args) in C:\Projects\unity\External\il2cpp\il2cpp\il2cpp\Program.cs:line 54
at il2cpp.Program.Main(String[] args) in C:\Projects\unity\External\il2cpp\il2cpp\il2cpp\Program.cs:line 31
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Add comment