Search Unity

4.6 iOS 64-bit beta

Discussion in 'iOS and tvOS' started by jonas-echterhoff, Jan 12, 2015.

  1. Sebrofjr

    Sebrofjr

    Joined:
    Oct 1, 2014
    Posts:
    24

    Hi Josh, has there been any progress on this issue with generated xcode project from last week? Bug # # 688073 On a positive note, our other app that we have in development on 4.6.x was able to build to il2cpp without issue and is running well, just need to get this one rolling.

    Thanks,
    RJ
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @Lambda Knight

    Thanks for the information. I guess this is possible, but the Release mode is the setting in Xcode, so maybe this is a C++ compiler bug? We've not seen anything like that yet. With IL2CPP we generate the same C++ code whether the Xcode build is release or debug. We will need to investigate this more.
     
  3. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @dchau_hh

    Thanks for pointing this out. Please let me know if you can upload the project, as we like to have as many data points for bugs like this as we can. Since they are often intermittent, reproducing them can be difficult.
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @big_march

    Thanks for submitting this bug and for the detailed explanation, we will investigate it.
     
  5. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @AlkisFortuneFish

    This is an ugly one from our side, oops! Thanks for submitting it, we should be able to easily fix it.
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @Rbhaniwal

    I doubt that this specific warning is the cause of the problem, since the positions of the player are floating point values (NaN), and the warning is about a possible integer precision. Also, I believe that .NET restricts arrays to have a length that can be represented as a 32-bit integer, so we may need to change the code in il2cpp_codegen_marshal_allocate_array to accept an int instead of a size_t to be more correct. But at runtime I don't think that the value in length will ever be larger than 32 bits.

    We'll need to investigate the bug then. Thanks for submitting it.
     
  7. Dunmord

    Dunmord

    Joined:
    Aug 15, 2013
    Posts:
    40
    We are using Unity 5.0.1.
    When we compile for il2cpp we get "semantic issue" errors. This semantic issues come from the photon plugin, but it didn't happen before. Is there something we need to do so there are no semantic issues when unity makes the build?
     
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @Dunmord

    A semantic issue error in Xcode is usually a C++ compiler error, which indicates that il2cpp.exe has generated bad C++ code. It is often difficult to track down which part of the managed code triggers an error like this. So my best advice is to try the latest Unity version, 5.0.1p1, and see if the error still occurs.

    If is does, then it is a bug in IL2CPP that we need to fix. Could you then submit a debug report? Thanks.
     
  9. Dunmord

    Dunmord

    Joined:
    Aug 15, 2013
    Posts:
    40
    Thank you for such a quick response @JoshPeterson. I tried the latest patch and the semantic issue problem is gone. Seems like it was only ocurring in 5.0.1. We'll run more tests to triple check.
     
  10. dchau_hh

    dchau_hh

    Joined:
    Jan 22, 2014
    Posts:
    24
    @JoshPeterson

    The bug report just finished uploading. It's Case 689976, let me know if you have any issues reproducing it. Thanks!
     
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @Sebrofjr

    We have no progress yet on this one, sorry. I've pinged our iOS team again about it, and they will investigate.
     
  12. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @dchau_hh

    Excellent, thanks for submitting this bug report. We will investigate it.
     
  13. JimmyLaw

    JimmyLaw

    Joined:
    Mar 16, 2015
    Posts:
    4
    @JoshPeterson

    Last month, we reported a bug (case 682047), and also we received a email from your QA Team.
    But till now, we dont know any progress of this bug,Would you please give me any way to follow this bug? Or Is there any update about this bug.

    ps:
    this bug is about a sqlite problem in the IL2CPP under unity4.6.x. we report this bug use 4.6.3f1 ,and we tested under 4.6.4f1,the bug still not fixed!
     
  14. Rbhaniwal

    Rbhaniwal

    Joined:
    Jan 23, 2015
    Posts:
    33
    @JoshPeterson
    Good morning ,

    right now i am using Unity 4.6.3.p3

    Unity 4.6.4 may fix this problem --> iOS/IL2CPP: Corrected the C++ compiler error in generated code: "error: cast from pointer to smaller type 'il2cpp_array_size_t' (aka 'int') loses information" .

    i think my problem is solved by unity 4.6.4 already.
    thnakx a lot Mr. Peterson..u helped me very much.. if my problem comes again i will disturb u again.
     

    Attached Files:

  15. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    There have been major changes and fixes in IL2CPP in the 4.6.4 patch releases, I would try with the latest patch release, just in case your bug is already fixed.
     
  16. cwaspfst

    cwaspfst

    Joined:
    Feb 5, 2014
    Posts:
    11
    @JoshPeterson
    After updating to version 5.0.1.p1, I got a lot of errors, such as:
    Classes/Native/Il2CppMethodTable.cpp:7:17: Conflicting types for 'List_1__ctor_m10644_gshared'
    Classes/Native/Il2CppMethodTable.cpp:13:17: Functions that differ only in their return type cannot be overloaded

    I tried to compile empty clear project, but got the same errors.

    Folder Classes/Native in version 5.0.1.p1 takes ~ 60 mb, but in version 5.0.1.f1 ~ 120 mb, apparently it affects the result.

    Now every new update it as an entirely new system, do not know what new bugs appear.
     

    Attached Files:

  17. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @JimmyLaw

    It looks like this bug was corrected in version 4.6.4p2, but we did not notify you via email about that, sorry. I've sent an email to the submitter of the bug now with this information as well. Thanks.
     
  18. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @cwaspfst

    Do you happen to have the option to use pre-compiled headers enabled in the player settings? We have had some reports of that causing this error in version 5.0.1p1. If so, please disable it and attempt to build again. We're looking into fixing or removing that option, as it is not always beneficial for C++ compile times.
     
  19. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @Rbhaniwal

    I'm glad to hear that things are working well. Please let us know if you run into any other issues.
     
  20. eezSZI

    eezSZI

    Joined:
    Nov 16, 2012
    Posts:
    121
    Can we expect a 4.6 patch release today?
     
  21. mhalttu

    mhalttu

    Joined:
    Mar 13, 2013
    Posts:
    30
    We are using Crashlytics for crash reporting. In the past we've gotten a nice stacktrace about crashes. When I updated to Unity 4.6.4 and enabled IL2CPP and the Universal 64-bit mode, the stack traces are as follows:

    Code (csharp):
    1. 0 IL2CPP  il2cpp::vm::Runtime::GetVirtualInvokeData(MethodInfo*, void*)
    2. 1 IL2CPP GeneratedVirtualInvokers.h line 8 ActionExtension_SafeInvoke_m8383(Object_t*, Action_t120*, MethodInfo*)
    3. 2 IL2CPP  GeneratedVirtualInvokers.h line 8 ActionExtension_SafeInvoke_m8383(Object_t*, Action_t120*, MethodInfo*)
    4. 3 IL2CPP  GeneratedVirtualInvokers.h line 9 EventDelegate_Execute_m3911(EventDelegate_t849*, MethodInfo*)
    5. 4 IL2CPP  GeneratedVirtualInvokers.h line 19 EventDelegate_Execute_m3914(Object_t*, List_1_t765*, MethodInfo*)
    6.  
    @JoshPeterson Any ideas what we are missing? How can we get the proper class and method names back to the crash reports?

    Edit: Added code formatting.
     
    Last edited: Apr 17, 2015
  22. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    It's out! :)
     
    eezSZI likes this.
  23. jerome-lacoste

    jerome-lacoste

    Joined:
    Jan 7, 2012
    Posts:
    206
    Hello,

    I tried upgrading our tool stack from

    Unity 4.6.3f1 / Xcode 6.0.1
    Unity 4.6.4f1 / XCode 6.2

    (IL2CPP)

    And I am seeing this crash. I ALSO tried 4.6.4p2.

    Known issue ? If not I'll report it.

    I'll now try p3 and different combinations of Unity3d / Xcode.
     
  24. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    eezSZI likes this.
  25. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @jerome.lacoste

    Initially, I doubt that this is an issue related to the Xcode version. More likely, it might be a bug in the stripping code used for the IL2CPP scripting backend. First, can you confirm that this problem does not happen with the Mono scripting backend? Second, what Stripping Level setting are you using? If it is not "Disabled", please try that setting, as it might work around this problem. Thanks.
     
  26. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @mhalttu

    I'm not sure that I understand the question completely, sorry. Do you expect to get a managed stack trace, but you get this native stack trace instead? Could you send an example of the stack trace you expect in this case? That might help me understand the problem. Thanks.
     
  27. mhalttu

    mhalttu

    Joined:
    Mar 13, 2013
    Posts:
    30
    @JoshPeterson I'm expecting a stack trace that contains the name of the class and the method where the error occurred. However, since I posted the message I've started to suspect that this could be an IL2CPP bug instead?

    Here's how another crash looks like. In this case, I'm triggering the crash myself from a debug panel.

    Code (csharp):
    1. 0  IL2CPP                         0x0000000101840c70 -[Crashlytics crash] + 12
    2. 1  IL2CPP                         0x0000000101840c70 -[Crashlytics crash] + 12
    3. 2  IL2CPP                         0x00000001002860d4 DebugManager_OnGUI_m5431(DebugManager_t1102*, MethodInfo*) (Bulk_Assembly-CSharp_6.cpp:12244)
    4. 3  IL2CPP                         0x0000000100c02584 RuntimeInvoker_Void_t22(MethodInfo*, void*, void**) (GeneratedInvokers.cpp:12)
    The key here is that I can see "DebugManager_OnGUI" which tells me where the problem occurred!

    Just look at the stack trace I pasted in my previous comment. There is absolutely no hint as to what is wrong - none of the lines contain any references to our classes or methods. How am I supposed to fix such a crash?
     
  28. mhalttu

    mhalttu

    Joined:
    Mar 13, 2013
    Posts:
    30
    Actually, it seems that the "ActionExtension_SafeInvoke" and "EventDelegate_Execute" are in fact real methods in our (3rd party) code. Apologies. They sounded so generic that I thought they were related to IL2CPP.

    However, the original issue remains:
    1) I don't see this crash in the editor (as a warning nor error)
    2) This crash does not occur when compiling with Mono

    How do I go about fixing this crash?

    Also the stack trace still looks very weird to me. EventDelegate.Execute() does exist but the code doesn't know anything about ActionExtension.SafeInvoke(). How can it be calling it? Are the IL2CPP stack traces possibly missing calls to anonymous methods? Are the method contents possible inlined somehow? How can I know what is the actual class and method where this error occurs?
     
  29. mastermachines1

    mastermachines1

    Joined:
    Jan 23, 2015
    Posts:
    19
    After downloading and installing 4.6.4p3 OSX and Unity say the version number is 4.6.4p2. I also tried uninstalling Unity beforehand. Anyone else experiencing this?
     
  30. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @mhalttu

    Thanks for investigating this more. I'm not sure about the cause of the crash from this stack trace alone, unfortunately. It does seem likely that you are experiencing a bug in the IL2CPP scripting backend though.

    The stack trace here is created in Xcode based on the C++ code that IL2CPP generated, so it is possible that clang is missing calls or inlining functions, just as it would with any other C++ code. I don't think that IL2CPP is doing anything specific to make the native call stack here any better or worse.

    If possible, can you submit a bug report with a project that causes this problem? That will give us the best chance to track down the cause and possibly find a work around. Thanks.
     
  31. jerome-lacoste

    jerome-lacoste

    Joined:
    Jan 7, 2012
    Posts:
    206
    @JoshPeterson

    The original stripping level was micro mscorlib.

    • Disabling stripping on IL2CPP fixes it
    • Switching to Mono backend with the original stripping level fixes it
    • Reverting to 4.6.3f1 with IL2CPP and original stripping level fixes it

    Note: the issue is on a scene that uses the camera. There have been Camera related changes in 4.6.4p1 (and maybe in 4.6.4 as the p1 was supposedly a fix for a regression).

    Update:
    • 4.6.4p3 also affected
    • sending issue right now
     
    Last edited: Apr 17, 2015
  32. Lambda Knight

    Lambda Knight

    Joined:
    Mar 8, 2011
    Posts:
    23
    Is there something akin to the il2cpp_extra_types.txt file for methods? I'm currently getting the following error in my IL2CPP project:
    System.NotSupportedException: Failed to construct generic method 'System.Reflection.MonoProperty::GetterAdapterFrame' with generic arguments [Mono.Security.Protocol.Tls.HttpsClientStream, System.Boolean] at runtime.

    Previously, I had:
    System.NotSupportedException: Failed to construct generic type 'System.Reflection.MonoProperty+Getter`2' with generic arguments [Mono.Security.Protocol.Tls.HttpsClientStream, System.Boolean] at runtime.

    I found a post that pointed me to the il2cpp_extra_types.txt file to force IL2CPP to force compile the Getter class. After I did that, that error disappeared and I got the other one. Is there something I can do to force compile that generic method? Thanks
     
  33. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    @jerome.lacoste

    This sounds very much like another manifestation of 684129.

    The workaround of disabling stripping doesn't have a huge impact on size, as IL2CPP always strips anyway. Alternately, you can find out what class it is trying to awaken and add initialisation for it in UnityClassRegistration.cpp.
     
  34. ZILLA

    ZILLA

    Joined:
    Dec 31, 2012
    Posts:
    1

    Any new updates on getting GetManifestResourceInfoInternal implemented?
     
  35. martinschaef

    martinschaef

    Joined:
    Nov 22, 2013
    Posts:
    1
    In 4.6.4p2 and p3, I have some problems with Dictionaries. I have something like:
    private Dictionary<int, Touch> touchPoints = new Dictionary<int, Touch>();
    voidUpdate () {
    if (touchPoints.ContainsKey(...)
    and get a bad access exception in:
    il2cpp::icalls::mscorlib::Mono::Runtime::mono_runtime_install_handlers:
    The same method uses another dictionary from int to bool which works just fine.

    Any thoughts? Any place where I can report this?
     
  36. big_march

    big_march

    Joined:
    Mar 2, 2015
    Posts:
    38
    @JoshPeterson
    Could you please check this log? it's a crash of dynamic batch.
    I just get this log from QA, not located where it happen yet.
    Do you know this issue?
    (Unity 4.6.4p2, IL2CPP)
     

    Attached Files:

  37. Rbhaniwal

    Rbhaniwal

    Joined:
    Jan 23, 2015
    Posts:
    33
    @JoshPeterson

    :( m very disappointed 4.6.4 resolve the problem of il2cpp_codegen_marshal_allocate_array .
    but my problem is still there.

    I add a log on player position .. Xcode prints my player position is a NaN number on device but the position is correct on unity editor.. m very confused how the things are going on..i have no idea.
     

    Attached Files:

  38. Tyhja

    Tyhja

    Joined:
    Jun 21, 2013
    Posts:
    19
    Hi Josh,

    Just an update, p3. Still doesn't resolve my issue 689022. This is just a confirmation. That is all. Thanks.
     
  39. Rbhaniwal

    Rbhaniwal

    Joined:
    Jan 23, 2015
    Posts:
    33
    @JoshPeterson

    aftercare research i found that 4.6.4 resolve the errors of il2cpp_codegen_marshal_allocate_array.

    but there are still 370+ warning related to value conversion issue.
    I think the IL2CPP built lib (Bulk ICSharpCode.sharpZipLib_0.cpp or other) does not full fill the requirement of app store . According to App store 64 bit requirement

    int *pointer = some value;

    int *next_pointer = (int *)((int) pointer + 1); // Incorrect

    int *next_ pointer = pointer + 1; // Correct

    or many more other rules.
    plz visit the page
    http://www.chupamobile.com/blog/2015/01/19/convert-app-64-bit-requirement/


    In BulkIcSharpCode.sharpZipLib_0

    return (((int32_t)(*(uint32_t*)(uint32_t*)SZArrayLdElema((((Crc32_t943_StaticFields*)InitializedTypeInfo(&Crc32_t943_il2cpp_TypeInfo)->static_fields)->___CrcTable_1), L_0))^(int32_t)((int32_t)((uint32_t)___oldCrc>>8))));

    i think which is not fulfill the requirement of App store 64 bit requirements. so, may be this cause the warnings.

    hereby i attach a snapshot of all the classes which have warnings.
     

    Attached Files:

  40. KEVINWEN

    KEVINWEN

    Joined:
    Apr 20, 2015
    Posts:
    2
    i'm new here, and i just find many problems when building the standard example of unity 5.0.1 to xcode project. build for the simulator and got many warnings,just see nothing at the ipad simulator.does anybody know how to put the example run on ios.
     
  41. Rbhaniwal

    Rbhaniwal

    Joined:
    Jan 23, 2015
    Posts:
    33
    @KEVINWEN
    i think 5.0.1 does not work on simulators (not sure about it) try it on device
     
  42. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    First post of this thread:

     
  43. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @jerome.lacoste

    Thanks for trying this and submitting the bug. We will correct the issue and fix it so that you can use a Stripping Level setting with the IL2CPP scripting backend.
     
  44. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @Lambda Knight

    We don't current have anything like il2cpp_extra_types.txt for methods. I think that it would be possible for us to implement something like this. I don't know what the priority is though, as this would likely be a nice improvement over the Mono scripting backend, but we are currently focusing on parity with the Mono scripting backend.

    With that in mind, I suspect you are seeing a problem which will also occur with the Mono scripting backend. The issue here is that the code patch for mscorlib is trying to construct a generic method method using a value type (System.Boolean) as a generic parameter, which neither Mono-AOT nor IL2CPP can handle. If you try this with the Mono scripting backend, do you see a similar error?

    Usually this error occurs when the code is using HTTPS and it is built with the .NET 2.0 profile. If possible, please trying using the .NET 2.0 Subset profile. This latter profile takes a different code path through mscorlib which is AOT-friendly, and avoids the code causing problems here altogether.
     
  45. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @ZILLA

    Sorry, nothing to report yet. We're hoping to get this done soon, but it is not ready yet.
     
  46. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @martinschaef

    If possible, please report a bug via the Editor, and include the project with the bug report. I don't believe that mono_runtime_install_handlers should ever be called from mscorlib while running the IL2CPP scripting backend.

    Is there some code in the project which calls into Mono.Runtime via reflection? That code would not be compatible with IL2CPP, and could be safely removed.
     
  47. mobiledev2

    mobiledev2

    Joined:
    Mar 4, 2015
    Posts:
    1
    Im seeing the same issue here too. Im still running into the same issues as p2 so i cant confirm if its actually just a install label bug.
     
  48. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @big_march

    I'm not familiar with this issue. Looking at the call stack, I would be surprised if it is related to IL2CPP. I don't see any interaction with the scripting backend there, so this might not be the best forum for this issue.
     
  49. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @Rbhaniwal

    Are you experiencing a specific problem with the code where this Xcode warning occurs? I believe that it should be fine, since although the C++ code generated is converting from uintptr_t (64 bits) to int32_t (32 bits), the value is an array element index, which will never use more than 32 bits in IL.

    We have not yet seen a case where this is actually a problem.
     
  50. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
    @KEVINWEN

    As others have mentioned, IL2CPP does not work with the simulators in Xcode, so please try a real device. We do want to make the simulators work, but as it has been months since we said that, and it is still not working, you can guess the priority for this is pretty low.

    We will get it done eventually, but we are focusing on device bugs now.