Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Delphi Crashes on installing Package

Posted on 1998-07-08
6
Medium Priority
?
339 Views
Last Modified: 2010-04-04
I have a package using Unit A and B.
Both uses some other Units. There are no Circular References. If I Compile the units in a program (no Package) everything is fine.
if I want to install the Package I get the Error
Access Violation at address xxx reading address 0000.

For Testing I removed all Code except the Uses Statement and the Crash occurs.
If I remove Uses A in Unit B everything is fine.
I tied Uses in Interface an in implementation part.
I Use Delphi 3.01.

What can be wrong?


0
Comment
Question by:WernerMairl
6 Comments
 
LVL 3

Expert Comment

by:vladika
ID: 1357298
Write unit code, please
0
 
LVL 5

Expert Comment

by:ronit051397
ID: 1357299
Check if there is an Initialization section in the unit (in the uses) which causes the crash.
0
 
LVL 1

Expert Comment

by:Marcius
ID: 1357300
I had a similar problem a couple of months ago. My problem was called by a copy of the unit being stored somewhere else on disk. Once I deleted this copy, everything was fine.

So, check that you have one and only one copy of the unit you are using on disk or on the network in your search path. If you have, delete all instances except the one you are using.
0
Technology Partners: 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!

 
LVL 1

Expert Comment

by:Greedy
ID: 1357301
it might be something like your trying to install a run time package, that will generate a Access Violation...Go to the requires tab and remove everthing in it click compile and see what it tells you it added and then see if one of them packages is causeing the problem...you may want to delete off the runtime packages that it requires and rebuild them (save them to a back up just in case :)
0
 
LVL 3

Accepted Solution

by:
AndreasSchindler earned 800 total points
ID: 1357302
Check initialisation of all (implicit) included Units.
If your Programm works when ist is compiled normally and crashes if you install the Package, I think the initialisation of the Units depend on a order of loading.
When you compile the package, the units are loaded in a different order so the "second" initialisation is executed before the "first" one and causes the Crash.

Make sure that each initialisation works in any loading order of the Units.

0
 

Author Comment

by:WernerMairl
ID: 1357303
I created a global TStriglist in one initialisation and accessed from another.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

971 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