Re: TDataBase and TQuary
- From: Anton <anton.txt@g(oogle)mail.com>
- Date: Mon, 29 Oct 2007 18:18:46 +0000 (UTC)
Hi all
Thanks for your feedback, I attentively re-scanned my source and made it
work!
But another problem appeared.
The programm's structure is just terrible (That's not my prog, I just
have to debug it...). It's a COM-object, and its message handler has
lots of IF statements, one per message. And inside each IF block a
TDataModule form is initialized, then message is handled, and the
DataModule destroyed. And it worked before a TDataBase had been
explicitly declared in the DataModule. But after I did it, it started to
give this error (during the Creating of TDataBase): First message is
handled successfully (DataBase created, used, and Destroyed), but the
second one Raises Access violation (read of address 00000012) here:
TDatabase.Create(AOwner: TComponent);
...inherited Create(AOwner);
.....TCustomConnection.Create
.......inherited Create(AOwner);
.........TComponent.Create
...........TComponent.InsertComponent
.............TComponent.ValidateContainer
...............procedure _CallDynaInst; (asm) -- runs fine
...............procedure _GetDynaMethod; (asm) -- runs fine
@@haveVMT:
MOV EDI,[ESI].vmtDynamicTable
TEST EDI,EDI
JE @@parent //JUMPS;
...............TComponent. AComponent.ValidateInsert ()
.................procedure _CallDynaInst; (asm) //in System.pas
.................procedure GetDynaMethod; (asm)
@@haveVMT:
MOV EDI,[ESI].vmtDynamicTable
TEST EDI,EDI
JE @@parent //Doesn't jump
MOVZX ECX,word ptr [EDI] //Does this...
//and gets here (in function _ClassCreate):
@desc:
JMP _HandleAnyException
This looks terrible. No idea what can be wrong.
P.S.: Now I am rewriting it to work the static way...
.
- References:
- TDataBase and TQuary
- From: Anton
- Re: TDataBase and TQuary
- From: Maarten Wiltink
- TDataBase and TQuary
- Prev by Date: Re: TDataBase and TQuary
- Next by Date: Re: TDataBase and TQuary
- Previous by thread: Re: TDataBase and TQuary
- Next by thread: Re: TDataBase and TQuary
- Index(es):
Relevant Pages
|