473,320 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Problem running with the /CLR flag

Hi,

I have a Visual C++ project (pretty large) using MFC and ATL. It was
converted from Visual C++6 to Visual C++2003, and last to Visual C+
+2005.

Today I decided to turn on the CLR support and once I turn it on and
try to run my app crashes while adding some elements to a std::vector
instance. It seems to corrupt the heap when I add a second element
when it tries to re-size the vector and delete the first element. So,
it might not be the vector itself. IT actually happens during the
initinstance of the app.

I am adding the following element to a vector:

std::vector<CMultiDocTemplate*m_listMoreViews;

m_listMoreViews.push_back( pViewTemplate ); // pViewTemplate is of
type CMultiDocTemplate*

Any clues would be appreciated.

It works fine without the /CLR flag

Thanks in advance,

Michel
Jun 27 '08 #1
1 1496
IT seems to happen to any vector type, even of type int.
On May 30, 3:26*pm, theunis...@comcast.net wrote:
Hi,

I have a Visual C++ project (pretty large) using MFC and ATL. It was
converted from Visual *C++6 to Visual C++2003, and last to Visual C+
+2005.

Today I decided to turn on the CLR support and once I turn it on and
try to run my app crashes while adding some elements to a std::vector
instance. It seems to corrupt the heap when I add a second element
when it tries to re-size the vector and delete the first element. So,
it might not be the vector itself. IT actually happens during the
initinstance of the app.

I am adding the following element to a vector:

std::vector<CMultiDocTemplate*m_listMoreViews;

m_listMoreViews.push_back( pViewTemplate ); // pViewTemplate *is of
type CMultiDocTemplate*

Any clues would be appreciated.

It *works fine without the /CLR flag

Thanks in advance,

Michel
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Pierre-Yves | last post by:
Hello, I would like to prevent my perl program to be executed several times simultaneously (if the program is already running, I would like to display a message like "another instance of this...
3
by: Vanchau Nguyen | last post by:
Hi all, Hoping someone can help us with this strange Innodb problem. At about 5:15 AM 2/2/04 (this morning), our slave server stopped accepting connections. The machine was pingable, but you...
1
by: smsabu2002 | last post by:
Hi, I am facing the build problem while installing the DBD-MySql perl module (ver 2.9008) using both GCC and CC compilers in HP-UX machine. For the Build using GCC, the compiler error is...
15
by: Hemant Shah | last post by:
Folks, We have an SQL statement that was coded in an application many years ago (starting with DB V2 I think). When I upgraded to UDB 8.2, the optimizer does not use optimal path to access the...
6
by: Edd Dawson | last post by:
Hi. I have a strange problem involving the passing of command line arguments to a C program I'm writing. I tried posting this in comp.programming yesterday but someone kindly suggested that I'd...
7
by: Ivan | last post by:
Hi I have following problem: I'm creating two threads who are performing some tasks. When one thread finished I would like to restart her again (e.g. new job). Following example demonstrates...
1
by: RahimAsif | last post by:
Hi guys, I would like some advice on thread programming using C# so I wanted some advice. I am writing an application that communicates with a panel over ethernet, collects data and writes it...
10
by: Clayton | last post by:
Hi all, I'm trying to develop a server that listens to incoming calls using the asycnhronous methods BeginAccept / EndAccept. I start the server (till this point it is ok) and few seconds later...
17
by: Matt | last post by:
Hello. I'm having a very strange problem that I would like ot check with you guys. Basically whenever I insert the following line into my programme to output the arguments being passed to the...
7
by: ashjas | last post by:
Hello, I have run this logic on turboc++ 3.0 and it is working fine on it but its not running on msvs2008 c++. i am not able to assign the value like this *temp=*main,where main and temp are char...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.