GPF in DBAccess.pas
Posted: Wed 24 Aug 2011 23:01
My project has been working for a long time, today I made some changes to non-db part of code and now MyDAC hangs.
TMyQuery.SQL.Clear; is where it locks. Not really sure how this can fail.
It works once, and then the second time the program hangs. Under the debugger the stack trace shows
:7c81eb33 kernel32.RaiseException + 0x52
:004bcd8f Call_HookedRaise + $A7
:00406838 NotifyNonDelphiException + $1C
:7c90378b ntdll.RtlConvertUlongToLargeInteger + 0x46
:7c90eafa ntdll.KiUserExceptionDispatcher + 0xe
DBAccess.TCustomDASQL.AssembleSQL
:006a541a TMyCommand.AssembleSQL + $72
DBAccess.TCustomDASQL.ProcessSQLChanged(???,???)
DBAccess.TCustomDASQL.SQLChanged(???)
:0064a6f0 TCustomDASQL.ProcessSQLChanged + $C8
GameObjects.NewSQLRecord($1384058)
GameStart.CreateSystem(0,1,2)
DBAccess.pas.12410:
00649428 8B5340 mov edx,[ebx+$40]
0064942B 8B45FC mov eax,[ebp-$04]
0064942E 8B08 mov ecx,[eax]
00649430 FF5108 call dword ptr [ecx+$08]
DBAccess.pas.12411:
00649433 8BC3 mov eax,ebx >> GPF here
00649435 8B10 mov edx,[eax]
00649437 FF92AC000000 call dword ptr [edx+$000000ac]
Actual code
case zobj.ObjType of
StarSystem : begin
zstar := TStarSystem(zobj);
dbquery.SQL.Clear;
I upgraded from the 6.0.0 that I was using to the current 6.10 which fixed some other issues, but this one still remains.
TMyQuery.SQL.Clear; is where it locks. Not really sure how this can fail.
It works once, and then the second time the program hangs. Under the debugger the stack trace shows
:7c81eb33 kernel32.RaiseException + 0x52
:004bcd8f Call_HookedRaise + $A7
:00406838 NotifyNonDelphiException + $1C
:7c90378b ntdll.RtlConvertUlongToLargeInteger + 0x46
:7c90eafa ntdll.KiUserExceptionDispatcher + 0xe
DBAccess.TCustomDASQL.AssembleSQL
:006a541a TMyCommand.AssembleSQL + $72
DBAccess.TCustomDASQL.ProcessSQLChanged(???,???)
DBAccess.TCustomDASQL.SQLChanged(???)
:0064a6f0 TCustomDASQL.ProcessSQLChanged + $C8
GameObjects.NewSQLRecord($1384058)
GameStart.CreateSystem(0,1,2)
DBAccess.pas.12410:
00649428 8B5340 mov edx,[ebx+$40]
0064942B 8B45FC mov eax,[ebp-$04]
0064942E 8B08 mov ecx,[eax]
00649430 FF5108 call dword ptr [ecx+$08]
DBAccess.pas.12411:
00649433 8BC3 mov eax,ebx >> GPF here
00649435 8B10 mov edx,[eax]
00649437 FF92AC000000 call dword ptr [edx+$000000ac]
Actual code
case zobj.ObjType of
StarSystem : begin
zstar := TStarSystem(zobj);
dbquery.SQL.Clear;
I upgraded from the 6.0.0 that I was using to the current 6.10 which fixed some other issues, but this one still remains.