Other Everything else not covered in the main topics goes here. Please avoid brand and flame wars. Don't try and up your post count. It won't work in here.

OK Who's a Windows expert? I've got a heaping problem!

Thread Tools
 
Search this Thread
 
Old 04-02-2006, 10:36 PM
  #1  
Registered User
Thread Starter
 
rbuchana's Avatar
 
Join Date: Jul 2005
Location: Idaho
Posts: 71
Likes: 0
Received 0 Likes on 0 Posts
OK Who's a Windows expert? I've got a heaping problem!

Alright lets find the true windows gurus here.

I wrote a WTL dialog that models a RF detector.

Sometimes when I run it I get a message stating a heap corruption. It says I wrote over the heap buffer.

Does this mean I overwrote the end of a dynamically allocated array? I don't think so, because if it was it would throw a different type of message.

Am I actually using up all the memory windows is allocating for my program?

And how do I debug it?
Old 04-03-2006, 01:30 AM
  #2  
Registered User
 
edwinsmith's Avatar
 
Join Date: Dec 2004
Location: Commerce, OK
Posts: 4,256
Received 1,048 Likes on 770 Posts
OK, I'm a little rusty here. What's a WTL dilog? I write machine code for 8051's and I also do some C# .NET stuff. The compiler usually takes care of that stuff.

The Heap is your memory area for variables. What it sounds like is you've got a stack overrun because of to many pushes and not enough pops. Check that you're not doing a recursive loop or some other strangeness like doing a jump out of a subroutine.

Edwin
Old 04-03-2006, 02:39 PM
  #3  
Registered User
 
grantx5's Avatar
 
Join Date: Aug 2005
Location: Puyallup, WA
Posts: 508
Likes: 0
Received 0 Likes on 0 Posts
Here's a little help. As the article states heap corruption is a BIG topic and involves many things.


http://www.windowsitpro.com/Web/Arti...275/22275.html


Bottom-line, memory is being mishandled.
Old 04-06-2006, 04:13 PM
  #4  
Registered User
Thread Starter
 
rbuchana's Avatar
 
Join Date: Jul 2005
Location: Idaho
Posts: 71
Likes: 0
Received 0 Likes on 0 Posts
assertions are my friend. I was writing past the end of a dynamically allocated array. I try to be diligent in my assertions but obviously I missed a crucial one. Thanks guys.
Old 04-06-2006, 09:54 PM
  #5  
Administrator / Free Time Specialist
 
Totallyrad's Avatar
 
Join Date: Nov 2005
Location: Birmingham, Alabama
Posts: 7,707
Likes: 0
Received 14 Likes on 8 Posts
It's not that hard, just open the windows and throw the computer out.
Old 04-07-2006, 10:22 PM
  #6  
Registered User
 
oscaroc's Avatar
 
Join Date: Jul 2004
Location: UT
Posts: 282
Likes: 0
Received 0 Likes on 0 Posts
Are you fellows speaking a foriegn language or Have I had enough to drink for tonight?
Old 04-07-2006, 10:36 PM
  #7  
Administrator / Free Time Specialist
 
Totallyrad's Avatar
 
Join Date: Nov 2005
Location: Birmingham, Alabama
Posts: 7,707
Likes: 0
Received 14 Likes on 8 Posts
Affirmitive
Old 04-07-2006, 11:11 PM
  #8  
Registered User
Thread Starter
 
rbuchana's Avatar
 
Join Date: Jul 2005
Location: Idaho
Posts: 71
Likes: 0
Received 0 Likes on 0 Posts
It's english to me, but i guess I'm the minority.....
Old 04-07-2006, 11:33 PM
  #9  
Registered User
 
MasseyMan1089's Avatar
 
Join Date: Jun 2004
Location: S. Illinois
Posts: 455
Likes: 0
Received 2 Likes on 2 Posts
Umm, I've got a perfect solution to all your problems! System restore to an earlier point. haha. Hope you fix your errors anyways...
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Rednecktastic
3rd Generation Ram - Non Drivetrain - All Years
10
11-15-2010 09:29 PM
markster
2nd Gen. Dodge Ram - No Drivetrain
6
10-07-2006 02:20 PM
Herrin811
Other
13
01-02-2006 12:23 PM
DF5152
Other
9
05-12-2003 12:53 PM



Quick Reply: OK Who's a Windows expert? I've got a heaping problem!



All times are GMT -5. The time now is 10:30 PM.