Delphi 6 - Bugs disappear when I compile multiple times
Asked Answered
T

3

5

My Delphi installation has been going downhill for the past few months. It seems though that every so often when I build a release it has strange errors in it which are resolved if I build, then compile, then build, compile, etc.

I've talked to another developer who thinks that this is a compiler error. This sort of degrading performance over time has happened on other computers to us too.

What does stack overflow think could be the problem.

Trapes answered 4/5, 2010 at 17:13 Comment(4)
Looks like it is time to upgrade. :)Swaddle
Personally, I found that with Delphi you were always better off skipping the even numbered releases. All of them were flaky. Of course, in later years I decided that for my own sanity I'd go ahead and skip the odd numbered ones as well.Tun
What kind of "strange errors"? Do you expect us to guess or read your thoughts? :)Lithuanian
This is a classic perception in Delphi 6, 7, that usually is caused by the user having a complete rat's nest of directories full of DCUs, and a library path and project search path settings that create a crazy web of DCU and PAS files for the compiler to sort through.Myongmyopia
C
7

What I've seen most is a case where multiple versions of the same units/dcus exist in different folders/paths, and depending on almost insignificant variations the compiler/linker uses a different path and picks different versions of the units to build the exe.
I would make a huge Spring clean-up, scrutinize the lib/search paths, remove all dcus and make sure there is no duplicate versions of any unit.
And, agreed, reinstalling Delphi could help start with a clean state.

Confidant answered 4/5, 2010 at 17:40 Comment(4)
That is a very likely possibility. The dcus and components we use are giant rats nest which have mutated over the past 10+ years or so the application has been in development. There's some components which we don't even have the source for but only the compiled DCU. Do you have any recommendation of an easy way to check for multiple units/dcus, and do all this? Any sort of program or plugins?Trapes
@Daisetsu: GAH! You shouldn't ever ever EVER use DCU-only components! If I was in your position, that would be my next StackOverflow question: "How can I replace <DCU-only component here> with an alternative that has source available, with a minimum of difficulty?"Kootenay
@Mason: Completely agreed. @Daisetsu: NEVER use components without the source. I learned it the hard way.Incline
@Mason Datasnap was DCU-only in the past too, but this did not stop people using it (paying 5k Euro per license for Midas 1) - good to see that E* finally heard you :)Cacuminal
G
5

I agree with @François about the DCUs, but also want to point out an observation: sometimes it matters what was built prior to what you're building. i.e. if you have several projects that contain source code that results in various .dcu/bpl files being created in a common directory, but the project that you're concerned with doesn't explicitly call for them to be rebuilt, then you're going to end up with whatever is there. If you clear the dcus/dcps prior to building, and then find that your project doesn't build, then you are missing a uses/requires clause somewhere. Every project shoudl be able to build on a "clean slate", and not rely on leftover binaries.

Gorgon answered 4/5, 2010 at 17:59 Comment(0)
K
0

That's not much to go on, but it sounds like a classic case of "bit rot". Too many things interacting in too many ways for too much time under a poorly-designed OS, leading to strange forms of data corruption.

First thing I'd do is uninstall Delphi and reinstall. If that doesn't work, try reinstalling Windows. (If it's been around long enough for this to be happening, you're probably due for an OS reinstall anyway.) And if that doesn't work, contact Embarcadero tech support.

Kootenay answered 4/5, 2010 at 17:23 Comment(1)
I find it interesting that you blame the OS for issues in his compiler when Delphi itself (multiple versions) has a history of exhibiting this type of flaky behavior while other compilers just seem to work.Tun

© 2022 - 2024 — McMap. All rights reserved.