Ok, I'm going nuts here. For the last (almost) four years, I've been putting up with some extremely bad behavior from my Delphi 5 IDE. Problems include:
Seemingly random errors in coride50.bpl
floating point errors on compiling
occasional deletions of my source code files
form and object sizes shifting between instances of working on them
Loss of links between files on compile: messages that it can't find a function even though it is explicitly referenced
The linker frequently fails to include valid .DFM files unless a full build is performed instead of a smaller compile
The biggest problem is that my boss isn't believing that this is happening without any user changes making these issues appear. I've already wiped and reloaded Delphi fresh a couple of times, but that is not something I can do again right now. Most of the issues listed can be easily recovered from (either reload the IDE or re-copy the files out of source control), but this is completely nuts. I've eliminated all the warnings and hints from compile time, haven't covered them up. I've done my best to follow Marco and Microsoft's best practices. Is this just me? Am I the crazy one? How can I stop Delphi from causing these headaches anymore?
Pretty sure it is a bad package. If you can come up with steps that fail repeatedly (which I know is tough) then try removing 3rd party (or home grown) packages 1 at a time until it is fixed. Then you at least know which package us causing the trouble.
Once you know what the troublesome package is, you can actually debug the design time code & behavior of the component in Delphi. Just set the Delphi exe as the debug application, and then Delphi will launch another instance of Delphi in debug mode. Reproduce the steps that cause the failure, and hopefully you will get a good idea of what code in the package is causing the problem.
Good luck!
I have never seen any version of Delphi delete files under any circumstances.
Do you have any IDE plug-ins installed? This would be my first guess.
I've never heard of behavior like this from Delphi before. A couple of things to look at:
Are you sure the memory on your machine is good? Have you run Memtest on it?? The last couple of times I've encountered crazy behavior from a machine the culprit turned out to be the memory.
Beyond that, remember that anything you install into Delphi runs in the context of the IDE and if it's buggy it can mess up the IDE. Even a component that writes to a wild pointer could do this to you.
i used d5 for a long time & never saw that. i had some other strange things like you mention about needing to build rather than just compile. i have that in d2009 as well.
Just a thought; pikcing up one of your comments about you having D5 and D7 installed, I'd suggest;
uninstall D7
uninstall D5
reinstall D5
install D5 3rd party components
service pack D5
reinstall D7
install D7 3rd party components
service pack D7
then try again, having done the trick of deleting all the .DCUs in your own project directories.
In my experience I've always been careful to stick to installing them 'in numerical order' and if one needs to be removed, I usually end up removing them all before I start reinstalling.
GExperts ToDo list window... close it or any other GExperts Windows.. Watch the Task Manager for memory increasing and then stopping after you close any windows.
Pretty much out of Delphi 5.0 these days. But I do recall it was important to have the latest Build for various reasons. Do you have it?? Go Help->About. I believe this is the latest version:
Version 5.0 (Build 6.18) Update Pack 1
Which OS are you using? If it's Windows 7, perhaps there are incompatibilities with Delphi 5, since it's a bit long in the tooth now. Perhaps you could try running Delphi 5 in a XP VM.
Since you had no problems with Delphi 7, is there any reason for not migrating this application to Delphi 7? It shouldn't be difficult to do, unless you have some third party components with no source.
Related
I have a really frustrating behaviour of Delphi Tokyo. I have moved from Delphi Xe7 and the other frustrating error (out of memory) is gone (or it seems till now), but a new one appeared.
When I update my project via the code repo, its often the case that I need to rebuild the whole thing. That wouldnt be that bad if it wasnt for the fact that it takes 2-3 hours for the whole application to rebuild (have it on 2 different machines, so its not a machine specific setting). In Xe7 I never had this problem.
Its strage, when I pull the update everything seems normal, and I can resolve all my uses classes (witr Ctrl + left click on the class). But when I try to compile after couple seconds I get the random error message that a class, constant or whatever cannot be resolved (even though I can still click on it and resolve it). Then I need to build the bpl and it works again
Is there anything I can set inside RAD Studio to not make this happen?
The problem also is, I didnt even figure out which update (to which of the included .bpls) it is that causes this problem
I also have that problem sporadically, where only rebuilding helps in our 3 million lines codebase.
Although I sadly cannot offer you a real solution for needing to rebuild, I can say that after clearing up Unit Dependencies it happened less and built faster.
Some big Units still cause problems, but after resolving many circular Unit Dependencies and overall refactoring big Units into smaller ones it got significantly better.
You can for example use Delphi Unit Dependency Scanner to analyze your Dependencies and easily identify circular references.
I can also recommend taking a look at IDE Fix Pack which could speed up your build times.
IDE Fix Pack is a collection of unofficial bug fixes and performance
optimizations for the RAD Studio IDE, Win32/Win64/Andoird-ARM compiler
and Win32 debugger.
IDE Fix Pack is an IDE plugin for RAD Studio 2009-10.3 that fixes IDE
bugs at runtime. All changes are done in memory. No files on disk are
modified. None of your projects are modified or benefit from the IDE
Fix Pack other than being compiled faster. Only the IDE gets the fixes
and optimizations.
The performance optimizations let the IDE start faster, open projects
faster, optimizes the compiler’s file search algorithm, makes
CodeInsight, the actual compilation and the debugger faster. It also
fixes some IDE, compiler and debugger memory leaks.
fastdcc applies the Compiler Speed Pack that is included in IDE Fix
Pack on the command line compiler dcc32, dcc64 and dccaarm (XE6 and
newer).
Our 3 million lines of code build in less than 2 minutes.
With XE8 update 1, Win 7 64 bit and a single component added to an otherwise empty folder I get:
error: [dcc32 Fatal Error] F2039 could not create output file .\Win32\Debug\MountTest.
The test will compile and run fine the first time but XE8 has to be shut down and restarted to compile again. The component is a gauge from Mitov Software.
The component vendor say's that this is a known bug with no fix. If so its a showstopper and project end'r for me. Is it really the end of the line for Delphi?
I hope some one can pull this rabbit out of a hat somehow.
This is what I have done to isolate the problem.
Started with a failing application (will not compile a 2ed time)
Remove all external units used
Remove al references to those units
Remove all references in the 'Uses' clause
Comment code until it compiles
It should compile every time you hit run (no problem).Now add a blank form to the project. Don't do anything to the form just add it. Add it to your uses clause.
Its should compile every time you hit Run.
Now open the blank form and simply touch it so that it needs to be recompiled.
When you run the application its back to failing when you run it a second time.
Notice that happens when you simply add a form and 'touch' it. No code needed.
This problem is not something wrong with my code - it can't be. Its a bug in the UI - must be.
Coincidentally, I just fought with this issue yesterday testing some components I ported to XE8. The output file in my case is the project executable.
After spending several hours trying to figure out what was going on (including efforts to reconfigure my AV software, disabling it entirely, moving the project to a different location, etc.), I was able to solve the problem by disabling Castalia. If I run the IDE without Castalia, the problem does not occur. If I enable Castalia again, it starts happening again.
You can find instructions for disabling/enabling Castalia in How can I disable Castalia in XE8?
I'm removing the above content because the issue has reappeared (with Castalia disabled). Further investigation shows a couple of things:
The problem seems to be related to any sort of exception being raised in the debugger (even those that are handled in the code). Clicking either Break or Continue in the debugger exception dialog works as always. However, the next attempt to compile or build the application fails with the F2039 error. Deleting the executable in Windows Explorer allows compilation and running once, and then the error recurs.
Restarting the IDE fixes the issue, until the next debugger exception occurs.
Neither taskkill or a batch file with del worked in either a pre- or post-build event.
There is an open QC entry for it at Embarcadero which indicates that it was reported in XE7, XE7.1, and XE8, and is currently an open internal ticket. I can't find a way to add the information in the two points above to that open ticket in the new JIRA-based Quality Portal. Perhaps someone who has access and can do so will on my behalf (or at least add a link to this post).
It's not linked to a specific project. The original answer (as mentioned above) was related to a test app while porting some components to XE8 from an earlier version. When the problem reappeared for me, it was in a brand new project, totally unrelated, that does not use any non-standard components.
(I previously had access to EMBT QC, and had a few open tickets. The accounts appear to have not migrated to the new QP, and I can't locate any tickets there under my account.)
Found It.
I decided to start from scratch on my development system and uncovered the problem.
I installed Windows 10 on a virgin disk
Installed XE8 update 1
Installed MITIOV Instruments for XE 8 and tested them. All working find
Installed AsyncPro - Still working
Installed the JEDI Jcl - Fails
Remove JEDI Jcl - now works
Trash JEDI completly - Everything works fine
Something in the JEDI Jcl version 3.48 is causing the problem. I can code around the JEDI components I was using without to much trouble but its a shame.
How about automatically kill your "hang-up" application before build?
I also had this problem on Win 7 Pro 64 bit with XE8.
Removing JCL fixed the problem. If I was a betting man, I would look closer at the JCL Debug IDE extension.
Guy's..
There is no reason to upgrade to Delphi 10.1, because all previous versions are equipped with an older version of the Android SDK.
Now, how to solve this annoying issue:
Just find the map where the Android SDK is located.
See: Tools/Options/Delphi Options/SDK Manager/Android Location
Now run the ..\sdk\tools\android.bat as Admin
This will show the Andoid SDK Manager.
Next is to update to the newest Android SDK and SDK Tools.
If all completed, you don't have to upgrade to Delphi 10.1 or whatever "advised".
Restart Delphi and problem:= solved!
btw:
It took some effort to find out what's happening here, because the Eclipse compiler suffered the same issue as Delphi. Finally all was related to bugs in earlier versions of the Android SDK causing adb.exe to keep a filehandle held hostage.
I've just downloaded from SVN the DUnit2 code base.
Does someone has compiled it successfully?
What steps/prerequisites I've to follow in order to compile it?
Do someone knows if an already compiled version exists?
thank you
fabio vitale
In the projects directory, find the subdirectory corresponding to your version of Delphi. In it, you should find a project-group file, either DUnit2ProjectGroup.bpg , DUnit2ProjectGroup.bdsgroup or DUnit2Delphi<version>.groupproj. Open it and compile all the projects in order.
Using DUnit2 is pretty much the same as using DUnit.
In case someone else stumbles over this question while trying to make DUnit2 run on Delphi XE (or XE5):
TL;DR:
Dunit2 (official SourceForge source, revision 101) doesn't currently (being as of this writing on 2015-06-01) build successfully on either Delphi XE or XE5.
To make it build on XE or XE5, go get the patch I posted here
Apply it to the source tree. It should now compile and you should be able to open the .groupproj and build all the contained projects successfully.
The patch may be applied with and was created with TortoiseSVN (in case it matters).
Longer version:
Amazingly tonight (2015-06-01) I followed the same steps as Fabio (in 2012 no less) and ran into exactly the same issue (E2010 Incompatible types: 'Pointer' and 'Integer') trying to compile DUnit2 (revision 101 trunk checked out directly from SourceForge) on XE and XE5.
I've come to the following conclusions:
1) There's multiple issues with the head revision with respect to both XE and XE5.
2) The key issue above that Fabio mentions can be fixed by replacing IntPtr with Pointer.
This doesn't actually seem to make any difference in the code as far as I can tell, and the test suites also pass fine on both XE and XE5 after this change, though caveat emptor - I've not looked too carefully either (and also subject to caveats below.)
3) Project search paths being out of date [XE]. Just needed updating/fixing.
4) Missing $DEFINES for XE5 and others, despite some other code being quite aware of XE5
5) Some enhanced TRect stuff that's not available on XE. (The amount is relatively small and relatively trivial to inline to more basic expressions that will compile and is available on XE so was by no means show stopping.)
(Re 3,4 & 5 -- Sadly I get the impression the codebase isn't very well tested against multiple compiler/BDS targets.)
6) Some kind of Application.OnIdle/GUI testing bug (run T_TGUITestCase tests to see it) whereby the GUI automation tests would block unless you keep "feeding" the Windows Message queue by say moving your mouse or pressing the shift key to trigger Application.OnIdle events (repeatable on my Windows 8 XE5 and XE binaries).
Now speaking off the top of my head, and from vague memory from many years ago, I seem to remember having run into this before, and that it is down to a subtle change in behaviour either in Delphi or in Windows some time ago. -- IIRC in past, it used to be the case that one would would actually still get the occasional Application.OnIdle() call in your Delphi app even when nothing else much was going on on the system, even when you set Done to True. And as I recall, this changed at some point due to either a change in Windows or Delphi (can't remember which) several years ago and one had to be a bit more circumspect about setting Done to False if you didn't want your App to go to sleep entirely. In any case, it clearly was/is an issue on my PC tonight with the current (as of this writing) DUnit code, so I had to patch around it.
I did this in arguably a rather kludgy way, e.g. by manhandling things via providing an OnIdle handler while running GUI automation tests to signal that that the app is not in fact done (e.g. "don't block, don't go to sleep") and then reinstating any prior handler immediately after. There is no doubt a more elegant solution to this, perhaps by posting a message to ourselves to keep the app "alive", but my first attempt or 2 at something better didn't work out and I'm not interested enough to pursue this further. I'd be interested to hear of a better fix though.
I've supplied patches, but got no feedback from the DUnit2 team on SourceForge. So I forked DUnit2 with the full commit history into my Github account. I've applied many fixes there, including the compilation issues with XE & XE3+ and the scriptable self-tests that pause if no mouse action occurs. I'll continue my development of DUnit2 on my Github account [https://github.com/graemeg/dunit2].
I've been widely making use of the Complete Class at Cursor function in Delphi, in 2010 and in XE2. Recently, after installing Update 4 for XE2, the Complete Class at Cursor stopped working. After doing some research, I found that uninstalling "AQTime" would fix the issue. So I did that (had to re-install Delphi just to remove it) and sure enough it started working again.
Except, today, it suddenly stopped again. AQTime is not installed, and I haven't done anything in the IDE at all which (as far as I know) could possibly cause this. I haven't installed/uninstalled any packages, changed any library paths, not even changing any settings. It just suddenly stopped working in the middle of my development. Was working one minute, and not the next. I've restarted Delphi, restarted my PC, and even tried in a brand new project. It just will not work anymore.
Anyone know why this stopped working? How can I make it work again? It's an extremely helpful tool which I use all the time.
I had the same problem, but it was solved after uninstalling Smartbear AQTime from the windows uninstaller. (close Delphi first)
No need to reinstall Delphi.
Had the exact same issue in XE2/Update 4. Did the following (without uninstalling AQTime) and it came back.
Tools > Options >Editor Options > Code Insight
Verified the Code Completion was checked (it was), then changed the Delay to Low (was set to None) > OK
Code Completion in my IDE started working again.
I was having the same problem in Delphi Berlin. None of the above worked for me. I also tried regenerating the .dproj file but that also did not help.
The one thing that has worked (so far) is installing the excellent IDEFixPack for Delphi Berlin. Delphi IDE Fix Pack
Please let me take this opportunity also for a quick moan. Code completion is an absolutely essential feature of Delphi and it is very slow and flaky at best. Embarcadero (if you are listening) - please focus on making these core features much more robust.
Unstalling the AQTime8.20 integration in the IDE solve the problem for me too - used AQtime outside the IDE anyway.
I wrote my code in D5, then I switched to D7. Things are ok, until compile. D7 appears hang and I have to killed the process. I already deleted all the DCUs and the problem persists.
Anybody had this problem before?
Thanks!
Did you try to make the compilation via the command line compiler?
I suggest you install Delphi Speed Up from http://andy.jgknet.de/blog/ide-tools/delphispeedup
You could also download the CnPack from http://www.cnpack.org/index.php?lang=en
There are some options to Set the IDE to run in CPU 0 single core.
Try to create a new project, then add your units one by one, until it freezes...
What .Net FrameWork is installed in your system?
Try this
Project|Options|Compiler Messages dialog, there's a long list of checkboxes. The last three have to do with the Dot Net Versions.Have you unchecked those last three? I think it would not work for you, or reinstall Delphi once.
I not faced such situation (D7 in Win7 )
Try: "Project/Build All Project"
And be sure that is checket switch: "Tools/Enviroment Options/Preferences/Show compiler progress".
Than tell as where compiler stops.