You are not logged in.
Pages: 1
Hello,
I'am using [d85e66ef0c] version on Win7 Pro 64bits, Delphi XE2 with Eset.
One test is failing : ! - Service initialization : 1 / 105 FAILED 1.71 ms.
So i'am using Delphi Debugger,
And this is the error : First chance exception at $773ED09C. Exception class $C0000005 with message 'access violation at 0x773ed09c: read of address 0x0d18fca4'. Process TestSQL3.exe (1816)
In synCommons.pas, line 28000 here if ((st>max_stack) or (st<min_stack)) and not IsBadReadPtr(pointer(st-8),12) and ((pByte(st-5)^=$E8) or check2(st))
procedure TSynLog.AddStackTrace(Stack: PPtrUInt);
function check2(xret: PtrUInt): Boolean;
var i: PtrUInt;
begin
result := true;
for i := 2 to 7 do
if PWord(xret-i)^ and $38FF=$10FF then
exit;
result := false;
end;
var st, max_stack, min_stack, depth: PtrUInt;
prevState: boolean;
begin
if fFamily.StackTraceLevel<=0 then
exit;
depth := fFamily.StackTraceLevel;
if Stack=nil then // if no Stack pointer set, retrieve current one
asm
mov eax,ebp // push ebp; mov ebp,esp done at begin level above
mov Stack,eax
end;
asm
mov eax,fs:[18h]
mov ecx,dword ptr [eax+4]
mov max_stack,ecx
mov ecx,dword ptr [eax+8]
mov min_stack,ecx
end;
fWriter.AddShort(' stack trace ');
prevState := SynLogExceptionEnabled;
SynLogExceptionEnabled := false; // for IsBadCodePtr
try
try
while (PtrUInt(stack)<max_stack) do begin
st := stack^;
if ((st>max_stack) or (st<min_stack)) and
not IsBadReadPtr(pointer(st-8),12) and
((pByte(st-5)^=$E8) or check2(st)) then begin
TSynMapFile.Log(fWriter,st); // will ignore any TSynLog.* methods
dec(depth);
if depth=0 then break;
end;
inc(stack);
end;
except
// just ignore any access violation here
end;
finally
SynLogExceptionEnabled := prevState;
end;
end;
There is successively 17 access violations.
Thanks and greeting from France !
Last edited by remixtech (2012-03-03 09:30:26)
Offline
Yes, I did not check the Unicode versions of Delphi IDE before this commit.
It's now fixed.
See http://synopse.info/fossil/info/b8e3addc96
Thanks for the nice "esprit français".
Offline
Thanks
Offline
By the way, when a test fail, do not trust the catched access violations when logging the stack trace.
Put a debugger stop point in the TestFailed() method of SynCommons.pas.
You'll find out the failing test.
Offline
Thanks for this information !
Offline
Pages: 1