ReceiveMessagesOnConnection from a worker thread with delayed SteamNetworkingMessage_t::Release()
Using the SteamAPI. I'm using a worker thread to read and process received messages from ReceiveMessagesOnConnection, this is done in such a way that the matching SteamNetworkingMessage_t::Release() may be a bit later. At times the main thread calls RunCallbacks, when this triggers the SteamNetConnectionStatusChangedCallback_t callback to notify the connection has been closed, the worker thread may not have called release yet and may do so soon, i've had crashes in the native dll in this region and i'm wondering if there is a thread safety issue here where the connection getting closed on the main thread doesn't allow the worker thread to receive and release concurrently.
You should be able to call release from any thread at any time. Once the API gives a message to you, it is all yours. Release() should not need to take any expensive locks, although it may need to do heap operations.
Do you have a stack trace or dump I can look at?