Search Unity

Creating a match through UNET Match maker on WSA causes AccessViolationException

Discussion in 'UNet' started by gilead, Nov 30, 2015.

  1. gilead

    gilead

    Joined:
    Oct 14, 2014
    Posts:
    13
    To recreate, you can either create your own project (steps below) or clone this gitrepo: https://bitbucket.org/janne_rasanen/matchmakerwsa/src

    Steps to recreate in Unity:
    1. Create empty gameobject, add NetworkManager component
    2. Create new prefab with NetworkIdentity component, name it player
    3. Drag the player prefab to the NetworkManager as player prefab under Spawn Info
    4. Add the script below as new component to the same gameobject (with name CreateMatch):


    5. Save scene
    6. Build for WSA (8.1, local machine, leave debugging options unchecked)

    7. Open the solution in VS
    8. In VS, Under Package.appxmanifest -> Capabilities, check Internet (client) and Internet (client & server)
    9. Debug on local machine

    When debugging, I get AccessViolationException once the start script runs. This happens both on desktop and phone.

    Exception thrown at 0x02484668 in matchmaker.exe: 0xC0000005: Access violation executing location 0x02484668.
    The Common Language Runtime cannot stop at this exception. Common causes include: incorrect COM interop marshalling and memory corruption. To investigate further use native-only debugging.
    An unhandled exception of type 'System.AccessViolationException' occurred in Unknown Module.
    Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    When debugging in native only, I get exception:
    Exception thrown at 0x025D38A0 in matchmaker.exe: 0xC0000005: Access violation executing location 0x025D38A0.

    When the exception breaks, call stack has a bunch of Unity coroutine functions, and on top of them WWWDelayCall::Callback (screenshot of the call stack in attachments).

    Inside editor (and on other platforms) the script runs correctly and outputs "Created game: true" in the console.

    Yeah, I've made a bug report of it, but posting this hoping someone might have ideas or suggestions here.
     

    Attached Files:

  2. tenttu

    tenttu

    Joined:
    Sep 22, 2015
    Posts:
    19
    No one is looking into this?

    Would be then at least nice to state that the Matchmaking is not working with Windows Universal apps.

    The managed callstack for the exeception is:
    Code (CSharp):
    1.    at UnityEngineProxy.InternalCalls.NetworkTransport_CUSTOM_ConnectAsNetworkHost(Int32 hostId, String address, Int32 port, Int32 network, Int32 source, Int32 node, IntPtr error)
    2.    at UnityEngine.Networking.NetworkTransport.ConnectAsNetworkHost(Int32 hostId, String address, Int32 port, NetworkID network, SourceID source, NodeID node, Byte& error)
    3.    at UnityEngine.Networking.NetworkServer.InternalListenRelay(String relayIp, Int32 relayPort, NetworkID netGuid, SourceID sourceId, NodeID nodeId, Int32 listenPort)
    4.    at UnityEngine.Networking.NetworkServer.Listen(MatchInfo matchInfo, Int32 listenPort)
    5.    at UnityEngine.Networking.NetworkManager.StartServer(MatchInfo info, ConnectionConfig config, Int32 maxConnections)
    6.    at UnityEngine.Networking.NetworkManager.StartServer(MatchInfo info)
    7.    at UnityEngine.Networking.NetworkManager.StartHost(MatchInfo info)
    8.    at UnityEngine.Networking.NetworkManager.OnMatchCreate(CreateMatchResponse matchInfo)
    9.    at CreateMatch.<>c__DisplayClass1.<Start>b__0(CreateMatchResponse matchInfo)
    10.    at UnityEngine.Networking.Match.NetworkMatch.<ProcessMatchResponse>d__5`1.MoveNext()
    11.    at UnityEngine.Internal.$MethodUtility.$Invoke790(Int64 instance, Int64* args)
    12.    at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
     
    Last edited: Dec 14, 2015
  3. asperatology

    asperatology

    Joined:
    Mar 10, 2015
    Posts:
    981
    They are asleep at the moment. Best to wait at least 24 hours to be sure they really saw these threads.
     
  4. Rostam24

    Rostam24

    Joined:
    Mar 5, 2014
    Posts:
    119
    Ah thank you for this thread! Glad it's just not just me :)
     
  5. tenttu

    tenttu

    Joined:
    Sep 22, 2015
    Posts:
    19
    Could anyone from Unity check this?
     
  6. asperatology

    asperatology

    Joined:
    Mar 10, 2015
    Posts:
    981
    It takes quite some time for them to wade through a LOT of these errors being reported.
     
  7. Rostam24

    Rostam24

    Joined:
    Mar 5, 2014
    Posts:
    119
    @gilead : you mentioned you created a bug report? I couldn't find it in the Unity issues list, could you send me a link (if you have it)?
     
  8. tenttu

    tenttu

    Joined:
    Sep 22, 2015
    Posts:
    19
  9. gilead

    gilead

    Joined:
    Oct 14, 2014
    Posts:
    13
    Yeah. The report was submitted 11/25/2015, and it's still listed with status "Open" with no contact from Unity in the FogBugz system. In case you're interested, you can reproduce the problem using the steps in the first post of this thread.
     
  10. Rostam24

    Rostam24

    Joined:
    Mar 5, 2014
    Posts:
    119
    The newest patch release fixes the issue! Awesome, I'm very happy :)