64 bit iOS support for PUN+

Hi,
Because PUN+ use native library and 64 bit is mandatory now on iOS there is a question:
Will you provide a library with 64 bit slice and any ETA would be great.

Thank you.

Comments

  • Hello,

    According to my understanding, when you build a static library for iOS (and Apple OS in general) you can configure the build so that the library is universal, so that you end up with only one binary (in that case the static library) for both 32 bits and 64 bits OS. So I assume they would do so, if the library is not actually universal, maybe it is already.

    But I can be wrong, so let's see what Photon's official (Tobias) will say.

    I would also want to know what about Android :)? I don't think the same universal strategy can be applied.

    Regards,
    Don T.
  • Any answer pls ?

    Don T.
  • OK, I've managed build it somehow with Unity 4.6.1p5. But during runtime PUN+ is completely broken. it's generate a lot of exceptions during connection phase:

    SynchronizationLockException: Object has not been locked by this thread.
    at ExitGames.Client.Photon.PhotonPeer.SendOutgoingCommands () [0x00000] in <filename unknown>:0
    at PhotonHandler.Update () [0x00000] in <filename unknown>:0
    (Filename: currently not available on il2cpp Line: 4294967295)

    and


    Receive issue. State: Connected Exception: System.Threading.SynchronizationLockException: Object has not been locked by this thread.
    at System.Threading.Monitor.Exit (System.Object obj) [0x00000] in <filename unknown>:0
    at ExitGames.Client.Photon.SocketUdpNativeStatic.ReceiveLoop () [0x00000] in <filename unknown>:0
    at System.Threading.ThreadStart.Invoke () [0x00000] in <filename unknown>:0
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:LogError(Object)
    PhotonHandler:DebugReturn(DebugLevel, String)
    NetworkingPeer:DebugReturn(DebugLevel, String)
    ExitGames.Client.Photon.<>c__DisplayClass2:<EnqueueDebugReturn>b__0()
    ExitGames.Client.Photon.MyAction:Invoke()
    ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    PhotonHandler:Update()

    (Filename: /Users/builduser/buildslave/unity/build/artifacts/iPhonePlayer-armv7-il2cppGenerated/UnityEngineDebug.cpp Line: 56)
    ExceptionOnReceive while connecting to: ns.exitgamescloud.com:5058. Check if the server is available.
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:LogWarning(Object)
    NetworkingPeer:OnStatusChanged(StatusCode)
    ExitGames.Client.Photon.<>c__DisplayClass6:<EnqueueStatusCallback>b__4()
    ExitGames.Client.Photon.MyAction:Invoke()
    ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    PhotonHandler:Update()

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


    Any suggestions what should I do?
  • PUN Free is only using C# sockets, so it should export to 64 bit iOS just fine.
    The native libraries in PUN+ are not 64 bit compatible and will break.

    We will update PUN+ as soon as we can. We have the fitting libraries ready but the integration and testing in Unity will take 1 or 2 weeks, I guess.

    The Threading issue is interesting. Does it also happen for 32 bit exports?? Can you please give that a short try?
    Thanks!
  • The Threading issue is interesting. Does it also happen for 32 bit exports?? Can you please give that a short try?
    Thanks!

    Everythink works just fine in 32bit mono backend. I've informed Unity guys - they'e working on fix it.
  • Thanks for the update. If you get feedback when that's done AND you remember this thread, please post here which version got the fix.
    :)
  • Are there any updates regarding this issue? I am using PUN Free (haven't tried PUN+ on this particular project as I figured it wouldn't make a difference). 4.6.2p2 seems to resolve the "Receive issue. State: Connected Exception: System.Threading.SynchronizationLockException: Object has not been locked by this thread" error, however while it does still break in the same spot, I am instead getting a timeout error.
    2015-02-14 11:17:22.586 superkartmania&#91;458:278542&#93; -&gt; registered mono modules 0x1011b79c0
    
    -&gt; applicationDidFinishLaunching()
    
    PlayerConnection initialized from /private/var/mobile/Containers/Bundle/Application/C43EEC6E-0140-4050-A651-2F2208538EA6/superkartmania.app/Data (debug = 0)
    
    PlayerConnection initialized network socket : 0.0.0.0 55000
    
    Multi-casting "&#91;IP&#93; 10.98.31.54 &#91;Port&#93; 55000 &#91;Flags&#93; 2 &#91;Guid&#93; 3232248216 &#91;EditorId&#93; 1068971085 &#91;Version&#93; 1048832 &#91;Id&#93; iPhonePlayer(B-iPhone-6):56000 &#91;Debug&#93; 0" to &#91;225.0.0.222:54997&#93;...
    
    -&gt; applicationDidBecomeActive()
    
    Requesting Resolution: 1334x750
    
    Init: screen size 1334x750
    
    Initializing Metal device caps
    
    Initialize engine version: 4.6.2p2 (dd892804f688)
    
    WARNING: Shader Unsupported: 'Reflective/VertexLit' - Pass 'BASE' shader state not supported
    
    UnloadTime: 12.255750 ms
    
    System memory in use before: 19.1 MB.
    
    Unloading 5 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)
    
    System memory in use after: 18.3 MB.
    
    
    
    Unloading 30 unused Assets to reduce memory usage. Loaded Objects now: 4451.
    
    Total: 6.597875 ms (FindLiveObjects: 0.855458 ms CreateObjectMapping: 0.108541 ms MarkObjects: 1.778750 ms  DeleteObjects: 3.294250 ms)
    
    
    
    TimeoutDisconnect while connecting to: ns.exitgamescloud.com:5058. Check if the server is available.
    
    Replacements.Attribute:CheckParameters(Object, Type)
    
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    
    UnityEngine.Debug:LogWarning(Object)
    
    NetworkingPeer:OnStatusChanged(StatusCode)
    
    ExitGames.Client.Photon.EnetPeer:SendOutgoingCommands()
    
    ExitGames.Client.Photon.PhotonPeer:SendOutgoingCommands()
    
    PhotonHandler:Update()
    
    Replacements.Attribute:CheckParameters(Object, Type)
    
    

    This works fine on other platforms, and I do have internet on my iOS device. I'll keep trying the new Unity patches as they come out, but I'm just wondering if this is a Photon issue instead? Thanks!
  • I reported this as bug last week and Team Unity is working on fixes. I hope they get it done for 4.6.2p3 but of course I can't be sure. I'm waiting and we will test that, asap.

    In doubt, you could report the issue and include a description how things work on the other platforms ("what should happen"). You can ask them to get a whole test project to run instead of just a single bug (this would imply to fix and subsequent bugs, too). Maybe that's not a bad thing.
  • Is this working yet?
    I'm having a similar issue. I'm using the PUN free. I made a build with the latest unity version (4.6.3f1) to iOS 64bit using il2cpp, but when I try to connect to the exit game servers I get a timeout message saying it failed to connect. It works fine on anything that isn't built with il2cpp. But I just wanted to check if it's me doing something wrong or is it just Unity not fully supporting what photon requires to work yet.

    It's a showstopper for me so if there is a workaround, I'd love to know about it.
  • Hi Dunmord.

    We are still waiting for a fix from the people at Unity3d.
  • Hello,

    Just to confirm, so this is not working even with this Unity release?
    http://blogs.unity3d.com/2015/02/19/uni ... p-for-ios/

    Cheers,
    Don T.
  • dontonka wrote:
    Hello,

    Just to confirm, so this is not working even with this Unity release?
    http://blogs.unity3d.com/2015/02/19/uni ... p-for-ios/

    Cheers,
    Don T.

    Yep, not even with 4.6.3.
    Kaiserludi wrote:
    Hi Dunmord.

    We are still waiting for a fix from the people at Unity3d.

    Thanks for such a quick response Kaiserludi. What about PUN+. Has PUN+ been updated to work with l2cpp?
  • Hi dontonka && Dunmord.

    - PUN Free and PUN+ both work with Unity 4.5 (However, as you know, Unity 4.5 does only offer Mono 2.0 and does not support arm64).
    - PUN Free does not work at all with Unity 4.6.2-4.6.2.p2, neither with Mono nor with IL2CPP, due to various bugs in Unity itself that have been introduced when IL2CPP support has been built in.
    - Unity 4.6.3 has fixed a bug that prevented PUN Free from working when using Mono 2.0; however there are still open bugs that prevent PUN Free from working with IL2CPP and therefor also from working with arm64 (as Unity only supports arm64 with IL2CPP)
    - there are still different open bugs in Unity that prevent PUN+ from working with IL2CPP, both, for arm7 and for arm64, while PUN+ does work with Mono 2.0

    Unfortunately all these bugs are inside Unity itself and not in PUN, so we can't do much on our side except of waiting for patches from their side, testing each new Unity release and communicating our test results to Unity3D.
  • Thanks Kaiserludi, that's clear sir :).

    I'm using Unity 4.5 latest and PUN+ latest, and building for 32 bits still so I'm not block because of this, but I'll be maybe in about 2 months, but i assume in that timeframe, all will be good :).

    Cheers,
    Don T.
  • Thanks Kaiserludi. Hopefully it won't take more than a couple of weeks.
  • Update:
    Still not fixed in 4.6.3p1
  • Bumping this, got a little bit of news out of Unity, they're looking into other stuff in the Sockets implementation of IL2CPP:

    http://forum.unity3d.com/threads/4-6-io ... st-2003617
  • Update:

    4.6.3p2 fixes all IL2CPP issues with both, PUN Free and PUN+. At least we can't reproduce them in our tests with that version.

    5.0.0 Final is showing the same issues that 4.6.3 and 4.6.3p1 had. According to forum.unity3d.com/threads/4-6-ios-64-bit-beta.290551/page-22#post-2003617 the first Unity 5 patch release will provide the fixes from 4.6.3p2 for Unity 5 and should be expected for some time this week.
  • Kaiserludi wrote:
    Update:

    4.6.3p2 fixes all IL2CPP issues with both, PUN Free and PUN+. At least we can't reproduce them in our tests with that version.

    5.0.0 Final is showing the same issues that 4.6.3 and 4.6.3p1 had. According to forum.unity3d.com/threads/4-6-ios-64-bit-beta.290551/page-22#post-2003617 the first Unity 5 patch release will provide the fixes from 4.6.3p2 for Unity 5 and should be expected for some time this week.

    Hawt, just came back here to check if you had tested with p2, and ditto on 5.0, should be fixed this week still! Hooray! :mrgreen:

    :ugeek:
  • Ok, bad news, I have a bare-bones test project where I merely connect to your network and then PhotonNetwork.JoinRandomRoom().

    It crashes about 50% of the time with some .NET sockets exception still.

    Project literally does nothing else, just submitted a new bug report.

    This is using 5.0.0p1, which should be inline with 4.6.3p2.
  • We updated PUN to version 1.51 in the Asset Store. PUN+ includes a new 64bit library for iOS. Maybe some changes also work out better in PUN Free.
    http://u3d.as/2ey

    Thanks for reporting the issue to Unity. I guess they will be quick to roll out new patches in the next weeks.
  • Please ellaborate: PUN+ is using a different 64-bit lib for iOS than PUN Free now?

    I'm testing with PUN free right now, and I can reproduce the crash consistently on my iPad, even with 4.6.3p2 !
    [EDIT] I am using PUN Free 1.51 [/EDIT]

    My test project literally only connects and runs JoinRandomRoom and then CreateRoom when that fails, and it crashes about 80% of the time on 4.6.3p2 and 5p1.
  • PUN Free is always using C# sockets, but PUN+ is using C++ sockets on iOS/Android as C# sockets are not available there with the free version of Unity 4. For those C++ sockets we have separate C++ libraries inside a subfolder in PUN+, that we access through Unity3Ds native plugin interface and Tobias is referring to those C++ libraries, which have been 32bit only with PUN+ 1.50 and also support 64bit on iOS with PUN+ 1.51.

    As PUN Free does not use C++ sockets at all, it simply does not contain any C++ native plugin lib that could be updated to offer 64bit support.
  • I understand now. Unity 5 does not have that limitation with the free version though, right?

    Also, can you confirm if PUN+ is working properly with Unity 5.0p1 and 4.6.3p2 or p3?
  • PUN+ is working properly for me with 4.6.3p2. I haven't tested it with the other mentioned Unity versions.
    Tobias should be able to provide you with more information about them.
    Unity 5 does not have that limitation with the free version though, right?
    Telling from their new Unity 5 license terms this is indeed not the case anymore for Unity 5.