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 Apr 2, 2006 | 10:36 PM
  #1  
rbuchana's Avatar
Thread Starter
Registered User
 
Joined: Jul 2005
Posts: 71
Likes: 0
From: Idaho
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?
Reply
Old Apr 3, 2006 | 01:30 AM
  #2  
edwinsmith's Avatar
Registered User
20 Year Member
Liked
Loved
Community Favorite
 
Joined: Dec 2004
Posts: 4,312
Likes: 1,063
From: Commerce, OK
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
Reply
Old Apr 3, 2006 | 02:39 PM
  #3  
grantx5's Avatar
Registered User
 
Joined: Aug 2005
Posts: 508
Likes: 0
From: Puyallup, WA
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.
Reply
Old Apr 6, 2006 | 04:13 PM
  #4  
rbuchana's Avatar
Thread Starter
Registered User
 
Joined: Jul 2005
Posts: 71
Likes: 0
From: Idaho
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.
Reply
Old Apr 6, 2006 | 09:54 PM
  #5  
Totallyrad's Avatar
Administrator / Free Time Specialist
 
Joined: Nov 2005
Posts: 7,707
Likes: 16
From: Birmingham, Alabama
It's not that hard, just open the windows and throw the computer out.
Reply
Old Apr 7, 2006 | 10:22 PM
  #6  
oscaroc's Avatar
Registered User
 
Joined: Jul 2004
Posts: 282
Likes: 0
From: UT
Are you fellows speaking a foriegn language or Have I had enough to drink for tonight?
Reply
Old Apr 7, 2006 | 10:36 PM
  #7  
Totallyrad's Avatar
Administrator / Free Time Specialist
 
Joined: Nov 2005
Posts: 7,707
Likes: 16
From: Birmingham, Alabama
Affirmitive
Reply
Old Apr 7, 2006 | 11:11 PM
  #8  
rbuchana's Avatar
Thread Starter
Registered User
 
Joined: Jul 2005
Posts: 71
Likes: 0
From: Idaho
It's english to me, but i guess I'm the minority.....
Reply
Old Apr 7, 2006 | 11:33 PM
  #9  
MasseyMan1089's Avatar
Registered User
 
Joined: Jun 2004
Posts: 455
Likes: 2
From: S. Illinois
Umm, I've got a perfect solution to all your problems! System restore to an earlier point. haha. Hope you fix your errors anyways...
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Rednecktastic
3rd Generation Ram - Non Drivetrain - All Years
10
Nov 15, 2010 09:29 PM
04ctd
Other
8
Dec 23, 2006 08:23 PM
markster
2nd Gen. Dodge Ram - No Drivetrain
6
Oct 7, 2006 02:20 PM
Herrin811
Other
13
Jan 2, 2006 12:23 PM
DF5152
Other
9
May 12, 2003 12:53 PM




All times are GMT -5. The time now is 03:46 PM.