zOrder / lidgren-network-gen3

Automatically exported from code.google.com/p/lidgren-network-gen3
0 stars 0 forks source link

"message already sent" when sending unreliable messages very quickly #183

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile the two attached files.
2. Run one instance of the server.
3. Run two instances of the client.

What is the expected output? What do you see instead?
The expected "output" is no crashes.
What happens is that the server crashes the moment the second client instance 
is launched with the "This message has already been sent" exception while the 
second client outputs a bunch of packet parsing errors. 

What version of the product are you using? On what operating system?
r396 on Windows 8.1

Please provide any additional information below.
It only happens when sending unreliable messages.
The issue can be remedied by adding a Thread.Sleep(1) in the loop so I can only 
assume that the problem is caused by some kind of a thread race.

I have also sometimes been getting "Recycling already recycled message" 
warnings within my project but haven't been able to reliably reproduce it in an 
isolated example.
Maybe it's a related problem.

Original issue reported on code.google.com by dazzitma...@gmail.com on 24 Jan 2015 at 2:59

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks, nice find! Fix submitted in revision 397 - there was a miscount in 
m_recycleCount

Original comment by lidg...@gmail.com on 25 Jan 2015 at 2:19

GoogleCodeExporter commented 9 years ago
Oops, submitted too fast, better pick up 398 as well.

Original comment by lidg...@gmail.com on 25 Jan 2015 at 2:36

GoogleCodeExporter commented 9 years ago
Awesome, thanks for the quick fix.

Original comment by dazzitma...@gmail.com on 25 Jan 2015 at 3:06

GoogleCodeExporter commented 9 years ago
Just for completeness: more fixes to this change in rev 400 :-)

Original comment by lidg...@gmail.com on 25 Jan 2015 at 3:08