Cuberite Forum

Full Version: Sending packets to deallocated cClientHandle
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Server can send packets to a cClientHandle that no longer exists, a dangling pointer.

It happens in cChunk::Broadcast, but it crashes somewhere deeper in the stack.

[Image: Screenshot-2012-03-17_11.57.53.png]

Something to note is that the server was updating .pak files from version 2 to 3. A client disconnected somewhere in the middle of conversion (thought it has a different address than the dangling pointer), and the server crashes after conversion was done.

Simply put, cChunk had a dangling pointer in m_LoadedByClient
You could have captured a crashdump for later analysis. Without it there's not much I can do.
And how did the client disconnect? If it was already downloading terrain, then it shouldn't disconnect (we answer to keepalives) and the client has no GUI for disconnecting at that state, other than closing the client altogether.
(03-18-2012, 12:36 AM)xoft Wrote: [ -> ]And how did the client disconnect? If it was already downloading terrain, then it shouldn't disconnect (we answer to keepalives) and the client has no GUI for disconnecting at that state, other than closing the client altogether.

When the player is already in the game, and moves to somewhere that hasn't been converted yet, the player can simply press escape and disconnect
Right, somehow I thought you were referring to the initial connection phase.

Well, anyway, I'm afraid you're on your own on this one, as I haven't seen such a failure happen yet.
I tried to track down why this happened, but I can't find a reason Sad