juney1110 / lidgren-network-gen3

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

LockRecursionException in NetQueue.TryDequeue #151

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I occasionally receive the following exception in my game. I have not been able 
to find a specific action in my game that triggers it, but it seems to get more 
likely and more frequent as I send more data, which would seem to indicate 
concurrency issues.

LockRecursionException: Write lock cannot be acquired while read lock is held
System.Threading.ReaderWriterLockSlim.TryEnterWriteLock (Int32 
millisecondsTimeout)
System.Threading.ReaderWriterLockSlim.EnterWriteLock ()
Lidgren.Network.NetQueue`1[Lidgren.Network.NetOutgoingMessage].TryDequeue 
(Lidgren.Network.NetOutgoingMessage& item)
Lidgren.Network.NetPeer.CreateMessage (Int32 initialCapacity)
Lidgren.Network.NetPeer.CreateMessage ()
[... my code ...]

Original issue reported on code.google.com by scgtrp@gmail.com on 6 Jun 2013 at 2:36

GoogleCodeExporter commented 9 years ago
What's "my code" exactly... it seems a read lock is being held, by that exact 
thread, when it tries to acquire a write lock.

Original comment by lidg...@gmail.com on 13 Jan 2014 at 8:14

GoogleCodeExporter commented 9 years ago

Original comment by lidg...@gmail.com on 22 Feb 2014 at 9:54