• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by ChucklesMcChuckles · May 17, 2019 at 08:08 AM · webglil2cppcompiler error

IL2CPP throws null exception when compiling .dll plugin for WebGL

Currently, the program I'm working on doesn't have issues when compiling for Windows. When I attempt to compile for WebGL, I get the following error.

 stdout:
 IL2CPP error for type 'X4vckRISblwYfhcLu1.yMs8kGHnxK8u8PsnAJ' in assembly 'C:\Users\username\Documents\GitHub\Unity_Projects\ProjectName\Temp\StagingArea\Data\Managed\Core.dll'
 Additional 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 Mono.Cecil.GenericInstanceType..ctor(TypeReference type)
    at Unity.IL2CPP.GenericSharing.GenericSharingAnalysis.GetSharedType(TypeReference type)
    at Unity.IL2CPP.GenericsCollection.GenericContextAwareVisitor.ProcessGenericType(GenericInstanceType type, InflatedCollectionCollector generics, GenericInstanceMethod contextMethod)
    at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.ProcessCustomAttributeTypeReferenceRecursive(TypeReference typeReference)
    at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.ProcessCustomAttributeArgument(CustomAttributeArgument customAttributeArgument)
    at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.ProcessCustomAttributeArgument(CustomAttributeArgument customAttributeArgument)
    at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.Visit(CustomAttributeArgument customAttributeArgument, Context context)
    at Unity.Cecil.Visitor.Visitor.Visit(CustomAttribute customAttribute, Context context)
    at Unity.Cecil.Visitor.Visitor.Visit(FieldDefinition fieldDefinition, Context context)
    at Unity.Cecil.Visitor.Visitor.Visit(TypeDefinition typeDefinition, Context context)
    at Unity.Cecil.Visitor.Visitor.Visit(ModuleDefinition moduleDefinition, Context context)
    at Unity.Cecil.Visitor.Visitor.Visit(AssemblyDefinition assemblyDefinition, Context context)
    --- 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)
    at Unity.IL2CPP.GenericsCollection.GenericsCollector.CollectPerAssembly(AssemblyDefinition assembly)
    at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
    at Unity.IL2CPP.GenericsCollection.GenericsCollector.MergeCollections(IEnumerable`1 collections)
    at Unity.IL2CPP.AssemblyConverter.Apply()
    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)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
 stderr:
 
 Unhandled 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 Mono.Cecil.GenericInstanceType..ctor(TypeReference type)
    at Unity.IL2CPP.GenericSharing.GenericSharingAnalysis.GetSharedType(TypeReference type)
    at Unity.IL2CPP.GenericsCollection.GenericContextAwareVisitor.ProcessGenericType(GenericInstanceType type, InflatedCollectionCollector generics, GenericInstanceMethod contextMethod)
    at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.ProcessCustomAttributeTypeReferenceRecursive(TypeReference typeReference)
    at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.ProcessCustomAttributeArgument(CustomAttributeArgument customAttributeArgument)
    at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.ProcessCustomAttributeArgument(CustomAttributeArgument customAttributeArgument)
    at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.Visit(CustomAttributeArgument customAttributeArgument, Context context)
    at Unity.Cecil.Visitor.Visitor.Visit(CustomAttribute customAttribute, Context context)
    at Unity.Cecil.Visitor.Visitor.Visit(FieldDefinition fieldDefinition, Context context)
    at Unity.Cecil.Visitor.Visitor.Visit(TypeDefinition typeDefinition, Context context)
    at Unity.Cecil.Visitor.Visitor.Visit(ModuleDefinition moduleDefinition, Context context)
    at Unity.Cecil.Visitor.Visitor.Visit(AssemblyDefinition assemblyDefinition, Context context)
    --- 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)
    at Unity.IL2CPP.GenericsCollection.GenericsCollector.CollectPerAssembly(AssemblyDefinition assembly)
    at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
    at Unity.IL2CPP.GenericsCollection.GenericsCollector.MergeCollections(IEnumerable`1 collections)
    at Unity.IL2CPP.AssemblyConverter.Apply()
    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)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)

It appears to be caused by IL2CPP attempting to compile the .dll plugin. Why would it cause a null exception when compiling for WebGL but not when compiling for Windows? Has anyone had an issue similar to this?

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JoshPeterson · May 17, 2019 at 12:01 PM 0
Share

This looks like either a bug in IL2CPP, or the Core.dll assembly has some invalid IL code. Can you submit a bug report so that we can investigate more?

avatar image ChucklesMcChuckles JoshPeterson · May 20, 2019 at 04:16 PM 0
Share

Is there a way to manually submit a bug like an email address to send it to? The Unity Bug Reporter keeps ti$$anonymous$$g out, probably due my proxy server.

avatar image JoshPeterson ChucklesMcChuckles · May 20, 2019 at 04:27 PM 0
Share

I don't believe that is possible, sorry. $$anonymous$$aybe try submitting the bug report without a project. You should get an email when the bug report is submitted. Just reply to that email with the project attached, and we will see it.

Show more comments

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

113 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Failed Running UnityLinker.exe 1 Answer

Unity 2017.1.0b7 WebGL Export Crash il2cpp 2 Answers

LLVM compile fails on WebGL: pinpointing the source 1 Answer

Asset Bundle code stripping / link.xml not working 1 Answer

WebGL Build Error: IL2CPP error 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges