Search Unity

iOS64 project with IL2CPP building failed

Discussion in 'iOS and tvOS' started by suntabu, Mar 10, 2015.

  1. suntabu

    suntabu

    Joined:
    Dec 21, 2013
    Posts:
    36
    Hi!
    As mentioned in subject, We built our game with IL2CPP setting and failed with some errors. Because the error message
    did not provide where the problem produced, I cannot offer you a example project to reproduce the bug.But still need your
    help as We have stuck for a few days.
    Then We use:
    Unity 4.6.3p2
    mac OSX 10.9.5
    Xcode 5.1.1
    The errors:
    1:
    IL2CPP error for type 'System.Comparison`1' in assembly '/Users/inlycat001/Projects/coser/ios/Temp/StagingArea/Data/Managed/mscorlib.dll'
    Additional information: Build a development build for more information. Exception has been thrown by the target of an invocation.


    2.
    Failed running /Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/il2cpp.exe --copy-level=None --enable-generic-sharing --enable-unity-event-support --emit-null-checks --enable-array-bounds-check "/Users/inlycat001/Projects/coser/ios/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" "/Users/inlycat001/Projects/coser/ios/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" "/Users/inlycat001/Projects/coser/ios/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" "/Users/inlycat001/Projects/coser/ios/Temp/StagingArea/Data/Managed/ICSharpCode.SharpZipLib.dll" "/Users/inlycat001/Projects/coser/ios/Temp/StagingArea/Data/Managed/Ionic.Zlib.dll" "/Users/inlycat001/Projects/coser/ios/Temp/StagingArea/Data/Managed/TcpClientImplementation.dll" "/Users/inlycat001/Projects/coser/ios/Temp/il2cppOutput/il2cppOutput"


    stdout;
    IL2CPP error for type 'System.Comparison`1' in assembly '/Users/inlycat001/Projects/coser/ios/Temp/StagingArea/Data/Managed/mscorlib.dll'
    Additional information: Build a development build for more information. Exception has been thrown by the target of an invocation.
    stderr:


    Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NotSupportedException: Operation is not supported.
    at Unity.IL2CPP.ILPreProcessor.TypeResolver.ResolveGenericParameter (Mono.Cecil.GenericParameter genericParameter) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.ILPreProcessor.TypeResolver.Resolve (Mono.Cecil.TypeReference typeReference, Boolean includeTypeDefinitions) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.ILPreProcessor.TypeResolver.Resolve (Mono.Cecil.TypeReference typeReference) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.ILPreProcessor.TypeResolver.Resolve (Mono.Cecil.TypeReference typeReference, Boolean includeTypeDefinitions) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.ILPreProcessor.TypeResolver.Resolve (Mono.Cecil.TypeReference typeReference) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.IncludeCollection.NonTemplated.MethodDefinitionVisitor.Visit (Mono.Cecil.MethodDefinition methodDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.TypeDefinition typeDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.IncludeCollection.NonTemplated.MethodDefinitionVisitor.Visit (Mono.Cecil.TypeDefinition typeDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    --- End of inner exception stack trace ---
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit[TypeDefinition] (Mono.Cecil.TypeDefinition node, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Extensions.DoAccept[TypeDefinition] (Mono.Cecil.TypeDefinition definition, Unity.Cecil.Visitor.Visitor visitor) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Extensions.Accept (Mono.Cecil.TypeDefinition typeDefinition, Unity.Cecil.Visitor.Visitor visitor) [0x00000] in <filename unknown>:0


    Thanks you!
     
  2. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    I am dealing with the same compile error. one thing we both have in common is the use of Ionic.zlib , TcpClientImplementation and SharpZipLib.

    here is my error code if someone can decipher it.

    Failed running /Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/il2cpp.exe --copy-level=None --enable-generic-sharing --enable-unity-event-support --emit-null-checks --enable-array-bounds-check "/Users/test/Documents/Unity/Torque Burnout/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" "/Users/test/Documents/Unity/Torque Burnout/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" "/Users/test/Documents/Unity/Torque Burnout/Temp/StagingArea/Data/Managed/Assembly-UnityScript-firstpass.dll" "/Users/test/Documents/Unity/Torque Burnout/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" "/Users/test/Documents/Unity/Torque Burnout/Temp/StagingArea/Data/Managed/Ionic.Zlib.dll" "/Users/test/Documents/Unity/Torque Burnout/Temp/StagingArea/Data/Managed/ICSharpCode.SharpZipLib.dll" "/Users/test/Documents/Unity/Torque Burnout/Temp/StagingArea/Data/Managed/IFacebook.dll" "/Users/test/Documents/Unity/Torque Burnout/Temp/StagingArea/Data/Managed/OpenIAB_W8Plugin.dll" "/Users/test/Documents/Unity/Torque Burnout/Temp/StagingArea/Data/Managed/TcpClientImplementation.dll" "/Users/test/Documents/Unity/Torque Burnout/Temp/StagingArea/Data/Managed/CarX.dll" "/Users/test/Documents/Unity/Torque Burnout/Temp/il2cppOutput/il2cppOutput"

    stdout;
    IL2CPP error for type 'System.Action`1' in assembly '/Users/test/Documents/Unity/Torque Burnout/Temp/StagingArea/Data/Managed/mscorlib.dll'
    Additional information: Build a development build for more information. Exception has been thrown by the target of an invocation.
    stderr:

    Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NotSupportedException: Operation is not supported.
    at Unity.IL2CPP.ILPreProcessor.TypeResolver.ResolveGenericParameter (Mono.Cecil.GenericParameter genericParameter) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.ILPreProcessor.TypeResolver.Resolve (Mono.Cecil.TypeReference typeReference, Boolean includeTypeDefinitions) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.ILPreProcessor.TypeResolver.Resolve (Mono.Cecil.TypeReference typeReference) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.IncludeCollection.NonTemplated.MethodDefinitionVisitor.ProcessInstruction (Mono.Cecil.Cil.Instruction instruction, Mono.Cecil.TypeReference stringType) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.IncludeCollection.NonTemplated.MethodDefinitionVisitor.Visit (Mono.Cecil.MethodDefinition methodDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.TypeDefinition typeDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.IncludeCollection.NonTemplated.MethodDefinitionVisitor.Visit (Mono.Cecil.TypeDefinition typeDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    --- End of inner exception stack trace ---
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit[TypeDefinition] (Mono.Cecil.TypeDefinition node, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Extensions.DoAccept[TypeDefinition] (Mono.Cecil.TypeDefinition definition, Unity.Cecil.Visitor.Visitor visitor) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Extensions.Accept (Mono.Cecil.TypeDefinition typeDefinition, Unity.Cecil.Visitor.Visitor visitor) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.IncludeCollection.NonTemplated.IncludeCollector.ForMethodDefinitions (Mono.Cecil.GenericInstanceType type) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.IncludeCollection.NonTemplated.IncludeCollector.ForMethodDefinitions (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.IncludeWriter.WriteMethodDefinitionIncludes (Mono.Cecil.TypeReference type, Unity.IL2CPP.CppCodeWriter writer, Mono.Cecil.AssemblyDefinition mscorlib) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.SourceWriter.WriteMethodDefinitionsFor (Unity.IL2CPP.CppCodeWriter writer, System.Func`2 filter, Mono.Cecil.TypeReference type, Unity.IL2CPP.Metadata.VTableBuilder vTableBuilder, Mono.Cecil.AssemblyDefinition mscorlib, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.SourceWriter.WriteSource (Unity.IL2CPP.CppCodeWriter writer, Unity.IL2CPP.GenericsCollection.InflatedCollection allGenerics, Mono.Cecil.TypeReference type, System.Collections.Generic.HashSet`1 emptyTypes, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.SourceWriter.WriteSourceFiles (System.String outputDirectory, System.String fileName, Unity.IL2CPP.GenericsCollection.InflatedCollection allGenerics, IEnumerable`1 typeList, System.Collections.Generic.HashSet`1 emptyTypes, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.SourceWriter.WriteGenerics (Unity.IL2CPP.GenericsCollection.InflatedCollection genericsCollection, IEnumerable`1 allTypeDefinitions, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.AssemblyConverter.WriteGenerics (Unity.IL2CPP.GenericsCollection.InflatedCollection allGenerics, Unity.IL2CPP.StringLiterals.StringLiteralCollection stringLiteralCollection, IEnumerable`1 allTypeDefinitions) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.AssemblyConverter.Apply () [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies (System.String[] assemblies, System.String outputDir) [0x00000] in <filename unknown>:0

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase)
    UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection`1, String, String)
    UnityEditorInternal.IL2CPPBuilder:Run()
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry)
    UnityEditor.HostView:OnGUI()
     
  3. Anozireth

    Anozireth

    Joined:
    Feb 7, 2013
    Posts:
    71
    You both have errors that say "Build a development build for more information". Have you tried that? Does it actually give any more information?
     
  4. suntabu

    suntabu

    Joined:
    Dec 21, 2013
    Posts:
    36
    Thanks for replying!
    Yes,I've tried the Development Build and got the same error with no more information.
     
  5. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    Thanks for submitting this bug. We will investigate it.

    On a relate note, the "Build a development build for more information" message is output when we cannot find the .mdb file associated with the assembly (.dll) that IL2CPP is converting. If we can find a .mdb file, we can usually provide source code file and line information about the cause of the problem.

    I'm guessing that the .mdb files from one or more of these external assemblies are not available, hence a development player build does not help too much.
     
  6. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    does anyone have any idea what "Operation is not supported" could mean?
     
  7. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    In this case "Operation is not support" means that the IL2CPP code has thrown a System.NotSupportedException with no arguments. Ideally, we should put a more descriptive message in the exception. However, the problem in this case is an internal one in IL2CPP. That is, I don't think that you can do anything in your code to correct the problem. We simply need to correct the bug in IL2CPP.
     
  8. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    any idea what is triggering this internal error? obviously the il2cpp compiler works fine on simpler projects. would me sending the project to unity help diagnose the problem (i haven't sent a build yet because the project is quite large)
     
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    No, I can't say what would cause this in this case. If you can submit the project with a bug, that would help us diagnose the problem. If the project is too large to submit with the bug reported, please submit a bug without the project, and let us know that it is too large. We have a few other ways we can obtain the project from you if necessary. Thanks!
     
  10. suntabu

    suntabu

    Joined:
    Dec 21, 2013
    Posts:
    36
    I've built this successfully in WIN7 with Unity 4.6.3p2, but still failed on mac os.
    Do you know why?

    Edit:
    both source code are brand new projects downloaded from svn server
     
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    @suntabu

    I am a bit surprised that the platform the editor is running on should matter. In both cases, are you building the iOS player? Can you provide information about the error message you see on OSX? That might help us track down the cause of the problem. Thanks.
     
  12. suntabu

    suntabu

    Joined:
    Dec 21, 2013
    Posts:
    36
    Thanks for your replying~
    Yes, I built both for iOS player(one in OSX, another in windows 7) with Unity4.6.3p2 and the error message I saw on mac was still the same with this thread .

    Then I updated my unity editor to Unity4.6.3p3, both system editor could not build the project successfully as what I post in http://forum.unity3d.com/threads/il...rguments-is-not-the-same.311154/#post-2023699
     
  13. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    @suntabu

    Thanks for clearing that up. I have responded on the other thread as well.
     
  14. suntabu

    suntabu

    Joined:
    Dec 21, 2013
    Posts:
    36
    a simple project to reproduce this error is Here
     
  15. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    @suntabu

    Thanks, we will investigate this bug.
     
  16. suntabu

    suntabu

    Joined:
    Dec 21, 2013
    Posts:
    36
  17. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
  18. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    Latest patch does not seem to fix the problem
     
  19. suntabu

    suntabu

    Joined:
    Dec 21, 2013
    Posts:
    36
  20. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    Thanks, we will continue to investigate this problem.
     
  21. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    still not fixed in patch 5.0.1.p3
     
  22. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    @jack riddell

    Thanks for the update. Based on the bug report, it looks like we made what we thought was a fix, but something else came up, so we are still investigating this one.
     
  23. suntabu

    suntabu

    Joined:
    Dec 21, 2013
    Posts:
    36
    Actually in patch 5.0.1p1 the bug fixed list had contained the bug "681688" (http://fogbugz.unity3d.com/default.asp?681688_6si0skig3madig0e) , but I had tried this patch still failed building il2cpp.
     
  24. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    @suntabu

    Yes, we had a mix-up with the release notes, thinking this bug was corrected when it was not. Thanks for pointing this out. Internally the bug is open again we we are investigating why it was not fixed. Sorry for the confusion.
     
  25. suntabu

    suntabu

    Joined:
    Dec 21, 2013
    Posts:
    36
    Good news, I've received the email from Unity QA team which said that this bug has been fixed in coming patch "4.6.5p2".
     
  26. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    any idea when that will make its way over to unity 5
     
  27. suntabu

    suntabu

    Joined:
    Dec 21, 2013
    Posts:
    36
    Maybe the next Unity5 patch~
     
  28. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    @jack riddell

    This fix is in 5.0.2p1, which should be out any time now.
     
  29. TimLOM

    TimLOM

    Joined:
    May 18, 2015
    Posts:
    9
    @JoshPeterson

    Thanks, I work on the same project as Jack. We have a working build now. When I build, I get a bunch of errors in xcode which I must resolve manually (editing the generated code), but after I fix those it works fine!

    I have 3 issues so far, I am going to create a repo out of one of them but not sure how to repo the other 2.

    1. Some errors in generated code, as above, which I will try and repo
    2. Error in generated code for nunit..! There is a string decoration in one of the files for the copyright - the string contains new lines ("\n") and it seems like when the code is being generated these new lines are literally treated as new lines in the generated code. So the string declaration gets spat out on to multiple lines and breaks everything.
    3. It seems like there is some 'under the hood' caching going on when building a project? I was having an issue with a certain script that we had in our project - it would always throw errors when trying to compile the xcode project. The script was not referenced anywhere and was basically deprecated in our project. So instead of trying to fix it, I just deleted the script from our project, deleted the xcode project folder, and rebuilt in to a folder with the same name as the last project. The new xcode project (built after the file was deleted) threw the same errors, all referencing the file that no longer existed. It had some how generated code for this deleted script? The only way I was able to solve it was to build the project to a folder with a different name, so now I am building to folders with the current date and time appended to the folder name.
     
    Last edited: May 20, 2015
  30. TimLOM

    TimLOM

    Joined:
    May 18, 2015
    Posts:
    9
    The follow script reproduces the error i mentioned in number 1.

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class Test : MonoBehaviour {
    5.  
    6.     void Start()
    7.     {
    8.         DoTheThing<TestObject>(null, OnFinished);
    9.     }
    10.  
    11.     void OnFinished(TestObject test)
    12.     {
    13.         Debug.Log (test.messageBase);
    14.     }
    15.  
    16.     public static void DoTheThing<T>(T tInstance,System.Action<T> callback) where T:TestObjectBase, new ()
    17.     {
    18.  
    19.         System.Action<System.Action<T>> lamba = ( callback1) => {
    20.      
    21.             System.Action<T,System.Action<T>> nested = (tInstance2, callback2) =>
    22.             {
    23.  
    24.                 callback2 (new T { messageBase = "test"});
    25.             };
    26.  
    27.             nested(tInstance, callback1);
    28.         };
    29.  
    30.         lamba (callback);
    31.     }
    32.  
    33. }
    34.  
    35.  
    36. public class TestObjectBase
    37. {
    38.     public string messageBase;
    39. }
    40.  
    41.  
    42. public class TestObject : TestObjectBase
    43. {
    44.     public string message;
    45. }
    46.  
    Breaking around the 'new T' part.
     
  31. TimLOM

    TimLOM

    Joined:
    May 18, 2015
    Posts:
    9
  32. TimLOM

    TimLOM

    Joined:
    May 18, 2015
    Posts:
    9
    As for point number 2, this is the line that is causing the problem ,though I can't seem to repo it:

    Code (CSharp):
    1. {
    2.         AssemblyCopyrightAttribute_t3041 * tmp;
    3.         tmp = (AssemblyCopyrightAttribute_t3041 *)il2cpp_codegen_object_new (AssemblyCopyrightAttribute_t3041_il2cpp_TypeInfo_var);
    4.         AssemblyCopyrightAttribute__ctor_m16579(tmp, il2cpp_codegen_string_new_wrapper("Copyright (C) 2002-2007 Charlie Poole.
    5. \nCopyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
    6. \nCopyright (C) 2000-2002 Philip Craig.
    7. \nAll Rights Reserved."), &AssemblyCopyrightAttribute__ctor_m16579_MethodInfo);
    8.         cache->attributes[0] = (Il2CppObject*)tmp;
    9.     }
    I have to manually go through and remove the (actual) new lines behind the copyright notices
     
  33. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    @TimLOM

    Thanks for the bug report about the first issue. Could you also submit a bug report about the second issue?

    For the third issue, I'm really not sure. The IL2CPP scripting backend itself does not build caching. Something might be happening in the code for the iOS build though. Is this problem reproducible with the proper set of steps? If so, we would like to investigate it as well. Thanks.
     
  34. TimLOM

    TimLOM

    Joined:
    May 18, 2015
    Posts:
    9
    The second issue seems to only happen in our main project, but it is a little too big to submit. I havn't been able to reproduce it.

    As for the third, I'll try and reproduce it and list the steps I took.
     
  35. TimLOM

    TimLOM

    Joined:
    May 18, 2015
    Posts:
    9
    @JoshPeterson

    So, for the third issue.. I have an empty project with nothing but the above test script in it - the one that definitely breaks.

    I build the project. Run XCode. I get one error. Expected.

    I go back to Unity, I remove that script from my project (now I have an entirely empty project), I hit build and (as I just discovered) regardless of where I build, the generated Xcode project produces 12 errors. 5 of those errors are inside of Bulk_ASsembly-CSharp_0.cpp, and they all have to do with this phantom "Test" class - The generated code contains all the methods defined in the Test class (Start, OnFinished, etc). Again, I've removed the Test script from my Unity project at this point. It is still being included in my build some how. And again, testing has shown that the error occurs regardless of the directory I build to. I am going to try restarting Unity and rebuilding to see if that resolves the problem.
     
  36. TimLOM

    TimLOM

    Joined:
    May 18, 2015
    Posts:
    9
    I restarted Unity, deleted the old project, rebuilt, and now the error is gone when building the xcode project. Xcode project folder names are irrelevant.
     
  37. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    @TimLOM

    This is really odd behavior, as IL2CPP should not be saving any cached data or re-using anything on disk between builds. Are you choosing the "Append" or "Replace" option for the iOS build? I would recommend the "Replace" option.
     
  38. TimLOM

    TimLOM

    Joined:
    May 18, 2015
    Posts:
    9
    Neither, I am deleting the xcode project folder :p completely deleted. I will try again to make sure I am not going crazy, will report back when I have, just a bit busy last few days
     
  39. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,381
    >>I am deleting the xcode project folder completely deleted.
    try (in xcode) to "clean". Sometimes xcode actually DO use internally cached results (by itself)
     
  40. j-borden

    j-borden

    Joined:
    Mar 3, 2015
    Posts:
    21
    I'm still getting these types of errors in 5.1. If you need a very large project and fairly complex project to test on, I'm the .NET developer for Couchbase and have been developing a Unity compatible build of our product. You can find the sample project here which has been building fine for Mono 2.x, but fails for IL2CPP. It would be nice to know exactly what is failing here so I can know if there is some way I can sort of coax it to success (like the whole dummy class AOT helper dance that I do with Mono)

    Edit: If you need the source I used for SQLitePCL.Raw, I can provide that as well but it's 95% the same as its Github Repo
     
    Last edited: Jun 10, 2015
  41. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    @j.borden

    It looks like all of of the bugs in this thread have been corrected (but I could be missing something). Unfortunately, the 5.1 release a few weeks behind on IL2CPP changes, due to our release calendar. So I would recommend using 5.1.0p1, which should be out at the end of this week, if you want to use the 5.1 series. Let me know if the problem still happens in that version. Thanks.
     
  42. j-borden

    j-borden

    Joined:
    Mar 3, 2015
    Posts:
    21
    @JoshPeterson Just as an update, I resolved this particular error by removing the class in question since it was only there for Mono AOT help anyway. However, I've run into another error and I've filed issue #705751 about it. It's lasted for three updates now so I hope it gets taken care of soon.
     
  43. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    @j.borden

    Thanks for letting me know. I've pinged our QA team to take another look at this one. It seems that we should be able to reproduce and correct it.
     
  44. SparkolElliot

    SparkolElliot

    Joined:
    Jun 4, 2015
    Posts:
    2
    @JoshPeterson, this issue is meaning that the Unity Couchbase library can't compile for iOS now. This is actually causing our company to re-think our tech choice in terms of Unity now. Is there any ETA on when this issue will be resolved, as @j.borden has said, it's lasted three updates now.
     
  45. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    @SparkolElliot

    I'll try to take a look at this soon to see if we can do anything to correct it or provide a work around. Thanks for your patience.