Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 09-23-2002, 12:15 AM
slavikn slavikn is offline
Senior Member
 
Join Date: Aug 2001
Posts: 1,155
Default "Abstract Error" appears again

Hello,

When I run my program (from Delphi enviroment), it starts ok. Then when I click on "Next", it goes to frmMain and shows me an error message "Abstract Error". I don't have any abstract functions...

What is the problem?
Reply With Quote
  #2  
Old 09-23-2002, 12:50 AM
PetrB PetrB is offline
Senior Member
 
Join Date: Jul 2002
Posts: 530
Default RE: "Abstract Error" appears again

Look which classes are you using in frmMain. I have nice problem with using TStrings class than I discovered that it's only abstract class for future using.

If it help you please give me a point.
PB
Reply With Quote
  #3  
Old 09-23-2002, 12:58 AM
andyho andyho is offline
Senior Member
 
Join Date: Jul 2001
Posts: 1,446
Default RE: "Abstract Error" appears again

The most common reasons for abstract errors are the usage of a TStrings (instead of TStringlist). However normally the compiler should have given you a warning "creating class xxx contains abstract methods", thus you'd see before what is wrong.

If you run it in the Delphi environment you should activate the "Stop on delphi exceptions", then you'll see the place where it crashes, and with the call stack you can also usually see why.

Bye,
Andy

If it helped please click accept...
Reply With Quote
  #4  
Old 09-23-2002, 01:15 AM
slavikn slavikn is offline
Senior Member
 
Join Date: Aug 2001
Posts: 1,155
Default RE: "Abstract Error" appears again

I enabled the "Stop on delphi exceptions" option, but it selected the "End." line in the project's file. It doesn't point to a certain line in frmMain.

I don't use "TStrings", but I do use "TStringsStream".

Here is my uses list in frmMain:

uses
Forms, Buttons, FileCtrl, Jpeg, IniFiles, Controls, Classes, ShellAPI,
Windows, StdCtrls, ExtDlgs, SysUtils, Dialogs, Graphics, ID3v1, ID3v2,
Spin, CheckLst, ImgList, ExtCtrls, ComCtrls, Messages, MPlayer,
Gauges, dxCore, dxButton, Registry, QuickReg, CheckSums, Menus;

The blue units are mine. They work well in other projects. I use dxCore, dxButton in other projects and they work fine.

Any more suggestions?
Please help!

I will give 100 points (if I could)!
Reply With Quote
  #5  
Old 09-23-2002, 01:56 AM
PoseFant PoseFant is offline
Senior Member
 
Join Date: Jan 2001
Posts: 1,002
Default RE: "Abstract Error" appears again

This is a classical debug - coffe - swear problem.

Use breaklines, watches, local variables ... test expressions in watches, etc.

Break - Break - Break untill you are green ... and suddenly ... you will find out where it fails.

Execute Step by Step.


---

Regards

/Filip

I've lost my autosignature ... *sobbing* ...
Reply With Quote
  #6  
Old 09-23-2002, 02:14 AM
slavikn slavikn is offline
Senior Member
 
Join Date: Aug 2001
Posts: 1,155
Default RE: "Abstract Error" appears again

I tried it. It works fine, but after the Create and Activate are over, it gets into Paint methods - they are endless, but I was patient for 5-6 minutes and holded F8. It worked fine. BUT then I press F9 and it shows me that "Abstract" error :-(
Reply With Quote
  #7  
Old 09-23-2002, 02:27 AM
PetrB PetrB is offline
Senior Member
 
Join Date: Jul 2002
Posts: 530
Default RE: "Abstract Error" appears again

Set Project options /Compiler/Messages Show hints and Show warning. It should show using of classes with some abstract methods.

If it help you please give me a point.
PB
Reply With Quote
  #8  
Old 09-23-2002, 02:28 AM
PoseFant PoseFant is offline
Senior Member
 
Join Date: Jan 2001
Posts: 1,002
Default RE: "Abstract Error" appears again

So youre saying that if you use F8 (Step Over) or perhaps F7 (Step Into) you get no errors, but when you run it, you get this EAbstractError AV ?

What happens if you compile the application, do you get any compiler messages ? Does it run from the OS ?

What classes are you using in this project, not visual controls, but all the other non visual classes ...

You mentioned TStringStream, do you create any properties / methods in these classes, are you sure your own units are correct ...

Hm ... it's difficult to help over a forum with debugging, but one alternative is to break every main statements and then step through the app untill the error occurs, then ... break the code from the last successfull statement untill the error, and if you call functions in this code, break them as well ... hard work but sometimes nescesseary .. :\

Good Luck ...

---

Regards

/Filip

I've lost my autosignature ... *sobbing* ...
Reply With Quote
  #9  
Old 09-23-2002, 02:50 AM
slavikn slavikn is offline
Senior Member
 
Join Date: Aug 2001
Posts: 1,155
Default RE: "Abstract Error" appears again

They were selected, but showed nothing.
Reply With Quote
  #10  
Old 09-23-2002, 02:56 AM
slavikn slavikn is offline
Senior Member
 
Join Date: Aug 2001
Posts: 1,155
Default RE: "Abstract Error" appears again

Hello,

So youre saying that if you use F8 (Step Over) or perhaps F7 (Step Into) you get no errors, but when you run it, you get this EAbstractError AV ?

Right.

What happens if you compile the application, do you get any compiler messages ? Does it run from the OS ?

No compiler messages. It is Windows 2000.

What classes are you using in this project, not visual controls, but all the other non visual classes ...

Only Timers.

You mentioned TStringStream, do you create any properties / methods in these classes, are you sure your own units are correct ...

This unit (which uses TStringStream) works fine in other applications.

Hm ... it's difficult to help over a forum with debugging, but one alternative is to break every main statements and then step through the app untill the error occurs, then ... break the code from the last successfull statement untill the error, and if you call functions in this code, break them as well ... hard work but sometimes nescesseary .. :\

Sorry, it didn't help! This is a shareware program, so I cannot publish its code, but if you want, I will give you a free registration if you help me with it!!!

PLEASE HELP !!!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 11:52 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.