Solved

Delphi Crashes on installing Package

Posted on 1998-07-08
6
313 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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 200 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

772 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