PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Debug Tip

I have to pass this tip along to others, after having wasted the first half of the day trying to chase down a bug.

I have a class that is allocated in one source file and deleted in another. Somehow VC++ 6.0 hiccuped, and did not cause a rebuild of the source that allocates the class when the header for the class changed. So the code that allocated the class thought the size of the class was 4 bytes smaller than it really was. That caused "memory corrupted after block" error when the class was deleted.

So the moral of the story - if you are seeing odd behavior in your app, first thing you should do is "Rebuild All". This is especially true after copying source files outside of VC++, restoring backups, etc, which modify file times. The next thing to do if you are seeing really odd behavior is to make sure the stack size is large enough. :)

Dan East