Solved

Delphi's IDE start to have a strange behavior

Posted on 2008-10-30
20
172 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 36

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 36

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 36

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 36

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:ciuly
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:ciuly
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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 36

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 36

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:
ciuly 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:ciuly
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 36

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:ciuly
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 36

Expert Comment

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

Expert Comment

by:ciuly
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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 tutorial demonstrates a quick way of adding group price to multiple Magento products.

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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now