Solved

Concurrent queue exception

Posted on 2011-03-11
7
854 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:basil365
  • 2
  • 2
7 Comments
 
LVL 13

Expert Comment

by:Naman Goel
Comment Utility
can you give more details stack trace of exception, method/thread causing exception
0
 

Author Comment

by:basil365
Comment Utility
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
 
LVL 13

Expert Comment

by:Naman Goel
Comment Utility
yes, for that exception only I need complete Call Stack trace with Exception message, error code.

Method call causing that exception.
0
 
LVL 8

Expert Comment

by:Volox
Comment Utility
Without the exception name and message included, it is kind of hard to address your question.
0
 

Accepted Solution

by:
basil365 earned 0 total points
Comment Utility
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

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Can I legally transfer my OEM version of Windows to another PC?  (AKA - Can I put a new systemboard in my OEM PC?) Few of us are both IT and legal experts but we all have our own views of Microsoft's licensing rules and how they apply.  There are…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now