stack corrupt around object or variable at close of Prog.

J

Jeffrey Baker

Hi,
I am recompiling a program from VC++ 5.0 to VC++.NET interface. C++
Compliance is tighter. I get the
error message before the program finished that

stack corrupt around "obj". - this being an object from
a statement like obj = new Class;

Does anyone have a clue?

Regards,
Jeffrey Baker
 
H

Howard

Jeffrey Baker said:
Hi,
I am recompiling a program from VC++ 5.0 to VC++.NET interface. C++
Compliance is tighter. I get the
error message before the program finished that

stack corrupt around "obj". - this being an object from
a statement like obj = new Class;

Does anyone have a clue?


You'd need to ask on a microsoft newsgroup or check their documentation if
you want to know what their error message means precisely.

But it sounds like you've trashed memory somewhere. One line of code isn't
likely to help us determine where that might have occurred, however. Have
you tried debugging the program and watching how your arrays and pointers
are used? Some likely culprits for memory corruption are using an
uninitialized or deleted pointer, or writing beyond the bounds of an array.

-Howard
 
J

Jeffrey Baker

Howard said:
Jeffrey Baker said:
Hi,
I am recompiling a program from VC++ 5.0 to VC++.NET interface. C++
Compliance is tighter. I get the
error message before the program finished that

stack corrupt around "obj". - this being an object from
a statement like obj = new Class;

Does anyone have a clue?


You'd need to ask on a microsoft newsgroup or check their documentation if
you want to know what their error message means precisely.

But it sounds like you've trashed memory somewhere. One line of code
isn't likely to help us determine where that might have occurred, however.
Have you tried debugging the program and watching how your arrays and
pointers are used?

I did try a debug and found a argument to come up with the answer. Looks
like this:
an =obj->get( y,in[j], start[j]);

Message is : Run-Time Check Failure #2 - Stack around the variable 'start'
was corrupted.

Jeff
Some likely culprits for memory corruption are using an
 
J

Jeffrey Baker

Hello,

I found my io file had to many items. Ran ok with a smaller file. It went
over the compilers default limits to start.

Regards,
Jeff

Howard said:
Jeffrey Baker said:
Hi,
I am recompiling a program from VC++ 5.0 to VC++.NET interface. C++
Compliance is tighter. I get the
error message before the program finished that

stack corrupt around "obj". - this being an object from
a statement like obj = new Class;

Does anyone have a clue?


You'd need to ask on a microsoft newsgroup or check their documentation if
you want to know what their error message means precisely.

But it sounds like you've trashed memory somewhere. One line of code
isn't likely to help us determine where that might have occurred, however.
Have you tried debugging the program and watching how your arrays and
pointers are used? Some likely culprits for memory corruption are using
an uninitialized or deleted pointer, or writing beyond the bounds of an
array.

-Howard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top