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.

Error when Client searches for server in NetworkDiscovery

Discussion in 'Netcode for GameObjects' started by MrPure3D, Dec 15, 2022.

  1. MrPure3D

    MrPure3D

    Joined:
    Apr 1, 2014
    Posts:
    10
    Hi,

    Using the Community Example NetworkDiscovery package, Im getting this error on Server when Client is Searching for a Server, this on Both Apple M1 and Windows.

    Invalid allocation label passed to UnsafeUtility::Free
    UnityEngine.StackTraceUtility:ExtractStackTrace ()
    Unity.Netcode.FastBufferWriter:Dispose () (at Library/PackageCache/com.unity.netcode.gameobjects@1.2.0/Runtime/Serialization/FastBufferWriter.cs:125)
    NetworkDiscovery`2/<ReceiveBroadcastAsync>d__27<DiscoveryBroadcastData, DiscoveryResponseData>:MoveNext () (at Library/PackageCache/com.community.netcode.extensions@e9f53f86a0/Runtime/NetworkDiscovery/NetworkDiscovery.cs:224)
    UnityEngine.UnitySynchronizationContext:ExecuteTasks ()

    port on NetworkManager: 7770 and local IP
    Port on ExampleNetworkDiscovery: 47777

    Any help appreciated!
     
  2. designico

    designico

    Joined:
    Apr 2, 2013
    Posts:
    13
    Hi man! I guess I have a very similar problem here. I'm also using Netcode For GameObjects. And sometime I can't connect with the Client and I get this error on the Host:

    Invalid allocation label passed to UnsafeUtility::Free
    UnityEngine.StackTraceUtility:ExtractStackTrace ()
    Unity.Netcode.FastBufferWriter:Dispose () (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Serialization/FastBufferWriter.cs:125)
    NetworkDiscovery`2/<ReceiveBroadcastAsync>d__27<DiscoveryBroadcastData, DiscoveryResponseData>:MoveNext () (at Assets/__Own Shared Assets/Scripts/Network/NetworkDiscovery/NetworkDiscovery.cs:224)
    UnityEngine.UnitySynchronizationContext:ExecuteTasks ()

    I'm pretty much stuck with this, since I'm not a experience network developer. Any hint would be more than awesome.