Connecting Tech Pros Worldwide Forums | Help | Site Map

Heap Alloc Exception Problem

Adam Hartshorne
Guest
 
Posts: n/a
#1: Jul 23 '05
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

Peter Koch Larsen
Guest
 
Posts: n/a
#2: Jul 23 '05

re: Heap Alloc Exception Problem



"Adam Hartshorne" <oracle3001@yahoo.com> skrev i en meddelelse
news:d7lfup$im0$1@wisteria.csv.warwick.ac.uk...[color=blue]
> 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[/color]

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


Adam Hartshorne
Guest
 
Posts: n/a
#3: Jul 23 '05

re: Heap Alloc Exception Problem


Peter Koch Larsen wrote:[color=blue]
> "Adam Hartshorne" <oracle3001@yahoo.com> skrev i en meddelelse
> news:d7lfup$im0$1@wisteria.csv.warwick.ac.uk...
>[color=green]
>>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[/color]
>
>
> 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
>
>[/color]

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
Adam Hartshorne
Guest
 
Posts: n/a
#4: Jul 23 '05

re: Heap Alloc Exception Problem


Adam Hartshorne wrote:
[color=blue]
> Peter Koch Larsen wrote:
>[color=green]
>> "Adam Hartshorne" <oracle3001@yahoo.com> skrev i en meddelelse
>> news:d7lfup$im0$1@wisteria.csv.warwick.ac.uk...
>>[color=darkred]
>>> 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[/color]
>>
>>
>>
>> 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
>>[/color]
>
> 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[/color]

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
Larry I Smith
Guest
 
Posts: n/a
#5: Jul 23 '05

re: Heap Alloc Exception Problem


Adam Hartshorne wrote:[color=blue][color=green]
>> Adam[/color]
>
> 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[/color]

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

Larry
Artie Gold
Guest
 
Posts: n/a
#6: Jul 23 '05

re: Heap Alloc Exception Problem


Peter Koch Larsen wrote:[color=blue]
> "Adam Hartshorne" <oracle3001@yahoo.com> skrev i en meddelelse
> news:d7lfup$im0$1@wisteria.csv.warwick.ac.uk...
>[color=green]
>>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[/color]
>
>
> You have corrupted your head somehow, e.g. by overwriting memory somewhere[/color]
^^^^

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

--
Artie Gold -- Austin, Texas
http://it-matters.blogspot.com (new post 12/5)
http://www.cafepress.com/goldsays
Peter Koch Larsen
Guest
 
Posts: n/a
#7: Jul 23 '05

re: Heap Alloc Exception Problem



"Artie Gold" <artiegold@austin.rr.com> skrev i en meddelelse
news:3g797cFb0pg3U1@individual.net...[color=blue]
> Peter Koch Larsen wrote:[/color]
[snip][color=blue][color=green]
>>
>>
>> You have corrupted your head somehow, e.g. by overwriting memory
>> somewhere[/color]
> ^^^^
>
> That may be the case -- but ITYM `heap'! ;-)[/color]

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

/Peter
[snip][color=blue][color=green]
>>
>> /Peter[/color]
> --ag
>
> --
> Artie Gold -- Austin, Texas
> http://it-matters.blogspot.com (new post 12/5)
> http://www.cafepress.com/goldsays[/color]


Closed Thread