You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A NullReferenceException gets thrown exactly once on a client when we start our app - maybe before the client is connected. It originates from HlapiClient.cs:95 because "connection" is null.
private bool Send(ArraySegment<byte> packet, byte channel)
{
if (_network.PreprocessPacketToServer(packet))
return true;
var length = _network.CopyPacketToNetworkWriter(packet, _sendWriter);
// the next line is line 95
if (!NetworkManager.singleton.client.connection.SendBytes(_sendWriter.AsArray(), length, channel))
{
return false;
}
return true;
}
Expected Behavior
No exceptions or errors thrown on startup.
Actual Behavior
A NullReferenceException when the client tries to use connection before it is available (probably before it is connected?).
Your Environment
Dissonance version used: 3.0.0
Unity version: 5.6.0f3 (64 bit)
Editor Operating System and version: Windows 7
Build Settings: Tested only in Editor
The text was updated successfully, but these errors were encountered:
TobiasWehrum
changed the title
NullReferenceException
NullReferenceException in HlapiClient:95 when client starts
Aug 30, 2017
Since this is a duplicate of #48 I'll close it now. If you want to get alerts about comments in that thread click the "subscribe" button on the right of the issue.
Context
A NullReferenceException gets thrown exactly once on a client when we start our app - maybe before the client is connected. It originates from HlapiClient.cs:95 because "connection" is null.
Expected Behavior
No exceptions or errors thrown on startup.
Actual Behavior
A NullReferenceException when the client tries to use connection before it is available (probably before it is connected?).
Your Environment
The text was updated successfully, but these errors were encountered: