?
Solved

Finding Access Violation & Abstract Error

Posted on 2002-03-13
12
Medium Priority
?
369 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
Industry Leaders: 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month9 days, 15 hours left to enroll

762 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