Search

concurrent_queue causes crash by Reluctant HausFrau

Closed
as Duplicate Help for as Duplicate

4
0
Sign in
to vote
Type: Bug
ID: 609049
Opened: 10/1/2010 12:46:32 PM
Access Restriction: Public
0
Workaround(s)
5
User(s) can reproduce this bug
It appears that Concurrency::concurrent_queue crashes when using a string. The code below crashes when I call clear (or simply destroy the queue). I don't see anything obviously wrong.

The debugger reports:

Unhandled exception at 0x0059caa8 (msvcr100d.dll) in ConcurrentQ_Destructor.exe: 0xC0000005: Access violation writing location 0xcccccccc.
Details (expand)

Visual Studio/Silverlight/Tooling version

Visual Studio 2010

What category (if any) best represents this feedback?

Reliability

Steps to reproduce

Compile and run below:

#include "stdafx.h"
#include <concurrent_queue.h>

using namespace ::std;
using namespace ::Concurrency;

int _tmain()
{
cout << "creating q and inserting two values and then clearing it up" << endl;
concurrent_queue<string> queue;
queue.push("The first push is OK");
cout << "the first push is OK" << endl;
queue.push("The clear will cause a crash.");
cout << "the second push is OK" << endl;
queue.clear();

// if you comment out the above and just try the destructor
cout << "creating q and inserting a value" << endl;
//scope
{
// the destructor seems to cause the crash
concurrent_queue<string> queue2;
queue2.push("This will crash!");
}
cout << "queue2 is destroyed" << endl;

return 0;
}

Product Language

English

Operating System

Windows 7

Operating System Language

English

Actual results

Unhandled exception at 0x0059caa8 (msvcr100d.dll) in ConcurrentQ_Destructor.exe: 0xC0000005: Access violation writing location 0xcccccccc.

Expected results

no crash
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 10/3/2010 at 6:55 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Posted by Microsoft on 10/3/2010 at 6:20 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.