Search Unity

Cloud build IL2CPP errors

Discussion in 'Unity Build Automation' started by marcV2g, Feb 17, 2016.

  1. marcV2g

    marcV2g

    Joined:
    Jan 11, 2016
    Posts:
    115
    Does anyone have insight on what these errors mean?

    IL2CPP error for method 'System.Void UnityEngine.UI.ObjectPool`1::Release(T)


    [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: An element with the same key already exists in the dictionary.
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    @marcV2g

    Can you provide more details about the error? Which platform are you building? Is there a call stack in addition to the error message? Does this error occur while the project is being built or when the player is running? I think these answers will help us narrow down the cause of the issue. Thanks!
     
  3. marcV2g

    marcV2g

    Joined:
    Jan 11, 2016
    Posts:
    115
    Its a ios build and android builds fine. The build did not complete and the cloud build logs explain little beyond something went wrong with IL2CPP.
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    @marcV2g

    Is this error from a WebGL build? It might be good to try it locally and see is the problem occurs. Maybe there is some issue on the cloud build side then.
     
  5. marcV2g

    marcV2g

    Joined:
    Jan 11, 2016
    Posts:
    115
    I am not sure what you mean, how did WebGL enter this?
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    @marcV2g

    Sorry, that I was my mistake. I thought you said that iOS and Android built fine. I assumed that this must be a WebGL build then. Re-reading your message indicates that this is an iOS build.

    Can you try that build locally?
     
  7. marcV2g

    marcV2g

    Joined:
    Jan 11, 2016
    Posts:
    115
    We tried on a local mac and it did build successfully but crashed at startup, I do not know if the issues are related.

    On cloud build is there any way to get more info on what the build errors mean?
     
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    @marcV2g

    I don't know enough about cloud build to say where additional logs might be. I've pinged our cloud build team though to have a look a this thread.
     
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    @marcV2g

    After talking with our cloud build team, it looks like you can access the full log. I'll send you the link privately.
     
  10. marcV2g

    marcV2g

    Joined:
    Jan 11, 2016
    Posts:
    115
    That was the log I was already using to get the errors I posted but it does not mean anything to me other than IL2CPP had some sort of internal error.
     
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    @marcV2g

    Ok, so there is no other data in the log other than what you posted here? If so, we need to expose something else from cloud build, that information doesn't look like enough. I'll talk to the cloud build team and see what we can do.
     
  12. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    Actually, it may be best to submit a bug report for this. Something looks to be wrong on our side (although I'm not yet sure where). Can you file a bug report for this issue?
     
  13. marcV2g

    marcV2g

    Joined:
    Jan 11, 2016
    Posts:
    115
    Do the cloud build team have the ability to view the logs?

    I am not sure what to file other than IL2CPP and cloud build need to throw exceptions with more useful messages than "key not found" or "il2cpp.exe did not run properly".

    We did eventually get the ios build to work but I have no idea why.
     
  14. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    @marcV2g

    The log should have more information then that. Specifically, there should be a call stack from il2cpp.exe in the log file below the error message you reported.

    In any case though, did this project then build for iOS on cloud build correctly? If so, we may still have a problem, as the behavior should be consistent.
     
  15. marcV2g

    marcV2g

    Joined:
    Jan 11, 2016
    Posts:
    115
    So looking at the stack trace it seems IL2CPP is repeatedly putting nulls into a dictionary. Could you ask the IL2CPP people to take a look at this since I have no repo case to file a useful bug report.


    5377: [Unity] [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: An element with the same key already exists in the dictionary.
    5378: [Unity] at System.Collections.Generic.Dictionary`2[System.String,System.UInt32].Add (System.String key, UInt32 value) [0x00000] in <filename unknown>:0
    5379: [Unity] at Unity.IL2CPP.AttributeCollection.Add (System.String name) [0x00000] in <filename unknown>:0
    5380: [Unity] at Unity.IL2CPP.AttributesSupport.WriteCustomAttributesCacheGeneratorFor (System.String name, ICustomAttributeProvider customAttributeProvider) [0x00000] in <filename unknown>:0
    5381: [Unity] at Unity.IL2CPP.AttributesSupport.WriteCustomAttributesCacheGeneratorFor (Mono.Cecil.FieldDefinition fieldDefinition) [0x00000] in <filename unknown>:0
    5382: [Unity] at Unity.IL2CPP.AttributesSupport.WriteCustomAttributesCacheGenerators (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
    5383: [Unity] at Unity.IL2CPP.AttributesSupport.WriteAttributes (IEnumerable`1 assemblyDefinitions) [0x00000] in <filename unknown>:0
    5384: [Unity] at Unity.IL2CPP.SourceWriter.WriteCollectedMetadata (Unity.IL2CPP.GenericsCollection.InflatedCollectionCollector genericsCollectionCollector, ICollection`1 usedAssemblies, NiceIO.NPath outputDir, IMetadataCollection metadataCollection, Unity.IL2CPP.AttributeCollection attributeCollection, Unity.IL2CPP.Metadata.VTableBuilder vTableBuilder, IMethodCollectorResults methodCollector) [0x00000] in <filename unknown>:0
    5385: [Unity] at Unity.IL2CPP.AssemblyConverter.Apply () [0x00000] in <filename unknown>:0
    5386: [Unity] at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies (System.String[] assemblies, NiceIO.NPath outputDir) [0x00000] in <filename unknown>:0
     
  16. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    @marcV2g

    I do work on IL2CPP, so you're in the right place. :)

    Unfortunately though I can't tell too much about the cause from this call stack alone. If you get back to a point where this happens again, and you do have a way to reproduce it, please ping me, and I'll gladly have a look at the repro project.
     
  17. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    987
    We can't build to IL2CPP, too. Our project is already big with lots of asmdef files. When building, it get's stuck in "Building native..." or something like that. The build already took 2 hours but it's still not done which leaves me no choice but to kill it.

    I can give you read access to our Bitbucket repository so you could try it on your end. Do you have a Bitbucket account?
     
  18. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    Please drop us a bug report, and include instructions on how to access the project. We can get it via BitBucket using a specific account, that should not be a problem.
     
  19. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    987
    Bug report sent!
     
    JoshPeterson likes this.