Solved

Delphi Crashes on installing Package

Posted on 1998-07-08
6
309 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now