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
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.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts with meta files from previous Editor versions
- Input.mousePosition returns (NaN, NaN, 0.00) when Scene view is opened
Add comment