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
Solved

Finding Access Violation & Abstract Error

Posted on 2002-03-13
12
360 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
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
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…

828 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