Error when running Example Network Discovery
See original GitHub issueHi,
Im getting this error on Server when Client is Searching for a Server, this on Both Apple M1 and Windows. port on NetworkManager: 7770 and local IP Port on ExampleNetworkDiscovery: 47777
Any ideas?
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 ()
Issue Analytics
- State:
- Created 9 months ago
- Reactions:3
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Can't turn on Network Discovery - Windows Client
Cause. This issue occurs for one of the following reasons: The dependency services for Network Discovery aren't running. The Windows firewall ...
Read more >Network Discovery runs in a loop and resulted as error/stale
PROBLEM: Network discovery runs in a loop and later the status becomes STALE. IDENTIFICATION: Example: Sample discovery logs from <Traverse_Home>\topology\ ...
Read more >6 Ways To Fix "Network Discovery Is Turned Off" In ...
How to fix “Network discovery is turned off” error · Restart the computer · Choose the right sharing mode · Start dependency services...
Read more >Network Computers are not Showing Up in Windows 10/11
Go to Control Panel -> Network and Sharing Center -> Change advanced sharing settings (you can run the command: control.exe /name Microsoft.
Read more >Unable to run network discovery on additional poller
Network discovery cannot be run on the Web Console when selecting the additional poller as the engine. The following error messages may be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue occurs because the
FastBufferWriter
usesAllocator.Temp
for the memory allocation which very likely results in the memory handle becoming invalid at the end of the current frame (the backing memory for theFastBufferWriter
is disposed before theFastBufferWriter
using that memory is disposed). Since this is an async method, there is no guarantee the function will complete within 1 frame. If theSendAsync
function doesn’t return immediately, then the error will occur.To fix this, change
Allocator.Temp
toAllocator.Persistent
when creating aFastBufferReader
orFastBufferWriter
inside of an async function. For example, this is whatReceiveBroadcastAsync
should look like:The
ReceiveResponseAsync
method should also be updated accordingly.Unfortunatly the same 😦