data packet too big crash

Post here your questions about the C++ API for SFS2X

Moderators: Lapo, Bax, MBagnati

bqlf1907
Posts: 25
Joined: 13 May 2013, 10:28

data packet too big crash

Postby bqlf1907 » 15 Aug 2013, 04:25

server send a larger data packet(100K+);
client received the packet crash on

Code: Select all

// -------------------------------------------------------------------
// Uncompress
// -------------------------------------------------------------------
void ByteArray::Uncompress()
{
        .......

        //crash here
   uncompress(dataUncompressed.get(), &sizeUncompressed, dataToUncompress.get(), buffer->size());

        ......
}


if i set [Protocol compression threshold > the data packet Size(the larger data packet!!!)] on server;client received is normal;
if Protocol compression threshold = 1K, and the data packet is larger than the value,but not too lager much.
client execute ByteArray::Uncompress() is normal too,no crash;

so,if the data packet is too lager much,client crash!!!

i use 0.9.7.
MBagnati
Posts: 126
Joined: 12 Feb 2013, 10:57

Re: data packet too big crash

Postby MBagnati » 18 Aug 2013, 09:45

The API version 0.9.8 (and version 0.9.7) contains a bug about compression when the data packet is big.
The fix will be released with next API version.

Return to “SFS2X C++ API”

Who is online

Users browsing this forum: No registered users and 22 guests