Search Unity

4.6 iOS 64-bit beta

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

  1. nchen24_ca

    nchen24_ca

    Joined:
    Feb 6, 2015
    Posts:
    5
    @JoshPeterson Thanks for your speedy reply! I edited my previous post to specify that it happens in two different places. After some testing, I've verified that one case only occurs on IL2CPP.

    The project is also quite large. I clicked submit bug, but it hasn't shown any change in the progress bar for the past thirty minutes or so. Any advice?
     
  2. credence86

    credence86

    Joined:
    Jan 15, 2014
    Posts:
    3
    Is there a way to get the BuildPipeline to do IL2CPP / Universal builds?

    I've found the 'iPhoneArchitecture' enum but no place to use it. Any ideas?
     
  3. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    I'm not sure about the progress bar. If the upload fails, you can submit a bug without the project, then we can obtain the project independently. Thanks.
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
  5. mhalttu

    mhalttu

    Joined:
    Mar 13, 2013
    Posts:
    30
    I finally found the add-on that was causing the build to freeze. Now that the build is working, is it intended that the UnusedByteCodeStripper step takes about ten minutes to complete? The whole build process (including Xcode compilation of about 400 files) takes about 20 minutes on a quad core MacBook Pro. Getting the old mono build installed on a device took less than 4 minutes. That's over 400% increase in build time.

    I'm encountering all kinds of runtime issues with IL2CPP and the current build cycle makes fixing them painfully slow.
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    I'm surprised that UnusedByteCodeStripper is taking that long to run. Clearly the build process is far to slow now (we're working to improve it), but that seems extreme. Could we have a look at your project via a bug report? I wonder if you are hitting a case in UnusedByteCodeStripper that we have not yet handled.
     
  7. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Hi Josh,
    Thanks for the reply.

    The project is rather large. Anyway I can just send you the sections that may be causing the issue?
    Is it purely related to dll's that are in the plugin's folder?
     
  8. nchen24_ca

    nchen24_ca

    Joined:
    Feb 6, 2015
    Posts:
    5
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    Yes, you can send just the part of the project that is causing the problem. Actually, we don't need the DLLs in the Plugins folder. Instead, we need all of the DLLs in the Data/Managed folder in the directory for your build target. So if you name the folder for the build target iOS-il2cpp, then we will need the files in the directory named <your project directory>/iOS-il2cpp\Data\Managed. Thanks!
     
  10. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    Thanks, I've added the bug to our list, we will get to is as soon as we can.
     
  11. iGhost2015

    iGhost2015

    Joined:
    Feb 12, 2015
    Posts:
    8
    Hi,

    We are using Unity 4.6.3f1. The patch note indicates that the WebRequest should be working, but we still can't get through. The compiling is fine but creating an HTTPWebRequest in runtime throws following errors:

    Code (CSharp):
    1. Exception:System.NotSupportedException: http://test.somesite.com/urunwebapi/api/login?passport=e3e21bee-d61c-41f0-913d-9580fe2230bf&password=rtnfmjfcruutrdyxqy00muywltkxm0qtotu4mezfmjizmejg
    2.   at System.Net.NetworkInformation.UnicastIPAddressInformationCollection.Clear () [0x00000] in <filename unknown>:0
    3.   at System.Net.WebRequest.GetCreator (System.String prefix) [0x00000] in <filename unknown>:0
    4.   at System.Net.WebRequest.Create (System.Uri requestUri) [0x00000] in <filename unknown>:0
    5.   at RestSharp.Http.ConfigureWebRequest (System.String method, System.Uri url) [0x00000] in <filename unknown>:0
    6.   at RestSharp.Http.GetStyleMethodInternal (System.String method) [0x00000] in <filename unknown>:0
    7.   at RestSharp.Http.AsGet (System.String httpMethod) [0x00000] in <filename unknown>:0
    8.   at RestSharp.Serializers.DotNetXmlSerializer+EncodingStringWriter.get_Encoding () [0x00000] in <filename unknown>:0
    9.   at RestSharp.RestClient.DoExecuteAsGet (IHttp http, System.String method) [0x00000] in <filename unknown>:0
    10.   at Boo.Lang.Runtime.DynamicDispatching.Dispatcher.EndInvoke (IAsyncResult result) [0x00000] in <filename unknown>:0
    11.   at RestSharp.Serializers.DotNetXmlSerializer+EncodingStringWriter.get_Encoding () [0x00000] in <filename unknown>:0
    12.   at RestSharp.RestClient.Execute (IRestRequest request, System.String httpMethod, System.Func`3 getResponse) [0x00000] in <filename unknown>:0
    13.   at RestSharp.RestClient.Execute (IRestRequest request) [0x00000] in <filename unknown>:0
    14.   at Mono.Globalization.Unicode.MSCompatUnicodeTable.FillCJKCore (System.String culture, Mono.Globalization.Unicode.CodePointIndexer& cjkIndexer, System.Byte*& catTable, System.Byte*& lv1Table, Mono.Globalization.Unicode.CodePointIndexer& cjkLv2Indexer, System.Byte*& lv2Table) [0x00000] in <filename unknown>:0
    15.   at RestSharp.RestClient.Execute[Object] () [0x00000] in <filename unknown>:0
    16.   at <PrivateImplementationDetails>..ctor () [0x00000] in <filename unknown>:0
    17.   at Boo.Lang.Runtime.DynamicDispatching.Dispatcher.EndInvoke (IAsyncResult result) [0x00000] in <filename unknown>:0
    18.   at System.Threading.ThreadStart.Invoke () [0x00000] in <filename unknown>:0
    19.   at uLobby.StorageLayerUtility.CreateFriendInvitation (uLobby.Account inviter, uLobby.Account recipient) [0x00000] in <filename unknown>:0
    20. (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)
    It is weird that there is no "System.Net.NetworkInformation.UnicastIPAddressInformationCollection.Clear ()" in "System.Net.WebRequest.GetCreator ()" where I look into the System.dll of mono version. I don't see where this error came from. Or should I compile Restsharp with mono libs?
     
  12. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Unfortunately nothing gets saved for that il2cpp build when it crashes. The folder is empty.

    What about if I build as mono and send the managed files folder?
    Isn't that the same before you convert?
     
  13. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Ok in lieu of a reply I submitted the bug report with a managed.zip file containing the data/managed files from a successful mono build
     
  14. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Okay, I deleted a few assets that appeared to be causing problems in the il2cpp build and I finally got one to work.
    Assets deleted:
    InfiniWheel (from asset store - has a closed sourced .dll which appeared to cause one build issue)
    TextureTools (from asset store - threw a not implemented error after deleted infiniwheel.dll)

    Now I run on iPad2 I'm getting a lot of EasySave2 errors in the log (mono build works fine)
    *snip examples*
    Initialize engine version: 4.6.3f1 (4753d8b6ef2b)
    Easy Save 2 Error: The data you are trying to load does not match the Load method you are using to load it.
    Replacements.MSCompatUnicodeTable:get_IsReady()
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:LogError(Object)
    ES2Reader:processHeader(Key, ES2Type, ES2Type, String)
    ES2Reader:Read()
    ES2:Load()
    SettingsManager:Init()
    SettingsManager:.ctor()
    SettingsManager:get_Instance()
    SettingsManager:get_GameState()
    DiatonicController:Awake()
    Replacements.MSCompatUnicodeTable:get_IsReady()

    (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)

    ..
    CryptographicException: Bad PKCS7 padding. Invalid length 203.
    at System.Collections.ArrayList..ctor () [0x00000] in <filename unknown>:0
    at Mono.Security.Cryptography.SymmetricTransform.FinalEncrypt (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) [0x00000] in <filename unknown>:0
    at Mono.Security.Cryptography.SymmetricTransform.FinalDecrypt (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) [0x00000] in <filename unknown>:0
    at Mono.Security.Cryptography.SymmetricTransform.TransformFinalBlock (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) [0x00000] in <filename unknown>:0
    at Mono.Security.Protocol.Tls.Handshake.Client.TlsClientKeyExchange.ProcessAsTls1 () [0x00000] in <filename unknown>:0
    at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) [0x00000] in <filename unknown>:0
    at Mono.Security.Protocol.Tls.Handshake.Client.TlsClientKeyExchange.ProcessAsTls1 () [0x00000] in <filename unknown>:0
    at System.Security.Cryptography.CryptoStream.FlushFinalBlock () [0x00000] in <filename unknown>:0
    at System.Security.Cryptography.CryptoStream.Close () [0x00000] in <filename unknown>:0
    at NAudio.Utils.MergeSort..ctor () [0x00000] in <filename unknown>:0
    at System.IO.Stream.Dispose () [0x00000] in <filename unknown>:0
    at NAudio.Utils.MergeSort..ctor () [0x00000] in <filename unknown>:0
    at MoodkieSecurity.AESEncryptor.iDecrypt (System.Byte[] data, System.Byte[] key, System.Byte[] iv) [0x00000] in <filename unknown>:0
    at MoodkieSecurity.AESEncryptor.Decrypt (System.Byte[] data) [0x00000] in <filename unknown>:0
    at ES2Reader.GetDecryptedBytes () [0x00000] in <filename unknown>:0
    at ES2Reader.GetEncryptedReader () [0x00000] in <filename unknown>:0
    at ES2Reader.ReadEncrypted[Boolean] () [0x00000] in <filename unknown>:0
    at ES2Reader.Read[Boolean] () [0x00000] in <filename unknown>:0
    at ES2Reader.Read[Boolean] () [0x00000] in <filename unknown>:0
    at ES2.Load[Boolean] () [0x00000] in <filename unknown>:0
    at SettingsManager.Init () [0x00000] in <filename unknown>:0
    at SettingsManager..ctor () [0x00000] in <filename unknown>:0
    at SettingsManager.get_Instance () [0x00000] in <filename unknown>:0
    at SettingsManager.get_GameState () [0x00000] in <filename unknown>:0
    at DiatonicController.Awake () [0x00000] in <filename unknown>:0
    at Replacements.MSCompatUnicodeTable.get_IsReady () [0x00000] in <filename unknown>:0
    Replacements.MSCompatUnicodeTable:get_IsReady()
     
  15. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    @Lucas Meijer
    Any updates on the stripping bug (case: 674720)? I would like to test the fixes to the generics as our project has a lot of them and I'm a bit worried about the necessary switch to IL2CPP (though I'm existed about that :) ).
     
  16. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    914
    @sonicviz Hi there, Joel from the Easy Save team here. We're fairly certain that the errors you are getting are caused by the BinaryReader issues, which it sounds like Unity are fixing in 4.6.3p1.
     
  17. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    I wonder if we are seeing some a bug in the call stack reporting code. That might explain the odd call stack. Did this call stack come from a development player build? If not, there is a chance that the call stack might be incorrect.

    In any case, this seems like it should be working. Can you submit a bug with this project? Thanks.
     
  18. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    As @joeltebbett pointed out, this should be corrected in 4.6.3p1.
     
  19. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    Thanks, this assemblies from the Mono build might work. The IL2CPP builds do a bit more stripping first, but we will give these a try. Thanks!
     
  20. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    We're still looking at the bug, but I think you can work around it by changing the "Api Compatibility Level" in the iOS Player Settings from ".NET 2.0 Subset" to ".NET 2.0". The Ionic.ZLib assembly seems to be using System.Console.ForegroundColor, which does not exist in the .NET 2.0 Subset version of mscorlib.
     
  21. Stream

    Stream

    Joined:
    Oct 28, 2013
    Posts:
    37
  22. iGhost2015

    iGhost2015

    Joined:
    Feb 12, 2015
    Posts:
    8
    @JoshPeterson
    Yes, the stack trace was printed by Debug.Log(ex). And now I stripped a minimal project, the top line of stack trace became follows:
    Code (CSharp):
    1. at System.Net.NetworkInformation.Win32_IP_ADAPTER_ADDRESSES..ctor () [0x00000] in <filename unknown>:0
    I'll file a bug ASAP. Thanks!
     
  23. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    @Stream
    The Parse SDK might be the problem here. In 4.6.3 we have a bug that causes a crash in ParseUser.LogInASync is called. that is corrected in 4.6.3p1. We still have an outstanding bug in ParseFacebookUtls.LogInAsync though, and we are actively working with the Parse developers on that issue. It might be worthwhile to try your project with 4.6.3p1 as well. Thanks.
     
  24. iGhost2015

    iGhost2015

    Joined:
    Feb 12, 2015
    Posts:
    8
    https://fogbugz.unity3d.com/default.asp?675644_hu4stqek

    Hope I did it correctly.
     
  25. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
  26. Catacomber

    Catacomber

    Joined:
    Sep 22, 2009
    Posts:
    682
    @JoshPeterson --project finally uploaded using Google Drive--sent you the link.

    Thanks for your help!
     
  27. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    The 4.6.3p1 release is now available here: http://unity3d.com/unity/qa/patch-releases

    From the release notes, these are the fixes for iOS and iOS 64-bit issues:
    • (670887) - IL2CPP / Raknet : Fixed RPC call registration not working on IL2CPP backend.
    • (669983) - iOS/IL2CPP: Allow the LogInAsync method in the ParseSDK to work correctly.
    • (667476) - iOS/IL2CPP: Always initialize type information before accessing static fields.
    • (none) - iOS/IL2CPP: Fixed Array.CopyTo() fast path, which was doing the wrong thing when the source array was a value type and destination array was not.
    • (674680), (674310) - iOS/IL2CPP: Fixed a problem with shift operators, resulting in problems with MD5 calculation, crypto, amongst other things.
    • (670763) - iOS/IL2CPP: Fixed a case where having throw statement at the end of a method would cause IL2CPP to crash.
    • (670763) - iOS/IL2CPP: Fixed array marshaling when passing an incorrect argument.
    • (672704) - iOS/IL2CPP: Fixed code generation for delegates having parameters tagged with the Out attribute.
    • (673787) - iOS/IL2CPP: Handle NULL const string values.
    • (671597) - iOS/IL2CPP: Handle out and ref marshaling of a delegate with a struct that has no instance fields.
    • (671790) - iOS/IL2CPP: Implemented Assembly.GlobalAssemblyCache so that is always returned false.
    • (667476) - iOS/IL2CPP: Implemented MethodBase.GetMethodFromHandle with two arguments for a non-generic type.
    • (670763) - iOS/IL2CPP: Implemented Assembly.GetName().
    • (670763) - iOS/IL2CPP: Implemented marshaling support for explicit struct layouts.
    • (670763) - iOS/IL2CPP: Implemented missing Marshal.PtrToStructure overload which takes object reference.
    • (671992), (667779) - iOS/IL2CPP: Implemented marshaling of the System.Runtime.InteropServices.HandleRef type.
    • (674057) - iOS: Fixed iPad Mini 3rd gen detection.
    • (670115) - iOS: Fixed on-screen keyboard not playing nicely with forced screen orientation.
    • (674115), (673324) - iOS: Fixed splash screen issues in non-Pro mode.
    • (668511) 672455) - iOS: Improved Xcode project parser robustness for invalid input.
    • (none) - Mono compiler: Fixed issue with incorrect IL being generated in some cases for iterator finally blocks.
    Thanks again for your continued bug investigations and submissions. We really appreciate them! We're planning to continue bug fixes in the next weekly patch release, 4.6.3p2.
     
    drawcode and maxthecat like this.
  28. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    @JoshPeterson Thanks for the info! I tried and now it works! We can finally test the IL2CPP build!

    And I've got the first problem with my NGUI input field. Seems like it doesn't read the value from it correctly. But first I'll update to the latest patch version, maybe the problem is fixed there. Else I'll try to create a test project.
     
  29. jeffsherwin

    jeffsherwin

    Joined:
    Aug 22, 2014
    Posts:
    47
    4.6.3p1 first build

    Code (CSharp):
    1. Undefined symbols for architecture arm64:
    2.   "_AsyncExec_runWithCallback_m3011_gp_1_0_0_0", referenced from:
    3.       GenInst_AsyncExec_runWithCallback_m3011_gp_1_0_0_0_Types in Il2CppGenericInstDefinitions.o
    4.      (maybe you meant: _GenInst_AsyncExec_runWithCallback_m3011_gp_1_0_0_0)
    5.   "_AsyncExec_runWithCallback_m3009_gp_0_0_0_0", referenced from:
    6.       GenInst_AsyncExec_runWithCallback_m3009_gp_0_0_0_0_Types in Il2CppGenericInstDefinitions.o
    7.      (maybe you meant: _GenInst_AsyncExec_runWithCallback_m3009_gp_0_0_0_0)
    8. ld: symbol(s) not found for architecture arm64
    9. clang: error: linker command failed with exit code 1 (use -v to see invocation)
     
  30. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    Does this occur with a project that you have already submitted in a bug? I've just tried the project with 669983, but it does not occur there. Thanks.
     
  31. jeffsherwin

    jeffsherwin

    Joined:
    Aug 22, 2014
    Posts:
    47
    @JoshPeterson

    No this is on my main project that built last week. I haven't isolated it.
    Simply downloaded 4.6.3.p1 and built my project. Thought maybe some symbols hadn't been included or were generated erroneously.

    will see if can isolate and build a test project

    thanks
     
  32. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    Thanks. We are currently investigating this issue on one project we have internally, but we don't have a cause or solution yet. The project that we have now is pretty large, so if you can provide an isolated example, that would be great. If we track down the cause sooner though, I'll let you know.
     
  33. jeffsherwin

    jeffsherwin

    Joined:
    Aug 22, 2014
    Posts:
    47
    @JoshPeterson

    Case 675689
    one button ad test minamalist project attached
    unity ads and facebook sdk 6.2.1 integrated

    same linker errors
    runs fine under mono

    seems like
    GenInst_AsyncExec_runWithCallback_m764_gp_1_0_0_0_Types
    is getting a prefix parsed off of it someplace maybe because I cannot find the symbol the linker is choking on in the gen'd code
     
    Last edited: Feb 26, 2015
  34. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    @JoshPeterson I'm also getting this error, slightly different:

    Code (CSharp):
    1. Undefined symbols for architecture arm64:
    2.   "_AsyncExec_runWithCallback_m4142_gp_1_0_0_0", referenced from:
    3.       GenInst_AsyncExec_runWithCallback_m4142_gp_1_0_0_0_Types in Il2CppGenericInstDefinitions.o
    4.      (maybe you meant: _GenInst_AsyncExec_runWithCallback_m4142_gp_1_0_0_0)
    5.   "_AsyncExec_runWithCallback_m4140_gp_0_0_0_0", referenced from:
    6.       GenInst_AsyncExec_runWithCallback_m4140_gp_0_0_0_0_Types in Il2CppGenericInstDefinitions.o
    7.      (maybe you meant: _GenInst_AsyncExec_runWithCallback_m4140_gp_0_0_0_0)
    8.  
     
  35. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    @Drowning Monkeys, @jeffsherwin Thanks. I have reproduced the problem locally. We are looking for a fix or work-around now.
     
  36. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    I can offer a work around that involves modifying the generated code. This should only be applied if the error reported by @Drowning Monkeys and @jeffsherwin are showing up. Based on what we know so far, this error happens with the UnityAds asset store package. It may happen in other cases as well though, but we have not discovered them.

    In the Il2CppTypeDefinitions.cpp file in the generated C++ code (located at <your build directory name>/Classes/Native/Il2CppTypeDefinitions.cpp) append the following lines of code:

    extern Il2CppGenericParamFull AsyncExec_runWithCallback_m764_gp_T_1_il2cpp_TypeInfo_GenericParamFull;
    Il2CppType AsyncExec_runWithCallback_m764_gp_1_0_0_0 = { &AsyncExec_runWithCallback_m764_gp_T_1_il2cpp_TypeInfo_GenericParamFull, 0, IL2CPP_TYPE_MVAR, 0, 0, 0 };

    extern Il2CppGenericParamFull AsyncExec_runWithCallback_m762_gp_T_0_il2cpp_TypeInfo_GenericParamFull;
    Il2CppType AsyncExec_runWithCallback_m762_gp_0_0_0_0 = { &AsyncExec_runWithCallback_m762_gp_T_0_il2cpp_TypeInfo_GenericParamFull, 0, IL2CPP_TYPE_MVAR, 0, 0, 0 };

    Note that the m762 and m764 parts of these declarations will change depending on the specific project. Those numbers are simply method counters. To apply this fix, you will need to get the proper values from the link error.

    Also, with each build from Unity, the Il2CppTypeDefinitions.cpp file will be overwritten, so you will need to apply this change each time.

    The problem occurs because IL2CPP is not correctly generating the code for these types. We have a fix ready, and we are in the process of making a build for those who need 4.6.3p1 and are impacted by this problem. Sorry for the inconvenience.
     
  37. jeffsherwin

    jeffsherwin

    Joined:
    Aug 22, 2014
    Posts:
    47
    @JoshPeterson

    Confirm workaround. Thanks for the super fast turn on this!
    Can continue regression.

    Is there a known issue around Dictionary<string,string>?
    Suddenly FB.API calls stopped working. Looks like maybe POST not handling dictionary . . .
     
  38. cwaspfst

    cwaspfst

    Joined:
    Feb 5, 2014
    Posts:
    11
    @JoshPeterson

    4.6.3p1 From the release notes, these are the fixes for iOS and iOS 64-bit issues:

    • (669983) - iOS/IL2CPP: Allow the LogInAsync method in the ParseSDK to work correctly.

    The LogInAsync method in the ParseSDK worked correctly on iPhone 5s, but not login on iPod4 (and I think on other 32-bit devices too).

    Also I can't get data from Parse on iPod without any login, but on iPhone 5s it works since 4.6.3f1 version.

    I tested new 4.6.3p1 version on small demo build, but I can't continue without Facebook login with my game, which should have been already released.
     
  39. HMXBuzz

    HMXBuzz

    Joined:
    Jul 9, 2013
    Posts:
    3
    Our plugin is SO CLOSE to working in the new IL2CPP for 64 bit iOS. Today's release of 4.6.3p1 solved a big bulk of our problems. Anyway... the issue that remains...

    We pass a pointer to an object from c# -> native code, and then return that pointer form native code -> c# in a callback. We get this 'pointer' to the c# object like this...

    mHandle = GCHandle.Alloc(obj, GCHandleType.Pinned);
    SetCallback(sCallback, GCHandle.ToIntPtr(mHandle)); ​

    Here, sCallback is a static c# function that eventually gets called from the native code side. In that static function, the 'pointer' is turned back into a reference to a c# object like this...

    GCHandle handle = GCHandle.FromIntPtr(obj);
    MidiPlayCursorInterface cursor = (handle.Target as MidiPlayCursorInterface);​

    The resulting 'cursor' is the c# object in question, and we can start calling functions on that instance.

    Notice the ToIntPtr / FromIntPtr pair in those two code snippets above.

    OK... so the code above works fine on all platforms using the mono interpreter. But when we switch to IL2CPP, we get an exception thrown one this line...

    mHandle = GCHandle.Alloc(obj, GCHandleType.Pinned);​

    The exception looks like this...

    ArgumentException: Object contains non-primitive or non-blittable data.
    at System.Runtime.InteropServices.GCHandle.GetTargetHandle (System.Object obj, Int32 handle, GCHandleType type) [0x00000] in <filename unknown>:0
    at System.Runtime.InteropServices.GCHandle..ctor (System.Object value, GCHandleType type) [0x00000] in <filename unknown>:0
    at System.Runtime.InteropServices.GCHandle.Alloc (System.Object value, GCHandleType type) [0x00000] in <filename unknown>:0


    We tried adding...
    [StructLayout(LayoutKind.Sequential)]
    ... to the object we are trying to pin, and it still doesn't work. And again... the pinning works fine with the mono interpreter.

    Already submitted as a bug using the bug tool, but if anyone has any ideas I'd appreciate it.

    - Buzz
     
  40. JoshPeterson

    JoshPeterson

    Unity Technologies

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

    We're still trying to working on the Facebook/Parse log in issues along with the Parse developers. I don't have any more details about a possible fix yet though.

    As for the Parse data on iPod4 and other 32-bit devices, does the same code work with the Mono scripting backend? If so, could you submit a bug? I'm worried that we might have an IL2CPP bug on 32-bit only. Thanks.
     
  41. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    I tried this, I think it worked at some point and the game run on iPad. But now I'm getting these kind of errors related to UnityAds.

    Code (csharp):
    1. Undefined symbols for architecture armv7:
    2.  
    3.   "_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
    4.  
    5.       _OBJC_CLASS_$_CustomStoreProductViewController in UnityAds(UnityAds)
    6.  
    7.   "_OBJC_METACLASS_$_SKStoreProductViewController", referenced from:
    8.  
    9.       _OBJC_METACLASS_$_CustomStoreProductViewController in UnityAds(UnityAds)
    10.  
    11. ld: symbol(s) not found for architecture armv7
    12.  
    13. clang: error: linker command failed with exit code 1 (use -v to see invocation)
     
  42. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Hi,

    Mono doesn't throw, but it doesn't mean that's correct behaviour. It throws because your object has other reference types inside, which means it cannot be pinned (check MSDN documentation for GC.HandleAlloc, it should contain the details). If we didn't throw in this case, we could seriously compromise the garbage collector's work.

    However, I cannot understand why you're trying to use "Pinned" GC handle - from what you're describing, you could just use regular GC handle and your scenario should then 'just work'. Pinned type is needed only if you're using "GetAddressOfPinnedObject" method, which you don't seem to be doing.
     
  43. yuhe

    yuhe

    Joined:
    Dec 20, 2012
    Posts:
    11
    I thought the issue with recursive generics was solved in 4.6.3? An empty project with just the Smooth.Foundations library from the asset store still stops at "Postprocessing Player". 1 hour now...
     
  44. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    @JoshPeterson I'm still getting bug #672232 - Do you know when they will address this? I'd love to ship! :)
     
  45. drawcode

    drawcode

    Joined:
    Jul 21, 2008
    Posts:
    72
    I think @joncham addressed this as a problem but the workaround was to not use: GCHandleType.Pinned in the alloc.

    EDIT: Oops didn't see Tautvydas Zilys already answer, I should refresh before commenting. Discourse does this auto which is pretty cool.
     
    Last edited: Feb 27, 2015
  46. cwaspfst

    cwaspfst

    Joined:
    Feb 5, 2014
    Posts:
    11
    http://fogbugz.unity3d.com/default.asp?675805_jdhgvr9i2m89fum9
     
  47. SunstormJared

    SunstormJared

    Joined:
    Jan 30, 2013
    Posts:
    4
    For those who ran into any issues with: System.Activator.CreateInstance

    I'd highly recommend looking into System.Array.CreateInstance as an alternative. We ran into some problems with System.Activator.CreateInstance failing to find the default constructor for an array of a custom class. Passing the ElementType to System.Array.CreateInstance solved our problem. Others have commented on this issue, so I thought I'd mention an alternative.
     
  48. rjeon

    rjeon

    Joined:
    Feb 11, 2015
    Posts:
    6
    @Lucas Meijer @JoshPeterson
    Is there any progress for bug case(671702)?
    Our game is about to release in March.
    Because of that reason, I'd love to know how it is going on, so we can make a plan when we can upload to store to review.
     
  49. AGaming

    AGaming

    Joined:
    Dec 26, 2013
    Posts:
    103


    Patch 4.6.1p1 IL2CPP - Error Mono 2.x - OK
    Patch 4.6.1p2 IL2CPP - Error Mono 2.x - OK
    Patch 4.6.1p3 IL2CPP - Error Mono 2.x - OK
    Patch 4.6.1p4 IL2CPP - Error Mono 2.x - OK
    Patch 4.6.1p5 IL2CPP - Error Mono 2.x - OK
    Unity 4.6.2 IL2CPP - Error Mono 2.x - OK
    Patch 4.6.2p1 IL2CPP - Error Mono 2.x - OK
    Patch 4.6.2p2 IL2CPP - Error Mono 2.x - OK
    Unity 4.6.3 IL2CPP - Error Mono 2.x - OK
    Patch 4.6.3p1 IL2CPP - Error Mono 2.x - OK



    As we say in Ukraine, left to take the soap and rope. :mad:




     
    Last edited: Feb 27, 2015
  50. play_with_wolf

    play_with_wolf

    Joined:
    Aug 26, 2014
    Posts:
    36
    ThreadPool, Asynchronous Sockets, WebRequest still can't work and we use TNet Socket but it can't work~~