I found a bug at application exit time and fixed it. When I fixed it, the problem noted in this thread went away. Here's what it was: bad: CArray my_array; CMyClass* ptr = new CMyClass; my_array.SetAt(index, *ptr);
...later... delete &(my_array.GetAt(index));
good: CArray my_array; CMyClass* ptr = new CMyClass; my_array.SetAt(index, ptr);
... later.... delete my_array.GetAt(index);
Nynaeve
Posts
-
#File Error#(103) -
#File Error#(103)I am using Visual C++ .NET, version 7.1.3088. When I exit my application in debug mode, I get thousands of error messages similar to the following: #File Error#(103) : {1153563} normal block at 0x0587EED8, 32 bytes long. Data: < { . ?> 14 00 00 00 00 CD CD CD CD 07 28 BD F1 2E 95 99 3F First-chance exception at 0x7c597db2 in mygui.exe: 0xC00000005: Access violation reading location 0x01f0ae20 The memory location 0x7c597db2 is the same in every one of these messages, but the other numbers (1153563, 0x0587EED8, Data) are different for each error display. When I look at 0x7c597db2 in the memory window, it just shows me a bunch of ?? ?? ?? ?? ?? ?? I also tried running this in Purify to see if that helped, but no luck. It causes errors in Purify that basically amount to "something is wrong, fix it before running purify again". Can anyone help? Thanks. :confused:
-
Why does the program crash when it enters a function?First, your crash is probably because your function is using too much stack memory. Too many local variables in the stack (or very large arrays on the stack). Second, you may want to reconsider using multi-dimensional arrays.
-
Kerry K. Gates MSDN magazine publisher thinks Canadians are US citizens!I moved from North Carolina to Maryland three years ago and I still get advertisements from my NC dentist and car dealership. Obviously I'm not going to make a 6 hour drive for a dentist appointment so of course these ads are just a waste of money. I just throw them away.... what's the big deal?:((
-
access violation in release mode -
pointer to class as arguement in a functionFirst, make sure that cDataFile is spelled correctly (including capitalization, I am suspicious of your lowercase 'c'). Second, when your function uses a pointer to a class, as you did, you only need to forward include the class in the header file. Then put the #include in the .cpp file (not the .h file) i.e. class cDataFile; class CYourClass { void Save(cDataFile*); };
-
pointer to class as arguement in a functionclass CClass; // OR: #include "Class.h" void MyFunction(char*, char*, CClass*);:-D
-
Help! Police! This is not an emergency!I have called the emergeny number for a non-emergency. I did it because, for the life of me, I could not find a non-emergency number for the police in the phone book. :doh: So I called 911 and said "this is not an emergency". Making the non-emergency number for the police very prominent in the phone book would help with this problem a lot.