Access violation on a form in Windows 2000

I have a problem (only under Win2000, works on NT) where I have a form where the parent property is assigned to a panel of another form and it blows up with an access violation.  This problem does not happen on any other forms done in the same way using the same base create method, any ideas?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

>I have a form where the parent property is assigned to a panel of another form
Why do you need it?
Ziggy500Author Commented:
It is needed as the application is based on a framework where we snap in various forms to present information as the user travels around the application.

As I said, it is working in all instances except for one form that causes the access violation...

i used this kind of embedded forms also often,
and got never an access violation

could you more specific about the access violation
and when it is raised?

meikl ;-)
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

Ziggy500Author Commented:
The violation is being raised when the child form was being created. It has been narrowed down through process of eliminating controls to a combo control on the form. This control appears on the other forms as well so still not sure what is going on. We thought setting OldCreationOrder to false solved the problem but the problem is back after one successful open.

this combo-control is a standard TComboBox or a Thirdparty?
- if standard, how are the items populated or are they static?
- if thirdparty, which?
Ziggy500Author Commented:
It is an in house combo, it appears the problem is arising when the combo allows blank items. When I changed the combo boxes on other forms to allow blanks they also blow up. Perhaps in windows 2000 the messaging is not in the order I am expecting and the list is not created when I try to put a blank item in it? If I set allow blanks to false it works fine.

procedure TLookupListControl.RegisterList(List: TStrings; OnLoadEvent: TNotifyEvent; AllowBlankItem: boolean);
Var I: Integer;
  For I := 0 to RegList.Count-1 do
    if List = TRegItem(RegList.Items[I]).List then break;
  if (I = RegList.Count) or (RegList.Count = 0) then begin
    RegList.Add(TRegItem.Create(List, OnLoadEvent, AllowBlankItem));
    end; // if
    List.Assign(FList);  // load strings here
    // if a blank item is allowed then add it.
    If AllowBlankItem then
      List.InsertObject(0, '', TLPList.Create(Null, False));
    end; // R.P.B.
end; // RegisterList

Ziggy500Author Commented:
Actual error:

Access violation at address 77F8C7A4 in module 'ntdll.dll'. Write of address 00405201
How about a quick botch.

    If AllowBlankItem then
      List.InsertObject(0, ' ', TLPList.Create(Null, False));

Put a space in the Item.

The reason that I'm saying this is that the TStrings that is behind the Items, doesn't actually create a place holder for the object when the text for that line is set to ''. - It doesn't do this to save memory.  The same is true for cells on a TStringGrid too!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I'm glad that old chestnut still works.

Thanks for the points.
Ziggy500Author Commented:
I was looking in all the wrong places, such a simple solution!

Odd that it only pops its head up on windows 2000 too...

Thanks alot!

You can try EurekaLog (

EurekaLog is an add-in tool that gives to your application (GUI, Console, Web, etc.) the ability to catch every exception (even those raised by memory leaks) and every infinite-loops/deadlock bugs, generating a detailed log of call stack (with unit, class, method and line #), showing and sending it back to you via email.
Best regards...

Fabio Dell'Aria.
Fantastic !!!!

I can believe my luck: I entered "77f8c7a4 ntdll.dll" into google and it displayed this !!!!

I can't believe it is windows 2000 specific.

Solved the problem very quickly and kept customer happy.
hehe, it lucky for you that it is an OS problem.  Otherwise that address would have been about as much use as a chocolate teapot :-)

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.