Solved

Finding Access Violation & Abstract Error

Posted on 2002-03-13
12
364 Views
Last Modified: 2010-04-05
Hi, i have a big problem.
Sometimes i get AV and Abstract Error !
i don't know why, where and how !

the debug show in unit form :

function StdWndProc(Window: HWND; Message, WParam: Longint;
  LParam: Longint): Longint; stdcall; assembler;
asm
        XOR     EAX,EAX
        PUSH    EAX
        PUSH    LParam
        PUSH    WParam
        PUSH    Message
        MOV     EDX,ESP
        MOV     EAX,[ECX].Longint[4]
        CALL    [ECX].Pointer
        ADD     ESP,12            <<--- Here i get the error
        POP     EAX
end;

How can i find out where i made a mistake ?

Thanxs in advance !
Andi
0
Comment
Question by:WinTrans2000A
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 6860060
Where does the ECX value come from?
0
 

Author Comment

by:WinTrans2000A
ID: 6860071
i don't know !
This is not a function of mine, its from delphi (it's in the forms.pas file)
0
 
LVL 3

Expert Comment

by:marcoszorrilla
ID: 6860236
XOR     EAX,EAX
       PUSH    EAX
       PUSH    LParam
       PUSH    WParam
       PUSH    Message
       MOV     EDX,ESP
       MOV     EAX,[ECX].Longint[4]
       CALL    [ECX].Pointer
       ADD     ESP,12            <<--- Here i get the error
       POP     EAX

Are you sure that ESP exist
I think you are referring to SP and not to ESP.
SP is the Stack Pointer.

bye
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:WinTrans2000A
ID: 6860251
@marcoszorilla
This is not a function which i has written, it is from delphi (in forms.pas)
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 6863239
perhaps you should do a stack trace and see what procedures are called before this? perhaps some earlier procedures messed up the registers? Just a thought...
0
 
LVL 6

Expert Comment

by:zebada
ID: 6863822
Maybe this will help:
You will get this error if your derived class, which implements its ancestor's abstract method, calls "inherited" as there is no ancestor method to be called - because it is abstract.

Regards
Paul
0
 
LVL 6

Expert Comment

by:zebada
ID: 6863827
One more thing:
What really bugs me is that Delphi's code generator (Ctrl-Shift-C) incorrectly inserts the "inherited" keyword into the method body even though it "knows" the method is an implementation of an abstract method. aaaarrrrrgggghhhhh.

Paul
0
 

Author Comment

by:WinTrans2000A
ID: 6863831
@zebada: This function is (it seems so) the Standard Windows Proc, which is executed for every Windows Message. I know what a abstract error is, but how can i find the code line where this error occures ?

@DragonSlayer
How do this work with the Stack Trace ?
0
 
LVL 20

Expert Comment

by:Madshi
ID: 6864838
Hi WinTrans,

the real problem is surely not in that Delphi function, because normally this Delphi function works just fine. It must be somewhere else. Unfortunately AV exceptions are often hard to find...   :-(

If you can reproduce the error inside of the IDE, you can look at the callstack (see Delphi menu). If you can only reproduce the error outside of the IDE, you might want to try an advanced exception handling package. E.g. the one from Jedi or mine (free for non-commercial usage):

http://help.madshi.net/Data/madExcept.htm

Regards, Madshi.
0
 

Expert Comment

by:CleanupPing
ID: 9343275
WinTrans2000A:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 7

Expert Comment

by:knightmad
ID: 9470751
Wow, Its been a long time since this comment have been visited!

WinTrans2000A,
No comment has been added lately (19 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: PAQ/No Refund

-- Please DO NOT accept this comment as an answer ! --

Thanks,

knightmad
EE Cleanup Volunteer

Remember you (all) can object this recommendation if you disagree, just leave a post here explaining why are you objecting and what should be done instead.
Within 7 days probably this thread will be closed, so, hurry up! : )
0
 

Accepted Solution

by:
YensidMod earned 0 total points
ID: 9536792
This question is PAQed and no points refunded (of 100)

YensidMod
Community Support Moderator
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
error 1.1 400 Bad request idhttp delphi 18 202
Delphi Form ownership 4 125
How to load 2 images in same column in Delphi 2 68
Breakpoint doesn't stop in my variable 3 37
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question