Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

4.6 iOS 64-bit beta

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

  1. big_march

    big_march

    Joined:
    Mar 2, 2015
    Posts:
    38
    Sorry, the attach project, I mean the dropbox url I replied to the notification email of 686530
     
  2. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    959
    Just tried patch 2 and IL2CPP doesn't bomb out, which is great news! However, this has pointed out an issue with the whole patch release concept, when it comes to a major system like IL2CPP being batched together with untested fixes to random components: This patch, or possibly patch 1, has broken UI behaviour. Canvases on inactive objects are blocking ray casts. I have grafted the UI system from 4.6.4f1 into 4.6.4p2 to sort it out, but still.

    The code space saving so far are quite significant. I'm not quite sure yet whether they are enough for the game to hit the 100MB limit. The fat executable is still 72MB, vs 24MB with Mono. It depends on how well it will compress after Apple's encryption, which is a bit of a gamble, unfortunately.

    Can anyone think of any took to give a quick-ish visualisation of code space distribution in a project? I am wondering whether I could figure out where enough of that code is coming from and see whether I can do anything on our side to reduce size.
     
    Last edited: Apr 10, 2015
    wufire and MrEsquire like this.
  3. oddurmagg

    oddurmagg

    Joined:
    Mar 20, 2013
    Posts:
    19
    Project does not even build under il2cpp 4.6.4p2

    I have stripping disabled and and api compatibility level .net 2.0

    The errors I get in the console are:

    IL2CPP error (no further information about what managed code was being converted is available)
    Additional information: Build a development build for more information. An exception was thrown by the type initializer for Unity.IL2CPP.Common.MonoInstall
    -------------------------------------
    Failed running /Applications/Unity 4.6.4p2/Unity.app/Contents/Frameworks/il2cpp/build/il2cpp.exe --copy-level=None --enable-unity-event-support --emit-null-checks --enable-array-bounds-check --extra-types.file="/Applications/Unity 4.6.4p2/Unity.app/Contents/Frameworks/il2cpp/il2cpp_default_extra_types.txt" --assembly="/Users/oddur/perforce/projects/twodee/trunk/twodeeunity/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" --assembly="/Users/oddur/perforce/projects/twodee/trunk/twodeeunity/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" --assembly="/Users/oddur/perforce/projects/twodee/trunk/twodeeunity/Temp/StagingArea/Data/Managed/Assembly-UnityScript.dll" --assembly="/Users/oddur/perforce/projects/twodee/trunk/twodeeunity/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" --assembly="/Users/oddur/perforce/projects/twodee/trunk/twodeeunity/Temp/StagingArea/Data/Managed/IFacebook.dll" --assembly="/Users/oddur/perforce/projects/twodee/trunk/twodeeunity/Temp/StagingArea/Data/Managed/ArabicSupport.dll" --assembly="/Users/oddur/perforce/projects/twodee/trunk/twodeeunity/Temp/StagingArea/Data/Managed/LitJson.dll" --assembly="/Users/oddur/perforce/projects/twodee/trunk/twodeeunity/Temp/StagingArea/Data/Managed/ICSharpCode.SharpZipLib.dll" --assembly="/Users/oddur/perforce/projects/twodee/trunk/twodeeunity/Temp/StagingArea/Data/Managed/TcpClientImplementation.dll" --assembly="/Users/oddur/perforce/projects/twodee/trunk/twodeeunity/Temp/StagingArea/Data/Managed/unibill.dll" --assembly="/Users/oddur/perforce/projects/twodee/trunk/twodeeunity/Temp/StagingArea/Data/Managed/HOTween.dll" --assembly="/Users/oddur/perforce/projects/twodee/trunk/twodeeunity/Temp/StagingArea/Data/Managed/TileSystem.Runtime.dll" --generatedcppdir="/Users/oddur/perforce/projects/twodee/trunk/twodeeunity/Temp/il2cppOutput/il2cppOutput" --builder=none

    stdout;
    IL2CPP error (no further information about what managed code was being converted is available)
    Additional information: Build a development build for more information. An exception was thrown by the type initializer for Unity.IL2CPP.Common.MonoInstall
    stderr:

    Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for Unity.IL2CPP.Common.MonoInstall ---> System.NullReferenceException: Object reference not set to an instance of an object
    at Unity.IL2CPP.Common.MonoInstall.FindInstallRoot (System.String installName) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.Common.MonoInstall..ctor (System.String installName) [0x00000] in <filename unknown>:0
    at Unity.IL2CPP.Common.MonoInstall..cctor () [0x00000] in <filename unknown>:0
    --- End of inner exception stack trace ---
    at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies (System.String[] assemblies, NiceIO.NPath 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()

    -------------------------------------
    Error building Player: Exception: /Applications/Unity 4.6.4p2/Unity.app/Contents/Frameworks/il2cpp/build/il2cpp.exe did not run properly!
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    Thanks, I see the project on that bug. We have not yet investigated it, but we will have a look.
     
  5. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    Unfortunately, this is the best we can do for patch releases now. But this is a problem we are aware of. We're looking at better ways to distribute the IL2CPP fixes, but I wouldn't expect anything in the near future.

    For visualization on OSX, check out Hopper: http://www.hopperapp.com/

    This is a pretty nice tool that we have used in the past to help sort out what parts of the code end up in binary.
     
  6. oddurmagg

    oddurmagg

    Joined:
    Mar 20, 2013
    Posts:
    19
    I have confirmed that our project works fine 4.6.4p1, so p2 is regressing with the error I posted above
     
  7. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @oddurmagg

    Thanks for reporting this. Initially, it looks like some problem with the installation, so I doubt that it is related to a specific project. Can you confirm that by trying to build an empty project? I suspect that the same error will occur.

    To see if the installation on your machine is sane, can you look for the file Contents/Frameworks/il2cpp/il2cpp_root in the Unity.app package? The il2cpp.exe code is using this file to locate its root directory in the installation. The file should be empty, but it should exist. Thanks.
     
  8. DevAdelchi

    DevAdelchi

    Joined:
    Dec 11, 2014
    Posts:
    10
    I'm experiencing the same problem as @oddurmagg , This ddoesn't happen when i downgrade to 4.6.4p1
    I've checked my installation and it is sane.
     
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @InspinationStudio @oddurmagg

    It looks like this happens when you have a space in the installation path somewhere. If you have a directory named "Unity 4.6.4p2" in the path, please try renaming it to "Unity4.6.4p2". We will get this fixed.
     
  10. elajeunesse

    elajeunesse

    Joined:
    Apr 11, 2014
    Posts:
    2
    @josh: any idea how long Unity 4.x will be maintained?? I'm releasing a game this summer for iOS and this information would be really important to know as if I release using Unity 4.x or Unity 5.x.

    Thanks,
    Don T.
     
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @elajeunesse

    I can't say for sure, as the decision is not mine. However, I'm not heard anything yet about ending support for 4.6, so I expect it to continue for some time.
     
    elajeunesse likes this.
  12. DevAdelchi

    DevAdelchi

    Joined:
    Dec 11, 2014
    Posts:
    10
    @JoshPeterson Thanks for replying so fast, and I checked my instalation path but it doesn't have any spaces at all.
    "Unity/Editor/..."

    I've also tried with a blank project and the error still happens.
    I tried uninstalling the whole unity and dowload the patch again, but I still get the error.

    Code (CSharp):
    1. Failed running C:\Program Files (x86)\Unity\Editor\Data\il2cpp/build/il2cpp.exe --copy-level=None --enable-unity-event-support --emit-null-checks --enable-array-bounds-check --extra-types.file="C:\Program Files (x86)\Unity\Editor\Data\il2cpp\il2cpp_default_extra_types.txt" --assembly="C:\Users\Span\Desktop\Prueba\Temp\StagingArea\Data\Managed\UnityEngine.UI.dll" --generatedcppdir="C:\Users\Span\Desktop\Prueba\Temp\il2cppOutput\il2cppOutput" --builder=none
    2.  
    3. stdout;
    4. IL2CPP error (no further information about what managed code was being converted is available)
    5. Additional information: Build a development build for more information. An exception was thrown by the type initializer for Unity.IL2CPP.Common.MonoInstall
    6. stderr:
    7.  
    8. Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for Unity.IL2CPP.Common.MonoInstall ---> System.NullReferenceException: Object reference not set to an instance of an object
    9.  
    10.   at Unity.IL2CPP.Common.MonoInstall.FindInstallRoot (System.String installName) [0x00000] in <filename unknown>:0
    11.  
    12.   at Unity.IL2CPP.Common.MonoInstall..ctor (System.String installName) [0x00000] in <filename unknown>:0
    13.  
    14.   at Unity.IL2CPP.Common.MonoInstall..cctor () [0x00000] in <filename unknown>:0
    15.  
    16.   --- End of inner exception stack trace ---
    17.  
    18.   at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies (System.String[] assemblies, NiceIO.NPath outputDir) [0x00000] in <filename unknown>:0
    19.  
    20. UnityEngine.Debug:LogError(Object)
    21. UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:66)
    22. UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection`1, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:426)
    23. UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:275)
    24. UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    25. UnityEditor.HostView:OnGUI()
     
    Last edited: Apr 10, 2015
  13. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @InspinationStudio

    Actually, I think a space in the path anywhere will cause this problem. It looks like you have a space above the Unity installation path:

    C:\Program Files (x86)\Unity\Editor\Data\il2cpp/build/il2cpp.exe
     
  14. DevAdelchi

    DevAdelchi

    Joined:
    Dec 11, 2014
    Posts:
    10
    Fixed by installing it under the C:\ Path. Thank you Josh
     
  15. oddurmagg

    oddurmagg

    Joined:
    Mar 20, 2013
    Posts:
    19
    Confirmed that removing the space from the installation path fixed it.
     
  16. InsomniakDev

    InsomniakDev

    Joined:
    Jun 23, 2014
    Posts:
    12
    Hello everyone,
    i went from 4.6.3f1 to 4.6.4p2 on my project today (for the webcam issue on iOS mainly and other size optimisation) and i fell on a huge issue :
    since this patch the EventSystem for the canvas is blocking my clicks on elements of the UI which are disabled (only elements disabled before launching the scene),
    meaning if i have a upper layer disabled the click wont go under it to find my button in a under layer which is enabled.

    Please let me know if this has been reported before.
     
  17. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,033
    See few posts above, it's probably the same issue. it's regression since 4.6.4.p1, either use that or try to copy the gui module(don't know where it is located) from p1.
     
    InsomniakDev likes this.
  18. oddurmagg

    oddurmagg

    Joined:
    Mar 20, 2013
    Posts:
    19
    "Invalid Executable Size. The size of your app's executable file 'XXXX.app/XXXXX is 85082112 bytes, which exceeds the maximum allowed size of 80 MB."

    Can we be expecting more executable size improvements in the upcoming patches ? I only need 5 megs ;)
     
  19. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    959
    Make sure you change the version in ivy.xml to the version of Unity you are grafting to not from, as in my experience it does not like loading the "wrong" version.
     
    Last edited: Apr 12, 2015
    InsomniakDev likes this.
  20. InsomniakDev

    InsomniakDev

    Joined:
    Jun 23, 2014
    Posts:
    12
    Alright I tried what you were proposing and unfortunately the problem seems to exist since the 4.6.4p1 version, so replacing the UI extension has no effect, i made sure of that launching my project with Unity 4.6.4p1 and the UI problem is already there.

    Then I tried to use the UI extension from 4.6.3f1 in 4.6.4p2, but no luck there either, the UI works fine, except text won't display anymore...
    If someone has an idea how to use 4.6.3f1 UI with text engine from 4.6.4p2 for example or anything else that would get me a functionnal UI with 4.6.4p2, please let me know

    And thanks for your help AlkisFortuneFish and 00christian00
     
  21. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    959
    Yeah, I sort of suspected it got caused by one of the many UI patches in p1. Have you tried 4.6.4f1's UI version? This is what I grafted in. I cannot attest to whether text works, though, we use TMPro for all our text.

    Edit: We should probably give this UI discussion its own thread!
     
    InsomniakDev likes this.
  22. ___Petr___

    ___Petr___

    Joined:
    Jun 4, 2013
    Posts:
    40
    4.6.4p2
    We've got error when compiling our project in Xcode.

    /Users/petr/Documents/proj_ios64/Classes/Native/GenericMethods18.cpp:14799:10: 'System_Core_System_Func_2_gen_203.h' file not found

    I look into Temp/il2cppOutput/il2cppOutput/, there is no System_Core_System_Func_2_gen_203.h

    We build our project as universal,without stripping, with .net 2.0 compat level

    How should we fix this error?
     
    Last edited: Apr 13, 2015
  23. Tyhja

    Tyhja

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

    The build sizes have been improving (120mb to 93 to 86).
    I have been trying to chase down a weird behaviour because it seemed to work well. I switched to a mono build just in case, however I ended up hitting the same bad access error at LTGUI.GetRect() again, just at a later time.

    This persists even on p2. Can I ask if you are aware that this problem just moved (although it seemed to have been fixed)

    Case: 689022
    Hope you guys can finally resolve this.
     

    Attached Files:

  24. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @oddurmagg

    We do have some executable size improvements in the works now. I do not expect any in the 4.6.4p3 patch release, but we should have some in the following weeks.
     
  25. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @___Petr___

    Without seeing the C# source code for the project, it is difficult to determine the cause of this problem. Can you submit a project with a bug report? That will help us track down the issue. Thanks.
     
  26. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @Tyhja

    Thanks, we will investigate this bug. Since this is not IL2CPP-specific, it likely won't be the IL2CPP developers investigating, but another team will pick it up.
     
  27. Tyhja

    Tyhja

    Joined:
    Jun 21, 2013
    Posts:
    19
    Ah, I see. Thanks. I had associated it with IL2CPP because prior to its introduction, it had worked well with the mono builds.
     
  28. eezSZI

    eezSZI

    Joined:
    Nov 16, 2012
    Posts:
    121
    We are still getting Timeouts for webrequests (does not happen with Mono target). Has your team been able to confirm this bug?

    Bug 686183
    (Open) When building with IL2CPP (universal iOS), web requests (UniWeb) eventually start timing out.
     
  29. InsomniakDev

    InsomniakDev

    Joined:
    Jun 23, 2014
    Posts:
    12
    Bad luck there too, same as 4.6.3f1 UI, no text display, i guess i'll be patient and wait for the next patch, hoping it will resolve this GUI issue.
    Thanks for your time AlkisFortuneFish
     
  30. Tyhja

    Tyhja

    Joined:
    Jun 21, 2013
    Posts:
    19
    Hi Josh,
    I realise perhaps I wasn't clear and could have been misunderstood.
    This error I detailed is the same error as previous, except that Mono complains about the BadAccess error, but IL2CPP just throws a null error (the same null error at LTGUI.checkwithinRect, which is odd because it is a static function with 2 struct inputs)
    It has changed in that 4.6.4 does this on load, while now (p1-p2) I have to do the steps detailed in the bug report.
    i.e. The problem still persists but has moved, both for mono and IL2CPP, So this is not isolated to mono.

    Sorry if I wasn't clear earlier,
    Thanks.
     
  31. big_march

    big_march

    Joined:
    Mar 2, 2015
    Posts:
    38
    @JoshPeterson
    Hello.
    I've test 686530 on unity4.6.4p2. Calling "Resources.Load" didn't crash again, but the Postprocessing still takes a long time.

    Moreover, after testing, we got 3 crash about physX when il2cpp game running, these crash didn't exist in mono(2.x) build.
    Please check the attached crash log.

    I've tried to locate where these crash happen, but at last, I found the game crashed in some internal logic in IL2CPP or physX.
    I didn't make a project to reproduce these crash yet, as it really will spend a lot of time.
    Can you find something helpful in these crash log?
     

    Attached Files:

  32. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @eezSZI

    Thanks for pointing this out. Our QA team has not yet confirmed this bug. I'll see if they can have a look at it though.
     
  33. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @Tyhja

    Thanks for clearing this up. I've linked to your forum post in the bug report, so we can get all of the details there.
     
  34. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    These crash logs are pretty different from anything we have seen yet with IL2CPP. Is there a chance that the code is taking a different path for the Mono and IL2CPP scripting backends, and that accounts for these crashes? We might also be doing something wrong earlier when using the IL2CPP scripting backend, and the problem manifest themselves is these places in the code.

    I guess that the crash logs themselves are not too helpful in tracking down the cause of the problem though. Anything you can do to isolate and/or reproduce these crashes will be greatly appreciated. Thanks.
     
  35. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    "postprocessing player" step takes 20mins for one of my big project. Is this normal for IL2CPP backend (4.6.2p2)?
     
  36. Tyhja

    Tyhja

    Joined:
    Jun 21, 2013
    Posts:
    19
    Alright, thanks.
     
  37. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @Favo Yang

    This is a pretty long run time for il2cpp.exe, although we have seen some project that run this long or longer. We're working on some optimizations for il2cpp.exe runtime though, so if you are willing/able to submit your project with a bug report, we would appreciate it. It sounds like a nice test case we can use for profiling. Thanks.
     
  38. Eric-Laberge

    Eric-Laberge

    Joined:
    Jan 20, 2011
    Posts:
    26
    Hello!

    Thanks for the improvements to IL2CPP, we went from a 410MB executable in 4.6.3 to 105MB in 4.6.4 down to 92MB in 4.6.4p2! Just a little bit more needed :)

    Unfortunately, what looks like lazy method initialization (ie.: the static boolean at the top of generated methods) in p2 has begun to cause deadlocks in our app with networking code (see bug 689422 for sample app, core dump, stack frame et al.). The RegisteredWaitHandle.Wait method is initializing in a worker thread while other methods run in the main thread, they share the same mutex and neither complete, thus freezing the app.

    Did you guys had a fix in the pipeline for these concurrency issues? This is really troublesome and the last outstanding issue we're having trouble working around with the IL2CPP updates (well, apart from the few megabytes we need to shave, of course).
     
  39. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @Eric Laberge

    This is the first report we've had of this concurrency issue. Clearly it could impact many users, so we will have a look at this bug soon. Thanks for reporting it.
     
    emi-albu likes this.
  40. dchau_hh

    dchau_hh

    Joined:
    Jan 22, 2014
    Posts:
    24
    I'm trying out 4.6.4p2 and seeing deadlocks as well. The threads are stalled on il2cpp :: os :: posix :: PosixWaitObject::Wait() we've got async scene loading, network communications and a background thread deserializing some JSON going on. I can't easily cut our project down to a reasonable size to upload a repro case.
     
    emi-albu likes this.
  41. E.Bugrov

    E.Bugrov

    Joined:
    Dec 25, 2013
    Posts:
    4
    Dear Unity developers, thank you very much for your hard work! IL2CPP technology itself is awesome and now it works so much better then before, however I would like to report a gruesome issue, which makes our project absolutely unplayable, unfortunately :'(

    Our porject has a full screen map, which is implemented via an overlay texture, which covers the game map texture. By default this overlay texture is filled with black pixels and every 100 milliseconds the game checks, how much distance the player has travelled and calculates the pixels, which should be "cut out" of this overlay texture - pixels' alpha is being zeroed.

    Overlay Texture2D properties:
    * ARGB32 format
    * size: 512x512 pixels
    * filter mode: Bilinear
    * wrap mode: Clamp
    * mip maps: 0

    When using Mono everything works absolutely perfect - this logic has almost no impact on peformance - its hard even to find it in profiler window. When building the IL2CPP version, however, the situation changes drastically - the update (Texture2D.Apply()) of this small textures takes about unbelievable 94 milliseconds on iPad 4!!! Even though the texture itself is not being displayed, so hopefully it is not even being uploaded to GPU...

    At most 800 pixels are being updated and I'm prerry sure that this definitely should take much less time... We thought the issue was caused by using Texture2D.SetPixel32() method, which is not optimal... However, migrating to SetPixels32() method even increased a bit the time, needed to update the texture! It now takes 96 milliseconds...

    We are using Unity 4.6.4p2 and I believe that this issue first appeared in Unity 4.6.0, at least I don't remember noticing it when IL2CPP first became available (4.5.5p5, if I'm not mistaken), however at that time there where lots of other issues, so I don't know what to think.

    Please take heart and consider this issue, its literally killing us...
     
    Last edited: Apr 15, 2015
  42. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    Do you believe that these deadlocks are related to the method prologues and static initialization as @Eric Laberge reported? Or do they seem to stem from a different issue?
     
  43. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775

    @E.Bugrov

    We've seen only a few cases where the IL2CPP scripting backend is slower than the Mono scripting backend. Since performance is one of our key goals, we would really like to investigate this more in depth. It is possible for us to obtain this project via a bug report? Feel free to message me privately if you would prefer to keep some of the details private. Thanks.
     
  44. E.Bugrov

    E.Bugrov

    Joined:
    Dec 25, 2013
    Posts:
    4
    Josh, I believe this issue is not linked to our project specifically, so I'll try to make a small project, which reproduces it and contact you. Thank you for noticing my post :)
     
  45. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @E.Bugrov

    Thank you! Please let us know if you can build a smaller project to reproduce this.
     
  46. Lambda Knight

    Lambda Knight

    Joined:
    Mar 8, 2011
    Posts:
    23
    This might help. I'm seeing the same problem, but it only happens when I build the Xcode project in Release mode. Probably some overly aggressive optimization?
     
  47. dchau_hh

    dchau_hh

    Joined:
    Jan 22, 2014
    Posts:
    24
    @JoshPeterson

    Thanks for the reply Josh. Unfortunately, I don't think this is related. I rolled back to 4.6.4p1 and can still reproduce our deadlock. It's definitely associated with the background thread we use to deserialize our JSON data though because I can't reproduced it if I move that back to the main thread. I'm trying to get authorization to upload our project in a bug report.
     
  48. big_march

    big_march

    Joined:
    Mar 2, 2015
    Posts:
    38
    @JoshPeterson
    I just find a very wired bug in IL2CPP build, as the following picture show:
    I compare a NaN float number with a const float number, but got different result in "Debug.log" and "If()".
    In mono(2.x) build, this is fine, I think it must be a bug in IL2CPP.

    The code and running log could be checked below:

    Screen Shot 2015-04-16 at 2.30.54 PM.png
    Screen Shot 2015-04-16 at 2.27.34 PM.png

    I've submit a case on fogbugz and uploaded a reproduce project.
    Please check 689816.
     
    Last edited: Apr 16, 2015
  49. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    959
    Case 689838

    IL2CPP spills carriage returns into the resulting C++ code. I only noticed this because one of our developers had inserted a \r\n in a tooltip, instead of just \n, and the project failed to build.

    For example:

    [Tooltip("Test\r\n")]

    Compiles to:

    TooltipAttribute__ctor_m6(tmp, il2cpp_codegen_string_new_wrapper("Test
    \n"), &TooltipAttribute__ctor_m6_MethodInfo);

    Trivial to work around on my end but it obviously shouldn't happen.
     
  50. Rbhaniwal

    Rbhaniwal

    Joined:
    Jan 23, 2015
    Posts:
    33
    hi JoshPeterson ,
    case No - 684043
    i got my problem, my game play scene shows nothing because the position of players are set to (Nan,Nan,Nan) on device . I prints the positions of my players Unity editor log shows the position of players but on Xcode its gives {Nan,Nan,Nan}.

    My Xcode gives me waring on -

    template <typename T>
    inline T* il2cpp_codegen_marshal_allocate_array(size_t length)
    {
    return static_cast<T*>(il2cpp::vm::MarshalAlloc::Allocate(sizeof(T) * length));
    }

    "Implicit conversion loses integer precision: 'unsigned long' to 'int' "
    is this Warning cause for this problem or not ?
     

    Attached Files: