views:

212

answers:

4

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.

A: 

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.

Mason Wheeler
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.
Chris Lively
+7  A: 

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.

François
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?
Daisetsu
@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?"
Mason Wheeler
@Mason: Completely agreed. @Daisetsu: NEVER use components without the source. I learned it the hard way.
Fabricio Araujo
+5  A: 

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.

Chris Thornton
+1  A: 

I don't understand why there are people very interested in attacking Delphi like that. I had never experienced this kind of malfunction, and I work every day with Delphi in english-based Windows installations and non-english based Windows installations as well, for the last 15 years and with every version of Delphi that has shipped.

I never had compiler problems. In fact, that is one of the better things of Borland/etc from ages, like their excellent debugger. The only "flaky" version at the IDE level was Delphi 2005. Then 2006 was a lot better, and 2007 started to be just really stable (more than VS and Eclipse for example).

Everytime I had problems in my builds, was my fault (bad library paths, or things like that).

12321
Just because D2006 was less bad than 2005 doesn't mean it wasn't a really bad release. Memory leaks and random crashes in the IDE were *everywhere*. 2007 was the first halfway decent Delphi IDE since they jumped the shark with Delphi 8.
Mason Wheeler
All Delphis from D8 to D2006 (including D2006) were pure atrocity. The reputation of the tool really gone down until D2007 (which I didn't used myself, but all people said it's decent). I've used D1, D3 until D7, D2005, D2006, D2010. I can say that D2005 and D2006 are indecent.
Fabricio Araujo