ddevault / Craft.Net

(Unmaintained, see TrueCraft) Minecraft server, client, and etc for .NET
MIT License
228 stars 64 forks source link

Server crashes when dereferencing disconnected client #155

Closed aholmes closed 11 years ago

aholmes commented 11 years ago

EntityOnPropertyChanged will throw an exception when trying to send a packet to a disconnected client.

Debugger:Exception Intercepted: EntityOnPropertyChanged, EntityManager.cs line 236 An exception was intercepted and the call stack unwound to the point before the call from user code where the exception occurred. "Unwind the call stack on unhandled exceptions" is selected in the debugger options. Time: 5/24/2013 6:56:25 PM Thread:Worker Thread[6548]

Steps to reproduce:

1) Enter world as a client 2) Kill yourself 3) This will cause you to spawn below the world and die forever. issue #154. 4) Disconnect your client 5) The next death triggers a new EntityOnPropertyChanged call on the now disconnected client, which is returned as null from GetClient.

aholmes commented 11 years ago

Sorry, I'm an idiot and not familiar with Visual Studio. This is indeed a Craft.Net issue.

ddevault commented 11 years ago

Fixed by #156