Error: an error occurs in EVC4 debug mode. Error message: ErrorAccessViolation Click OK to stop the EVC statement in the file: D: programfileswindowsc1_lswce5005300promfcsrcstrcore. cpp function: LPTSTRCString: GetBuffer (intnMinBufLength): if
Error: an error occurs in EVC4 debug mode. Error prompt: Error Access Violation click OK, And the EVC stops in the file: D:/Program Files/Windows CE Tools/wce500/5300Pro/Mfc/Src/strcore. cpp function: LPTSTR CString: GetBuffer (int nMinBufLength) Statement: if
Error:
InEVC4An error occurs in debug mode.
Error message: Error Access Violation
Click OK,EVCStop in file:D:/Program Files/Windows CE Tools/wce500/5300Pro/Mfc/Src/strcore. cppFunction:LPTSTR CString: GetBuffer (int nMinBufLength)Statement in:If (GetData ()-> nRefs> 1 | nMinBufLength> GetData ()-> nAllocLength).
Solution:
1The error message is:CStringType array, because the array is relatively large, considering that it may be appliedStackToo small. HoweverStackThe problem is still not solved when the space of the array is increased. The problem is also not solved when the array size is reduced.
2Detailed debugging and DiscoveryCStringClass inGetDataPointerM_pchDataIs empty. Unknown reason!
3Consider the latest changes to find the possible causes. Because the application still runs normally one day ago!
From the stable version to the present, only one array and two macro definitions are added.
The reason is certainly here. Read the code in detail and find that macro definition usage is incorrect. A very simple error: the array is defined with a small macro, but it is incorrectly written into a large macro during initialization.
CauseCStringThe space of some members of the array variable is occupied.