Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Delphi Crashes on installing Package

Posted on 1998-07-08
6
Medium Priority
?
332 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

705 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