Error 00001. 0 x100600 (r) (Thread 0 x0d7c) :
To Access invalid in memory: Attempt to Access 4 byte (s) at 0 x00000000 + 772.
The Call Tree:
0 x0040ada2 (=S61V2. 2.13 the Debug. Exe: 0 x01:009 da2)
0 x0057c996 (=S61V2. 2.13 the Debug. Exe: 0 x01:17 b996)
0 x00520d7a (=S61V2. 2.13 the Debug. Exe: 0 x01:11 fd7a)
0 x77d18734 (=user32. DLL: 0 x01:007734)
0 x77d18816 (=user32. DLL: 0 x01:007816)
0 x77d189cd (=user32. DLL: 0 x01:0079 CD)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Such as 0 x0040ada2 and Debug. Exe: 0 x01:009 da2 said what mean? 0 x01:009 da2 this address how can see out? Whether to use what tools to analyze EXE?
CodePudding user response:
With the full debug, so in the view - & gt; The debug window - & gt; Code guard log to see will be more convenientCodePudding user response:
Sometimes not to "call a function name + each parameter value, after entering the function of each parameter values, intermediate variable values, exit the function return value of preparation, return to the function to call after the function value of the parameter name + + return value" this information to write logs to a file is where no matter how to also can not find the problem, including capture all kinds of abnormal, writing log to the screen and single step or set a breakpoint or core file is generated,... These methods are not! Write logs to a file reference below:# include & lt; Stdio. H>
# include & lt; Stdlib. H>
# include & lt; String. H>
# ifdef WIN32
# include & lt; Windows. H>
# include & lt; IO. H>
# the else
# include & lt; Unistd. H>
# include & lt; Sys/time. H>
# include & lt; Pthread. H>
# define CRITICAL_SECTION pthread_mutex_t
# define _vsnprintf vsnprintf
# endif
//the Log {
# define MAXLOGSIZE 20000000
# define MAXLINSIZE 16000
# include & lt; Time. H>
# include & lt; Sys/timeb. H>
# include & lt; Stdarg. H>
Char logfilename1 []="MyLog1. Log";
Char logfilename2 []="MyLog2. Log";
The static char logstr [MAXLINSIZE + 1];
Char datestr [16].
Char timestr [16].
Char MSS [4].
CRITICAL_SECTION cs_log;
The FILE * flog;
# ifdef WIN32
The Lock (CRITICAL_SECTION void * l) {
The EnterCriticalSection (l);
}
Void Unlock (CRITICAL_SECTION * l) {
LeaveCriticalSection (l);
}
# the else
The Lock (CRITICAL_SECTION void * l) {
Pthread_mutex_lock (l);
}
Void Unlock (CRITICAL_SECTION * l) {
Pthread_mutex_unlock (l);
}
# endif
Void LogV (const char * pszFmt, va_list argp) {
* struct tm now;
Struct timeb TB;
If (NULL==pszFmt | | 0==pszFmt [0]) return;
_vsnprintf (logstr, MAXLINSIZE pszFmt, argp);
Ftime (& amp; TB);
Now=localtime (& amp; TB. Time);
Sprintf (datestr, "% d % % 4 d - 02-02 d", now - & gt; Tm_year + 1900, now - & gt; Tm_mon + 1, now - & gt; Tm_mday);
Sprintf (timestr, "02 02 02 % d: % d: % d", now - & gt; Tm_hour, now - & gt; Tm_min, now - & gt; Tm_sec);
Sprintf (MSS, "% 3 d", TB. Millitm);
Printf (" % s % s. % s % s ", datestr, timestr, MSS, logstr);
Flog=fopen (logfilename1, "a");
If (NULL! Flog)={
Fprintf (flog, "% s % s. % s % s", datestr, timestr, MSS, logstr);
If (ftell (flog) & gt; MAXLOGSIZE) {
The fclose (flog);
If (rename (logfilename1 logfilename2)) {
Remove (logfilename2);
Rename (logfilename1 logfilename2);
}
} else {
The fclose (flog);
}
}
}
Void the Log (const char * pszFmt,... ) {
Va_list argp;
The Lock (& amp; Cs_log);
Va_start (argp, pszFmt);
LogV (pszFmt argp);
Va_end (argp);
Unlock (& amp; Cs_log);
}
//the Log}
Int main (int arg c, char * argv []) {
int i;
# ifdef WIN32
InitializeCriticalSection (& amp; Cs_log);
# the else
Pthread_mutex_init (& amp; Cs_log, NULL);
# endif
for (i=0; I<10000; I++) {
The Log (" This is a Log % 4 d the from FILE: % s LINE: % d \ n ", I, a __FILE__ and __LINE__);
}
# ifdef WIN32
DeleteCriticalSection (& amp; Cs_log);
# the else
Pthread_mutex_destroy (& amp; Cs_log);
# endif
return 0;
}
//1. With the main - 78 line to add to your c or. The front of the CPP file that
//the main function of 81-85 line to add to your opening
//89-93 before the end of the line to add to your main function
//where to write the LOG modeled on line 87 write to write the LOG to file MyLog1.
in the LOG
CodePudding user response:
Such as 0 x0040ada2 and Debug. Exe: 0 x01:009 da2 said what mean? 0 x01:009 da2 this address how can see out? Whether to use what tools to analyze EXE?CodePudding user response:
1) check whether you bcb6 way the Debug rather than Release, if the Debug compilation, it should prompt to variables,2) appears to be a memory pointer to null Pointers, cause error,
CodePudding user response:
Error 00001. 0 x100600 (r) (Thread 0 x0d7c) :To Access invalid in memory: Attempt to Access 4 byte (s) at 0 x00000000 + 772.
The Call Tree:
0 x0040ada2 (=S61V2. 2.13 the Debug. Exe: 0 x01:009 da2)
0 x0057c996 (=S61V2. 2.13 the Debug. Exe: 0 x01:17 b996)
0 x00520d7a (=S61V2. 2.13 the Debug. Exe: 0 x01:11 fd7a)
0 x77d18734 (=user32. DLL: 0 x01:007734)
0 x77d18816 (=user32. DLL: 0 x01:007816)
0 x77d189cd (=user32. DLL: 0 x01:0079 CD)
Like the hexadecimal number represents what mean? How linked with source code?
CodePudding user response:
Like the hexadecimal number represents what mean? How linked with source code?CodePudding user response:
Error 00001. 0 x100600 (r) (Thread 0 x0d7c) :To Access invalid in memory: Attempt to Access 4 byte (s) at 0 x00000000 + 772.
The Call Tree:
0 x0040ada2 (=S61V2. 2.13 the Debug. Exe: 0 x01:009 da2)
0 x0057c996 (=S61V2. 2.13 the Debug. Exe: 0 x01:17 b996)
0 x00520d7a (=S61V2. 2.13 the Debug. Exe: 0 x01:11 fd7a)
nullnullnullnullnull