Solved

Delphi's IDE start to have a strange behavior

Posted on 2008-10-30
20
173 Views
Last Modified: 2010-04-21
Hi,

We are up to 6-7 programmers which work remote on a server where is installed Delphi7. Projects, or project groups in work are updated Turtoise SVN. All delphi projects are setted up in each user's My Documents folder. The issue is that some users compile without a problem projects, but other users got errors like:

'File .... was compiled with another version of .....'

I rewrote one user's dcu files with the same dcu file from a user which can compile and build but without success. I'm out of ideas.

Can anyone give me some advices?

Best regards
0
Comment
Question by:radu84
  • 8
  • 6
  • 6
20 Comments
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 22838922
Are you using compiler directives in common code between projects ?

example:
Project1 - UnitCommonA - other units
was compiled with a compiler directive X (Project options of Project1)

Project2 - UnitCommonA - other units
was compiled with a compiler directive Y (Project options of Project2)

if you hit compile (CTRL-F9) on project 2 you will get this warning
Building project 2 (Menu Project / Build ) will recompile UnitCommonA with compiler directive Y
and the error will be resolved

But not for Project1

This can be the case too with different Delphi versions / Update packs.

0
 

Author Comment

by:radu84
ID: 22838967
Geert,

Units are compiled in the same manner by all the users. There are no differences between users. If i work on a project i update to server the files using SVN. The next programmer is 'downloading' the project and start to work on it.

Also all the users have set up the paths to packages in IDE.

For example 2 users can compile in their accounts Project A(for example) and other 2 user retrieve that error: 'file...was compiled with another version of ....'.

Can some one give a link or some explanations how ide is working on multiusers?

Best regards,
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 22838977
you may need to clarify your situation a bit more ...

are you using terminal services ?


0
 

Author Comment

by:radu84
ID: 22839000
You're correct, we connect to server through Remote Desktop, each user a part.

Best regards,
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 22839034
Never used Delphi this way.

What happens if the user getting the error does a Project / Build
This should allways work.

Have you checked for compiler directives ?
0
 

Author Comment

by:radu84
ID: 22839097
Get the same error. As I told you before, all the projects are compiled/build in the same manner. No differences are made from a user to another, there aren't other compiler directives.

Best regards,
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 22839105
do i understand it correctly that you check in dcu files too ?
if so, this shouldn't be necessary.

does deleting the dcu files and then compiling work ?

0
 

Author Comment

by:radu84
ID: 22839129
No, i recompiled all packages used in project group, it worked ok. When i tried to compile one of the projects from group it is raising this error.

Best regards,
0
 
LVL 28

Expert Comment

by:2266180
ID: 22839237
obviously some of the users have other versions of the problematic dcus somewhere in their paths. so why not do a full hardisk search on *.dcu and see what is where. it will take a while to go through the result list but if you find the same unit in 2 places, you can ask yourself why is that and remove the bad one.
0
 
LVL 28

Expert Comment

by:2266180
ID: 22839246
note, you can also try first by seaerching for the dcu's involved like
whatever.dcu compiled with a different version of soemthing.dcu
search for whatever.dcu and something.dcu and see which one is in multiple instances.
again, the search should be in all paths, that includes the harddisk and any network folders you might be using.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:radu84
ID: 22839300
Ciuly,

thanks for response. Each user have it's own folder structure which include a DCU folder. I've already done what you're suggesting. There are no differences between dcu files. also when a user is updating sources(to/from) server dcu files are not send.

up i wrote that i overwrite dcu's of a problematic user with the dcu's from a user which can compile, and the result is the same.

Other ideas?

Best regards,
0
 
LVL 37

Assisted Solution

by:Geert Gruwez
Geert Gruwez earned 50 total points
ID: 22839423
you are using a project group ...
what are the project group options ?

go to menu Project / View Project manager
look at the Project group options

does it use any directories not in MyUsers folders ?

my thought is that some projects use directories not in the MyUsers folders
so check each project options for directories that are shared
and make them local to the user
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 22839435
deleting the DCU's should rebuild it at compile for that specific user

do you what DCU's ?
0
 
LVL 28

Accepted Solution

by:
2266180 earned 75 total points
ID: 22839479
>> I've already done what you're suggesting

I really doubt you did what I said. on the same machine, building a project by 2 different users yelding that one dcu is compiled with another version, means there are at least 2 versions of that dcu on the system. so you didn't do the complete search.
0
 

Author Closing Comment

by:radu84
ID: 31511570
Resolved it, overwrote all problematic users .dcu files with same dcu files from an user which can compile.

Thanks and best regards
0
 
LVL 28

Expert Comment

by:2266180
ID: 22839675
since you say that overwriting the problematic dcu with other dcus that worked fixes the problems, it is obvious that you had more than one version of the problematic dcu on your system, which backs up my supposition and hence supports my suggestion of searching the entires system for the problematic dcus.

in this light, giving a B grade is inapproriate. it is not my fault that you cannot follow simple recommentations to track down the real problem and thus preventing it from happening again. guess you are one of those guys whom when having had problems with windows, preffer to format c: and reinstall. which is what you did with overwriting dcus. you didn't care what the actual problem was, and try to prevent it from happening again, you took the raw solution. it's nothing bad in it, but giving a B grade because of that is bad.

so ...other experts here know what will happen. I'm not allowed to say it, netminder would get pissed. enjoy it.
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 22840024
How does Delphi compile a .pas file
first look for a .dcu file
it it finds one, compares the date to the .pas date
otherwise compiles the .pas (+ .dfm)

so if you still have the issue deleting the .dcu
then you didn't delete the correct .dcu

after you deleted the .dcu, does it reappear in that directory ?

do you check in/out the project group file (.bpg)

do you check in/out the separate project files (.dpr)

this will not resolve the issue

have you ever seen the film ice age 2 ?
there is this little squirrel in the beginning using his finger to plug the hole in the ice wall dam
after taking out the chestnut, next he has to use an other finger,
then his toe, then his other hand.
Next he stuffs his mouth in the wall and gets shot away ...

You're using the same approach
We proposed to drop the water level behind the wall
It's just a matter of time before the developpers get fed up asking you to copy

check your directories !!!

please read the instructions for grading answers and asking questions
http://www.experts-exchange.com/help.jsp#hs29
0
 
LVL 28

Expert Comment

by:2266180
ID: 22840343
>> this will not resolve the issue

you forgot to ask about the dof and cfg where the project paths (and other config) are stored ;)
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 22840364
oh yeah and the .res too
0
 
LVL 28

Expert Comment

by:2266180
ID: 22840410
that's not so important in this case. it only contains resources (ico, version, etc) other than dfm (which is added separately at link time in the binary)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
loading dll from external path 1 210
Delphi OLE Error 8 93
Adoquery sql  left join does not work 25 80
Delphi...Split view - idea? 1 41
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

919 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

18 Experts available now in Live!

Get 1:1 Help Now