Heap Alloc Exception Problem 
July 23rd, 2005, 04:58 AM
| | | Heap Alloc Exception Problem
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 | 
July 23rd, 2005, 04:58 AM
| | | 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 | 
July 23rd, 2005, 04:58 AM
| | | 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 | 
July 23rd, 2005, 04:58 AM
| | | 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 | 
July 23rd, 2005, 04:58 AM
| | | 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 | 
July 23rd, 2005, 04:58 AM
| | | 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 | 
July 23rd, 2005, 04:59 AM
| | | 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] | | Thread Tools | Search this Thread | | | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 220,840 network members.
|