🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.oodesign
Article #68

class instantiation falling over

#68
From: bart
Date: Thu, 18 Aug 2005 17:40
38 lines
2748 bytes
I just made some changes to a rather large project under developement. The changes involve fundamental shifts to the internals of several classes to make them smarter in handling their data. 
My project compiles clean but falls over immediately on the instantiation of some objects, built in the constructor of some main objects. All this worked before the changes BTW.
Here is a dump of the call stack:
 
7C81EB33 C:\WINDOWS\system32\kernel32.dll
004A93CB System::NotifyNonDelphiException()
7C90378B ntdll.dll
7C90EAFA ntdll.dll
00497C15 Classes::TComponent::Insert(Self=:009E646C, AComponent=:00A84FB4)
00497CA7 Classes::TComponent::InsertComponent(Self=:009E646C, AComponent=:00A84FB4)
004979F4 Classes::TComponent::Create(Self=:00A84FB4, AOwner=:009E646C, ...)
0040EFE0 TAux::TAux(this=:00A84FB4, Owner=:009E646C)
004088B5 TQSPlus::TQSPlus(this=:009E646C, Owner=:009E25CC, globals=:009E2B50)
00412FC1 TForm1::TForm1(this=:009E25CC, Owner=:009E1D68)
004651F7 Forms::TApplication::CreateForm(Self=:009E1D68, InstanceClass=:004C99D0, Reference=:004D38E4)
0040136B WinMain( =:00400000,  =NULL,  =:00141F1D,  =9)
004B4573 __startup

The access exception happens on the Grow call with a read of address 00000000; In this "classes" library code: 


function TList.Add(Item: Pointer): Integer;
begin
  Result := FCount;
  if Result = FCapacity then
    Grow;
  FList^[Result] := Item;
  Inc(FCount);
  if Item <> nil then
    Notify(Item, lnAdded);
end;

The other wierd thing that I notice is the Class Hierarchy explorer view is confused. Objects appear and disappear and the hierarchy is not complete at times. It appears that it reparses when files are saved, which is when things come and go..

Has anyone seen this behavior before, or have an idea of what to look for to fix it.??

Thanx..
Technical Details
Message-ID: <4304c813$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!213.239.142.2.MISMATCH!feeder.xsnews.nl!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10db1e,598ccef7018f3132,start
X-Google-Attributes: gid10db1e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "bart" <bart_thompson@nospamdstinnovis.com>
Sender: "bart" <bart_thompson@nospamdstinnovis.com>
Reply-To: "bart" <bart_thompson@nospamdstinnovis.com>
Subject: class instantiation falling over
Newsgroups: borland.public.cppbuilder.oodesign
X-User-Info: 165.79.13.191     
X-Forwarded-For: 165.79.122.12, 165.79.122.12
NNTP-Posting-Host: 207.105.83.66
Message-ID: <4304c813$1@newsgroups.borland.com>
Date: 18 Aug 2005 10:40:35 -0700
X-Trace: newsgroups.borland.com 1124386835 207.105.83.66 (18 Aug 2005 10:40:35 -0700)
Lines: 39
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!213.239.142.2.MISMATCH!feeder.xsnews.nl!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail