Memory leak?
-
I'm having a very bizarre problem with a Visual C++ program I'm working on. The program seems to crash with an access violation when one of 3 certain string variables are accessed. I know it's 3 because for some reason switching the order of the variable declaration seems to switch the crash to one of the other 2 variables. I have no idea why this is happening or what do do about it. It just started all of the sudden in a part of the code I hadn't even changed. It only happens in Debug mode, only on my machine, and only with this project(I've never seen this before in any other project). I've since upgraded my RAM by 128MBs and reinstalled Visual C++ 6. This didn't fix the problem. Has anyone else ever encountered this before? How did you fix it?:confused: Why not throw away a dime, I throw away ten pennies all the time...
-
I'm having a very bizarre problem with a Visual C++ program I'm working on. The program seems to crash with an access violation when one of 3 certain string variables are accessed. I know it's 3 because for some reason switching the order of the variable declaration seems to switch the crash to one of the other 2 variables. I have no idea why this is happening or what do do about it. It just started all of the sudden in a part of the code I hadn't even changed. It only happens in Debug mode, only on my machine, and only with this project(I've never seen this before in any other project). I've since upgraded my RAM by 128MBs and reinstalled Visual C++ 6. This didn't fix the problem. Has anyone else ever encountered this before? How did you fix it?:confused: Why not throw away a dime, I throw away ten pennies all the time...
Hi Kevin, The program seems to crash with an access violation when one of 3 certain string variables are accessed. I know it's 3 because for some reason switching the order of the variable declaration seems to switch the crash to one of the other 2 variables How about posting some code. It is Illogical to define an inventor by his invention
-
I'm having a very bizarre problem with a Visual C++ program I'm working on. The program seems to crash with an access violation when one of 3 certain string variables are accessed. I know it's 3 because for some reason switching the order of the variable declaration seems to switch the crash to one of the other 2 variables. I have no idea why this is happening or what do do about it. It just started all of the sudden in a part of the code I hadn't even changed. It only happens in Debug mode, only on my machine, and only with this project(I've never seen this before in any other project). I've since upgraded my RAM by 128MBs and reinstalled Visual C++ 6. This didn't fix the problem. Has anyone else ever encountered this before? How did you fix it?:confused: Why not throw away a dime, I throw away ten pennies all the time...
That just screams stack corruption. Are all your stack arrays large enough? Are you passing in a variable by pointer when it shouldn't be (type checking usually catches this unless you have to cast to (void **) with such things as QueryInterface. Tim Smith Descartes Systems Sciences, Inc.