Search Issue Tracker

By Design

Votes

0

Found in

5.4.0b1

Issue ID

756632

Regression

No

[UNET Server dll]"Out" variables of Receive function have garbage when data buffer is too small to accept received data

Networking

-

Steps:
1. Open attached solution
2. Start "ChatServer.exe"
3. Start "ClientGUI.exe"
4. Press "Connect to 127.0.0.1" button in ClientGUI
==>
Client connects to server
5. Choose "UnreliableFragmented" in ChannelType in ClientGUI
6. Press "Send file: UnreliableFragmented" button
==>
Server crashes

What is going on inside:
Client sends a big message (64000 byte) via UnreliableFragmented channel but the data buffer on server side to receive message is too small (1024 byte).
It causes that all "out" variables have garbage inside. The server tries to use them and crashes.

The proper behaviour is to re-receive data again with a new buffer that is able to handle this big message. You can see that if uncomment function "ReceiveAgainIfBufferTooSmall();" in NetworkEntity.cs

Nevertheless, the "out" variables should have proper values in such case.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.