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. Dunmord

    Dunmord

    Joined:
    Aug 15, 2013
    Posts:
    39
    We just upgraded to the latest release (5.0.2p2) and we now get a crashing error when we try to open our online mode.
    Code (CSharp):
    1.  
    2. GC Finalizer (7): signal SIGABRT
    3. malloc: *** error for object 0xx1a7342d0: pointer being freed was not allocated
    4.  
    Also getting some semantic warnings.

    We have tried to run this using a mono build and it works fine. We are going to try downgrading the version to patch 5.0.2p1.

    Edit: This error does not occur on patch 5.0.2p1
     
    Last edited: May 25, 2015
  2. cc77.jason

    cc77.jason

    Joined:
    May 25, 2015
    Posts:
    1
    Unity 4.6.5f1 / Xcode 6.3.1

    IL2CPP

    I write like this:
    Code (CSharp):
    1.  
    2. public delegate string[][] getstr_pt (string n);
    3. public static getstr_pt getstr;
    4.  
    5. static public string[][] getstr_1 (string n)
    6.     {
    7.         string [][] strAsset = new string[1][];
    8.         strAsset [0] = new string[1];
    9.         return strAsset;
    10.     }
    11.  
    The error occur when we build the app in xcode:
    Code (CSharp):
    1.  
    2. Undefined symbols for architecture arm64:
    3.   "_StringU5BU5D_t50_il2cpp_TypeInfo", referenced from:
    4.       _pinvoke_delegate_wrapper_getstr_pt_t1303 in Bulk_Assembly-CSharp_10.o
    5.     (maybe you meant: _StringU5BU5D_t50_il2cpp_TypeInfo_var)
    6. ld: symbol(s) not found for architecture arm64
    7. clang: error: linker command failed with exit code 1 (use -v to see invocation)
    8.  
     
    Last edited: May 25, 2015
  3. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    In 4.6.5p3 after build succeeds in xcode, it is doing a clean. Thus I have to rebuild again.
     
  4. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
  5. big_march

    big_march

    Joined:
    Mar 2, 2015
    Posts:
    38
    I solved this problem, I used a plugin called CloudSystem in my project, this compile error was caused by this plugin.
    Removed this then Xcode compiled successful.
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    This error message is actually a bug in the Xcode linker. Can you check your codebase for the il2cpp-config.h file? Look for the IL2CPP_METHOD_ATTR #define, and ensure that it is defined to be nothing. This is an optional #define that you can enable to improve managed stack traces. However, it can also cause this linker bug to occur.

    If you don't have IL2CPP_METHOD_ATTR defined, we would like to have a look at your project is possible, to see if this linker bug is showing up elsewhere. Thanks.
     
  7. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    This looks like the same bug @AlkisFortuneFish reported as well. We will investigate.
     
    sfjohansson likes this.
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    Since this is specific to Android, you may want to bring it up on a different section of the forums. Unfortunately, I can't provide too much help. My best advice it to report a bug with a project that reproduces it.
     
  10. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    This definitely looks like a bug in the C++ code IL2CPP is generating, and it is likely a regression. Please submit a bug with this project (if possible), and let me know the bug number. Thanks.
     
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    It's tough to tell for sure without more context, but I believe that we have corrected this problem. It should be fixed in 4.6.5p4.
     
  12. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    Thanks for reporting this. Are you using iOS with IL2CPP for these cases? If not, you may want to try reporting this on a different section of the forums, as this one is devoted to iOS/IL2CPP issues.

    If you are seeing this with IL2CPP, can you determine if the same behavior occurs with the Mono scripting backend as well? Thanks.
     
  13. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    I can't sure without seeing the full call stack when this error occurs. However, this looks like a problem with the Thread Name property. We had a regression slip into 5.0.2p2 where setting the Name property of a Thread instance would cause this error when the Thread finalizer ran. You can work around this by simply not setting the Name property. However, we have corrected it for 5.0.2p3. Thanks.
     
  14. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @cc77.jason

    This looks like a bug in the C++ code generated by IL2CPP. Can you submit a bug report and include a project that reproduces it? Thanks.
     
  15. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
  16. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    I'm glad that you were able to track this down. If you can still submit a bug report that includes the full project which causes the error, we would appreciate it. That way we can correct the underlying problem. Thanks.
     
  17. Dunmord

    Dunmord

    Joined:
    Aug 15, 2013
    Posts:
    39
    @JoshPeterson
    Thanks. Will wait for p3 then and use p1 meanwhile.
     
  18. omermujahid

    omermujahid

    Joined:
    Sep 25, 2012
    Posts:
    31
    @JoshPeterson

    Unfortunately I can't upload the project, would the XCode project suffice in this case?

    Thanks
     
  19. tatata

    tatata

    Joined:
    Jul 11, 2013
    Posts:
    12
    Hi,

    report: http://fogbugz.unity3d.com/default.asp?699733_ad8uitcle1nn16op

    A generic-method in generic-class (with multiple type parameters, multiple constraints and interface) throws ExecutionEngineException.

    Code (CSharp):
    1. public class Test : MonoBehaviour
    2. {
    3.     void Start ()
    4.     {
    5.         new TestClass<MonoBehaviour, GameObject> ().TestMethod1 (50);
    6.     }
    7. }
    8.  
    9. public interface TestInteraface<T1, T2>
    10.     where T1 : MonoBehaviour
    11.         where T2 : class
    12. {
    13.     T2 TestMethod1 (int arg);
    14.     T2 TestMethod2<TArg> (TArg arg);
    15. }
    16.  
    17.  
    18. public class TestClass<T1, T2> : TestInteraface<T1, T2>
    19.     where T1 : MonoBehaviour
    20.         where T2 : class
    21. {
    22.     public T2 TestMethod1 (int arg)
    23.     {
    24.         return TestMethod2 (arg);
    25.     }
    26.  
    27.     public T2 TestMethod2<TArg> (TArg arg)
    28.     {
    29.         Debug.Log (arg);
    30.         return null;
    31.     }
    32. }
    Build and run this program with:

    Mono => ExecutionEngineException (Attempting to JIT compile method while running with --aot-only)
    IL2CPP(4.6.5p1) => It works fine.
    IL2CPP(4.6.5p3) => ExecutionEngineException (Attempting to call method for which no ahead of time (AOT) code was generated)


    Is this a bug or by design?

    * If TestClass doesn't implements interface, it doesn't throw Exception, but causes crash.
     
  20. Kristof_Newfort

    Kristof_Newfort

    Joined:
    Feb 21, 2014
    Posts:
    24
    Hi

    When I want to build for iOS (Mac or Windows) I get an error from il2cpp in the console.
    I was trying to build with Unity 4.6.5p3. Build for 'Universal' architecture & all iOS devices with IL2CPP. Changing 'Striping Level' doesn't help.


    Error:
    .... [See attachments]
    You can find the full error in the attachments.
    Thanks in advance.
     

    Attached Files:

  21. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    Actually, if you cannot provide the full project, but you can provide the managed assemblies, that will be best. You should find these assemblies in the Data/Managed directory in the iOS build output. Those assemblies will allow us to reproduce the error in code generation, I suspect. Thanks.
     
  22. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    This is a bug in the 4.6.5p3 release. We have a fix ready for the 4.6.5p4 release to correct it. Thanks for reporting it.
     
    Kristof_Newfort likes this.
  23. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    I think that this is a bug. The fact that Mono AOT can't handle this code indicates that we might not be able to handle it in IL2CPP either. However, since it did work with IL2CPP at 4.6.5p1, than we should be able to make it work in later releases, I think.

    Certainly removing the interface should not cause a runtime crash as well. I see the other bug report you have submitted for that issue. We will investigate both of them. Thanks.
     
  24. joncham

    joncham

    Unity Technologies

    Joined:
    Dec 1, 2011
    Posts:
    276
    Please file a bug on this if possible. Thanks!
     
  25. joncham

    joncham

    Unity Technologies

    Joined:
    Dec 1, 2011
    Posts:
    276
    For now this may be by design. Basically, we spent a lot of time and memory trying to find all the generics that could ever possibly be used in IL2CPP previously. We have updated the logic to improve build time, build size, and memory usage. As part of that, some things that previously worked may no longer work.

    Our main criteria is parity with mono which means in this case you can file a bug, but since it doesn't work on mono either it will not be a high priority to fix at the moment.
     
  26. tatata

    tatata

    Joined:
    Jul 11, 2013
    Posts:
    12
    Okay, I understand. I will use workaround call until this problem fixed.

    Even then, please fix *crash* bug mentioned above. If the program crashes, it requires a little more time to find out which method call has a problem than case a program doesn't crash.

    Thank you for your replies.
     
  27. omermujahid

    omermujahid

    Joined:
    Sep 25, 2012
    Posts:
    31
    @JoshPeterson
    Edit 2: Found the problem. We were running a post build script which led to some il2cpp generated code to be excluded from the build phase. Thanks for the help, sorry I wasted your time :oops:

    Thanks
     
    Last edited: May 28, 2015
  28. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    Yes, we will look to fix the crash, which is definitely a bug. Thanks.
     
  29. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    No problem, I'm glad that you tracked it down.
     
  30. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    We've built some tools that let's us isolate some branches of the code base that doesn't get stripped as desired. This happens inside some dlls that we don't have source for so they're probably potentially referenced. It's critical for us that we get access to blacklist classes.

    As with half the people in this thread we're fighting to get below Apple's 100mb limit for iOS, so we're both in a rush and willing to work for it. Am I correct in assuming that if we build a new "/Contents/Frameworks/Tools/UnusedByteCodeStripper/monolinker.exe" we could implement a blacklisting ourselves?

    Lucas once referred to this file: https://github.com/Unity-Technologi...inker/Mono.Linker.Steps/ResolveFromXmlStep.cs

    Am I correct in assuming the code for the linker is on github? What branch should I try to build?
     
  31. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    For the IL2CPP scripting backend, we are not using monolinker.exe directly. Instead, we use the UnusedBytecodeStripper2.exe tool, which is located in the Contents/Frameworks/Tools/UnusedByteCodeStripper2 directory in the Unity installation. For the Mono scripting backend, we use the UnusedBytecodeStripper.exe tool Contents/Frameworks/Tools/UnusedByteCodeStripper directory.

    Note the naming here, we wanted to fork the tool so as not to destabilize the Mono tool, so we added a "2" on the end.

    In any case, both of these tools are based on the monolinker.exe code you referenced. However, since Unity does not run monolinker.exe for the IL2CPP scripting backend, building that tool with custom changes won't help in the build toolchain.

    With that said, you can build monolinker.exe with custom changes (the unity-trunk branch is the one we ship from), and run it manually before il2cpp.exe gets to convert the assemblies. You could even run it manually before the project build on the third-party assemblies you mentioned. We have had a few customer do similar things, although I'm not sure if they used the monolinker.exe tool or not. They have had success removing unnecessary IL code from assemblies.
     
  32. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Awesome, but where is the code for the il2cpp linker with the stripping? The Unity trunk is dated 2010.
     
  33. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    The code for the UnusedBytecodeStripper2.exe is not part of the open-source code on Github, unfortunately, so we cannot share it. You might be able to use or modify the monolinker.exe code that is open source to do what you need though and run it separate from Unity on the managed assemblies.
     
  34. sfjohansson

    sfjohansson

    Joined:
    Mar 12, 2013
    Posts:
    368
    Hi @JoshPeterson
    I'm getting this error in 4.6.5p2 ( project doesn't compile on p3 ), looks similar to the issue @Dunmord reported earlier

    It's only happening when I'm reloading one of my levels and the logic inside the levels is pretty much the same so I was hoping there is a way around it or track down what is causing it as I really want to submit this weekend.

    Any suggestions?

    Many Thanks
     
  35. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    Yes, it looks like the same problem. You should be able to work around the problem by not setting the Name property on any System.Threading.Thread instance. If the managed code which does that is in an assembly for which you don't have the source code, that will be difficult though.

    Can you provide the native call stack from Xcode though? That will allow us to confirm that this is the same issue. Thanks.
     
  36. sfjohansson

    sfjohansson

    Joined:
    Mar 12, 2013
    Posts:
    368
    Here we go.. (along with a random selection of smileys that some of the character combinations manage to make up) =O

    Thanks

     
  37. Dunmord

    Dunmord

    Joined:
    Aug 15, 2013
    Posts:
    39
    @sfjohansson
    Quick dirty fix if it's the same problem... Downgrade to a patch before the one you are using or after. That did it for us.
     
  38. joncham

    joncham

    Unity Technologies

    Joined:
    Dec 1, 2011
    Posts:
    276
    Yes, this is the issue @JoshPeterson mention. You can see that thread 7 (the crashing thread) is indeed finalizing a thread object, and this is consistent with the crash we saw that was related to thread name.
     
  39. sfjohansson

    sfjohansson

    Joined:
    Mar 12, 2013
    Posts:
    368
    Cool, hopefully fixed in next patch then..so I'll try with @Dunmord tip and try p1, cheers for that btw (hopefully p1 still has good metal performance)

    Although it's quite interesting that it happens consistently on this one level...when I'm reloading the scene considering that it's not different to other levels with no issues.
     
  40. sfjohansson

    sfjohansson

    Joined:
    Mar 12, 2013
    Posts:
    368
    I managed to track downtime the offender.. if you are using Aron Granbergs A* Pathfinding Project then you can comment out the line 1466 in AstarPath.cs

    Code (CSharp):
    1. threads[i].Name = "Pathfinding Thread " + i;
    and line 836 in RVOCoreSimulator.cs

    Code (CSharp):
    1. thread.Name = "RVO Simulator Thread";
    I also checked on the A* forums and it was safe to comment out the as the name was only used when debugging.
     
  41. oneal

    oneal

    Joined:
    Apr 23, 2015
    Posts:
    2
    hi
    unity 4.6.5p3 xcode6.3.2
    i have some code like
    Code (CSharp):
    1.         mesh.vertices = vertices;
    2.         mesh.uv = UVs;
    3.         mesh.colors = meshColors;
    4.         mesh.subMeshCount = subMeshDatas.Length;
    5.         for (int i = 0; i < subMeshDatas.Length; ++i)
    6.         {
    7.             if (i == 1 && subMeshDatas[i].faces.Count == 0)
    8.             {
    9.                 mesh.subMeshCount = 1;
    10.                 break;
    11.             }
    12.             else
    13.             {
    14.                 mesh.SetTriangles(subMeshDatas[i].faces.ToArray(), i);
    15.             }
    16.         }
    when i build & run on ios 64 device, it's crashed

    Code (CSharp):
    1. Thread 1Queue : com.apple.main-thread (serial)
    2. #0    0x00000001024dd770 in TransformVertices_Strided_XYZ_3_Loop at /Users/builduser/buildslave/unity/build/Runtime/Filters/Mesh/TransformVertexNEON64_Loop.inc:105
    3. #1    0x00000001025940e4 in TransformVertices(unsigned char*, Matrix4x4f const&, VertexBufferData const&, unsigned long, unsigned long, unsigned int) at /Users/builduser/buildslave/unity/build/Runtime/GfxDevice/BatchRendering.cpp:206
    4. #2    0x00000001025964c8 in GfxDevice::DynamicBatchMesh(Matrix4x4f const&, VertexBufferData const&, unsigned int, unsigned int, IndexBufferData const&, unsigned int, unsigned int) at /Users/builduser/buildslave/unity/build/Runtime/GfxDevice/GfxDevice.cpp:567
    5. #3    0x000000010254305c in RenderDynamicBatch(BatchInstanceData const*, unsigned long, unsigned long, unsigned long, ChannelAssigns const&, unsigned int, GfxPrimitiveType) [inlined] at /Users/builduser/buildslave/unity/build/Runtime/Filters/Mesh/MeshRenderer.cpp:424
    6. #4    0x0000000102542f78 in MeshRenderer::RenderMultiple(BatchInstanceData const*, unsigned long, ChannelAssigns const&) at /Users/builduser/buildslave/unity/build/Runtime/Filters/Mesh/MeshRenderer.cpp:607
    7. #5    0x0000000102593e14 in BatchRenderer::Flush() at /Users/builduser/buildslave/unity/build/Runtime/GfxDevice/BatchRendering.cpp:79
    8. #6    0x00000001025008b8 in ForwardVertexRenderLoop::PerformRendering(bool, bool) at /Users/builduser/buildslave/unity/build/Runtime/Camera/RenderLoops/ForwardVertexRenderLoop.cpp:402
    9. #7    0x0000000102500e2c in DoForwardVertexRenderLoop(RenderLoopContext&, dynamic_array<RenderObjectData, 8ul>&, bool, ActiveLights&, bool, bool) at /Users/builduser/buildslave/unity/build/Runtime/Camera/RenderLoops/ForwardVertexRenderLoop.cpp:641
    10. #8    0x0000000102507a94 in DoRenderLoop(RenderLoop&, RenderingPath, CullResults&, bool) at /Users/builduser/buildslave/unity/build/Runtime/Camera/RenderLoops/RenderLoopPrivate.cpp:439
    11. #9    0x000000010250beb8 in Camera::DoRender(CullResults&, void (*)(Camera&, RenderLoop&, CullResults&), int) at /Users/builduser/buildslave/unity/build/Runtime/Camera/Camera.cpp:1144
    12. #10    0x000000010250c378 in Camera::Render(CullResults&, int) at /Users/builduser/buildslave/unity/build/Runtime/Camera/Camera.cpp:1696
    13. #11    0x000000010251e478 in RenderManager::RenderCameras() at /Users/builduser/buildslave/unity/build/Runtime/Camera/RenderManager.cpp:94
    14. #12    0x000000010260b688 in PlayerRender(bool) at /Users/builduser/buildslave/unity/build/Runtime/Misc/Player.cpp:1597
    15. #13    0x000000010260bd80 in PlayerLoop(bool, bool, IHookEvent*) at /Users/builduser/buildslave/unity/build/Runtime/Misc/Player.cpp:2055
    16. #14    0x0000000102415354 in UnityPlayerLoop at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/LibEntryPoint.mm:252
    17. #15    0x0000000100778204 in UnityRepaintImpl(bool) at /Users/maliang/Work/QinMoon/v1.3.0_64/Build/iPhone/Output/QinMoon_CyAppDist/Classes/UnityAppController+Rendering.mm:225
    18. #16    0x0000000100777714 in UnityRepaint at /Users/maliang/Work/QinMoon/v1.3.0_64/Build/iPhone/Output/QinMoon_CyAppDist/Classes/UnityAppController+Rendering.mm:237
    19. #17    0x00000001007776f4 in -[UnityAppController(Rendering) repaint] at /Users/maliang/Work/QinMoon/v1.3.0_64/Build/iPhone/Output/QinMoon_CyAppDist/Classes/UnityAppController+Rendering.mm:70
    20. #18    0x00000001007775d8 in __51-[UnityAppController(Rendering) repaintDisplayLink]_block_invoke at /Users/maliang/Work/QinMoon/v1.3.0_64/Build/iPhone/Output/QinMoon_CyAppDist/Classes/UnityAppController+Rendering.mm:55
    21. #19    0x00000001932a4014 in _dispatch_call_block_and_release ()
    22. #20    0x00000001932a3fd4 in _dispatch_client_callout ()
    23. #21    0x00000001932a71dc in _dispatch_main_queue_callback_4CF ()
    24. #22    0x00000001863d2ddc in __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ ()
    25. #23    0x00000001863d111c in __CFRunLoopRun ()
    26. #24    0x0000000186311dd0 in CFRunLoopRunSpecific ()
    27. #25    0x000000018bfa1c0c in GSEventRunModal ()
    28. #26    0x0000000189442fc4 in UIApplicationMain ()
    29. #27    0x0000000100152bb0 in main at /Users/maliang/Work/QinMoon/v1.3.0_64/Build/iPhone/Output/QinMoon_CyAppDist/Classes/main.mm:45
    30. #28    0x00000001932bfaa0 in start ()
    31.  
    and if i modify code like below, wothour crashed, but the text seem like overlap
    Code (CSharp):
    1. mesh.uv = UVs;
    2.         mesh.colors = meshColors;
    3.         //mesh.subMeshCount = subMeshDatas.Length;
    4.         int count = subMeshDatas.Length;
    5.         for (int i = 0; i < subMeshDatas.Length; ++i)
    6.         {
    7.             if (subMeshDatas[i].faces.Count == 0)
    8.             {
    9.                 count--;
    10.             }
    11.         }
    12.  
    13.         mesh.subMeshCount = count;
    14.         int index = 0;
    15.         for (int j = 0; j < subMeshDatas.Length; j++)
    16.         {
    17.             if (subMeshDatas[j].faces.Count != 0)
    18.             {
    19.                 mesh.SetTriangles(subMeshDatas[j].faces.ToArray(), index);
    20.                 index++;
    21.             }
    22.         }
    23.  
    this is a bug? or i use it by mistake
     
    Last edited: May 31, 2015
  42. chetanisinanand

    chetanisinanand

    Joined:
    Oct 22, 2012
    Posts:
    22
    Hi,
    I'm very sorry if I'm asking same question again. However I've read several times that there is maximum stripping enabled in IL2CPP.
    So please let me know for a very basic Unity Project with IL2CPP:
    Q1: Does it make any difference to the final built size if I choose a stripping level rather than keeping it disabled
    Q2: If Yes, Which stripping level should I choose as I've read in unity blog that compilation might fail using micro-mscorlib,
     
  43. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    I don't have much knowledge about the specific code you are using here, so I can't say whether or not you are using this by mistake. However, a good test it to try the same code with the Mono scripting backend. If it works there, then it should work with IL2CPP and iOS 64-bit. If this is the case, please submit a bug report and include an example project so that we can investigate it.

    Initially though, the call stack for this crash does not look like anything specific to IL2CPP, but we would need to investigate to be sure. Thanks.
     
  44. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    @chetanisinanand There is no need to apologize.

    > Q1: Does it make any difference to the final built size if I choose a stripping level rather than keeping it disabled

    Yes, it might make some difference. IL2CPP already does byte code stripping in all cases. But using assembly stripping can remove additional things.

    > Q2: If Yes, Which stripping level should I choose as I've read in unity blog that compilation might fail using micro-mscorlib,

    I would try assembly stripping. Do not use micro-mscorlib, as that likely won't work with IL2CPP.

    In general stripping and build size issue are very project dependent, so it is difficult to give concrete answers. I would recommend trying various settings and see what happens.
     
  45. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    Any tentative date for 4.6.5p4?
     
  46. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    Yes, it should be out today, sometime soon. It was originally scheduled for Friday of last week, but slipped a day.
     
  47. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
  48. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    @JoshPeterson Apparently the static constructor in SoundManager is causing the problem
     
  49. xenonmiii

    xenonmiii

    Joined:
    Aug 2, 2010
    Posts:
    147
    @JoshPeterson After disabling the SoundManager, I'm seeing the following NPEs which seems to be trigger by date comparing which I'm not calling directly in my code. I'm trying to create a repro project but no success yet.

    NullReferenceException: A null value was found where an object instance was required.

    at Mono.Security.Cryptography.CryptoConvert.ToCapiKeyBlob (System.Security.Cryptography.RSA rsa, Boolean includePrivateKey) [0x00000] in <filename unknown>:0

    at Boo.Lang.Runtime.DynamicDispatching.Dispatcher.EndInvoke (IAsyncResult result) [0x00000] in <filename unknown>:0

    at SHDLoader.Start () [0x00000] in <filename unknown>:0

    at System.Collections.Generic.EqualityComparer`1+DefaultComparer[System.DateTime].Equals (DateTime x, DateTime y) [0x00000] in <filename unknown>:0

    System.Collections.Generic.DefaultComparer:Equals(DateTime, DateTime)


    (Filename: currently not available on il2cpp Line: -1)


    NullReferenceException: A null value was found where an object instance was required.

    at Mono.Security.Cryptography.CryptoConvert.ToCapiKeyBlob (System.Security.Cryptography.RSA rsa, Boolean includePrivateKey) [0x00000] in <filename unknown>:0

    at Boo.Lang.Runtime.DynamicDispatching.Dispatcher.EndInvoke (IAsyncResult result) [0x00000] in <filename unknown>:0

    at CurrencyConverter.Start () [0x00000] in <filename unknown>:0

    at System.Collections.Generic.EqualityComparer`1+DefaultComparer[System.DateTime].Equals (DateTime x, DateTime y) [0x00000] in <filename unknown>:0

    System.Collections.Generic.DefaultComparer:Equals(DateTime, DateTime)


    (Filename: currently not available on il2cpp Line: -1)
     
  50. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    I can see that we have not yet investigated case 699323. I'll see if we can have a look at it soon.

    As for the null reference exceptions, I suspect that the managed stack traces reported may not be correct. We have a fix in progress now to provide correct managed stack traces, but it it not quite ready to release.

    In the meantime, can you break in Xcode when a NRE occurs? You can see how to do that in this blog post (look for the section of the post on the NullCheck method). Then we can have a look at the stack trace in Xcode, which will be correct. That might help track down the cause of the problem.