Heap Alloc Exception Problem

  • Thread starter Adam Hartshorne
  • Start date
A

Adam Hartshorne

Hi All,

I have the strangest problem, and at an end to try and explain it/know
what to do.

I have a program written in c++ using visual studio 7.1. It was all
working no problems, then after not changing the code or recompiling
between two runs using the debugger I all of a sudden got the following
error.

unhandled exception at 0x0012fe01 in multiselect.exe: 0x0c0000005

and this occurred in malloc.c at line 212 which is at the end of the
heap alloc method.

Well I thought maybe I did change my code between runs, but I am pretty
sure I didn't. Luckily I had a recent backup, again fully working, and I
wiped my code, and replaced it with the backup.

I rebuilt the whole project, and tried running the backup. To my shock
and horror the same error message appeared and crashed my program.

I have no clue what is causing this, and no idea how to proceed now. Any
suggestions would be much appreciated,

Adam
 
P

Peter Koch Larsen

Adam Hartshorne said:
Hi All,

I have the strangest problem, and at an end to try and explain it/know
what to do.

I have a program written in c++ using visual studio 7.1. It was all
working no problems, then after not changing the code or recompiling
between two runs using the debugger I all of a sudden got the following
error.

unhandled exception at 0x0012fe01 in multiselect.exe: 0x0c0000005

and this occurred in malloc.c at line 212 which is at the end of the heap
alloc method.

Well I thought maybe I did change my code between runs, but I am pretty
sure I didn't. Luckily I had a recent backup, again fully working, and I
wiped my code, and replaced it with the backup.

I rebuilt the whole project, and tried running the backup. To my shock and
horror the same error message appeared and crashed my program.

I have no clue what is causing this, and no idea how to proceed now. Any
suggestions would be much appreciated,

Adam

You have corrupted your head somehow, e.g. by overwriting memory somewhere
or by freeing twice. This causes undefined behaviour. One possibility is
raising an exception, another is continuing as if everything worked
perfectly.

/Peter
 
A

Adam Hartshorne

Peter said:
You have corrupted your head somehow, e.g. by overwriting memory somewhere
or by freeing twice. This causes undefined behaviour. One possibility is
raising an exception, another is continuing as if everything worked
perfectly.

/Peter

I am not sure I fully understand what you are saying. My problem has got
even stranger, I have commented out all my code, and I still get the
problem when I run it up.

I should say at this point I am using two other libraries, and so
although I have commented all my code, there is still a few lines calls
other people methods. One for instance is the call to qglViewer to
create a new viewer. Could it be that those dll or something have become
corrupted?

Adam
 
A

Adam Hartshorne

Adam said:
I am not sure I fully understand what you are saying. My problem has got
even stranger, I have commented out all my code, and I still get the
problem when I run it up.

I should say at this point I am using two other libraries, and so
although I have commented all my code, there is still a few lines calls
other people methods. One for instance is the call to qglViewer to
create a new viewer. Could it be that those dll or something have become
corrupted?

Adam

Problem solved, it appears that the dll for the QGLViewer decided to
corrupt itself :-(. I have now rebuilt it, and life is back to normal.

Sometimes I hate computers for doing things like that. Justed wasted a
whole day because windows corrupted my dll!

Adam
 
L

Larry I Smith

Adam said:
Problem solved, it appears that the dll for the QGLViewer decided to
corrupt itself :-(. I have now rebuilt it, and life is back to normal.

Sometimes I hate computers for doing things like that. Justed wasted a
whole day because windows corrupted my dll!

Adam

I wouldn't know. I don't use Windows. :)

Larry
 
A

Artie Gold

Peter said:
You have corrupted your head somehow, e.g. by overwriting memory somewhere
^^^^

That may be the case -- but ITYM `heap'! ;-)
or by freeing twice. This causes undefined behaviour. One possibility is
raising an exception, another is continuing as if everything worked
perfectly.

/Peter
--ag
 
P

Peter Koch Larsen

Artie Gold said:
Peter Koch Larsen wrote: [snip]
You have corrupted your head somehow, e.g. by overwriting memory
somewhere
^^^^

That may be the case -- but ITYM `heap'! ;-)

Sure!
Sometimes these problems could be the result of a "head-problem", however
;-)

/Peter
[snip]
 

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

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top