nhn / socket.io-client-unity3d

socket.io-Client for Unity3D, which is compatible with socket.io v1.x
Other
167 stars 43 forks source link

Object reference not set to an instance of an object #33

Open purnamasari opened 5 years ago

purnamasari commented 5 years ago

This problem isn't always come but sometimes when it happened, I can't even send any data string. I can't force disconnect and reconnect to refresh the socket. The problem came from WebSocket.GetLastError(). Is anyone know how fix this?

sfranzyshen commented 5 years ago

are you getting this error while in the editor ... and editing a file??? that's the only time I have experienced it ... maybe some additional information could help ...

purnamasari commented 5 years ago

Yes, I mostly get this error when I running on editor mode and editing some file. But sometime this problem occurred when I received data and then I get some error that causing editor hang for a second, then the error keeps stacking.

Just wondering is this safe if I ignore this and build it? Beside it, everything works fine.

sfranzyshen commented 5 years ago

i guess if you are able to compensate for the problem within your software ... it's safe ... but if it were me ... i would track it down ... just to be sure it doesn't impact performance or reliability ... some more testing to try and narrow down what causes it or when the error happens ... this plugin depends on the websocket-sharp project (where the error is originating) perhaps someone over there would have some insight ... https://github.com/sta/websocket-sharp/issues/284 keep us updated as I'm not plagued with this problem ... but it does pop up from time to time and should be best stomped out ;)