Concurrent queue exception

Hi,

I recently changed a live application to .net 4 in order to use concurrentDictionary's and queues. I received the following error:
at System.Collections.Concurrent.ConcurrentQueue`1.GetHeadTailPositions(Segment& head, Segment& tail, Int32& headLow, Int32& tailHigh) at System.Collections.Concurrent.ConcurrentQueue`1.get_Count() at [i]MY METHOD[/i]

Open in new window


This is quite a complex app with several threads accessing the objects simulataneously, can anybody help geive me an insight into what condition would raise this error?

Thanks
basil365Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
basil365Connect With a Mentor Author Commented:
i solved the question - the thread that was manipulating the queue was being ungracefully aborted which gave the error that i posted. There was no more available stacktrace
0
 
Naman GoelSoftware engineer 1Commented:
can you give more details stack trace of exception, method/thread causing exception
0
 
basil365Author Commented:
Sorry, thats the only exception i received this time. I have since removed the queue.count call as i assume its not needed because i then use the 'tryDequeue()' method and base further logic on the bool result (instead of using the count to decide if i should continue)
0
 
Naman GoelSoftware engineer 1Commented:
yes, for that exception only I need complete Call Stack trace with Exception message, error code.

Method call causing that exception.
0
 
VoloxCommented:
Without the exception name and message included, it is kind of hard to address your question.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.