question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with basic server example for Unity

See original GitHub issue

Hey there!

I’m trying to put together a basic Unity package with some niceties for people that want to use this library. You can find the starting point here. However, I’m trying to port your simple server example to more idiomatic Unity, but it’s currently crashing on play here:

Application Specific Information:
libGameNetworkingSockets.dylib
abort() called
terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument

Thread 0 Crashed:: tid_307  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff5e783b66 __pthread_kill + 10
1   libsystem_pthread.dylib       	0x00007fff5e94e080 pthread_kill + 333
2   libsystem_c.dylib             	0x00007fff5e6df1ae abort + 127
3   libmonobdwgc-2.0.dylib        	0x000000013e5aa4b2 mono_handle_native_crash + 585
4   libsystem_platform.dylib      	0x00007fff5e941f5a _sigtramp + 26
5   com.unity3d.UnityEditor5.x    	0x0000000100020008 floor1_encode + 696
6   libsystem_c.dylib             	0x00007fff5e6df1ae abort + 127
7   libc++abi.dylib               	0x00007fff5c5d9f8f abort_message + 245
8   libc++abi.dylib               	0x00007fff5c5da113 default_terminate_handler() + 241
9   libobjc.A.dylib               	0x00007fff5da1beab _objc_terminate() + 105
10  libc++abi.dylib               	0x00007fff5c5f57c9 std::__terminate(void (*)()) + 8
11  libc++abi.dylib               	0x00007fff5c5f526f __cxa_throw + 121
12  libc++.1.dylib                	0x00007fff5c5c87af std::__1::__throw_system_error(int, char const*) + 77
13  libc++.1.dylib                	0x00007fff5c5bac93 std::__1::mutex::lock() + 29
14  libc++.1.dylib                	0x00007fff5c5bb118 std::__1::recursive_timed_mutex::lock() + 42
15  libGameNetworkingSockets.dylib	0x0000000120635a40 SteamNetworkingSocketsLib::SteamDatagramTransportLock::Lock() + 16 (steamnetworkingsockets_lowlevel.cpp:75)
16  libGameNetworkingSockets.dylib	0x0000000120626f95 SteamNetworkingSocketsLib::EnsureConfigValueTableInitted() + 53 (steamnetworkingsockets_lowlevel.h:354)
17  libGameNetworkingSockets.dylib	0x000000012062761f SteamNetworkingSocketsLib::CSteamNetworkingSockets::CSteamNetworkingSockets() + 447 (vector:1471)
18  libGameNetworkingSockets.dylib	0x000000012062cd48 _GLOBAL__sub_I_csteamnetworkingsockets.cpp + 2360 (csteamnetworkingsockets.cpp:1239)

Wondering if you have any insight into why this may be happening! Also, not sure if it would be an issue with the wrapper or the main lib. Worth nothing I’m working from a compiled dylib file on OSX, compiled with the latest master from the main repo.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kkukshtelcommented, Mar 28, 2019

Can confirm I’m seeing this fix per this commit: https://github.com/ValveSoftware/GameNetworkingSockets/commit/1c511b10aa7b529cc6aecf250644607d75330601

I’ll close the issue for now.

1reaction
zpostfactocommented, Mar 28, 2019

That bug should be fixed now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting servers
For example, if you notice that servers running this build configuration lag or exhibit performance issues, increase the CPU or RAM.
Read more >
COMPLETE Unity Multiplayer Tutorial (Netcode for ... - YouTube
If you're having trouble with the new setup of NetworkManager's Network Prefabs Lists like I did, you need to add a NetworkPrefabsList to ......
Read more >
Run your Servers like a PRO! (Unity Game Server ... - YouTube
I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity ... ( Unity Game Server Hosting Multiplayer Tutorial...
Read more >
Create a server for your Unity game using .NET Core - YouTube
Create a custom server using .NET Core and host it in the cloud to act as your games backend. A custom server specifically...
Read more >
Network Clients and Servers
The local client uses the same Unity scenes and objects as the server, and communicates internally using message queues instead of sending messages...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found