New TFrame and TDataModule crashing Delphi IDE - delphi

Here is the problem I've met:
Working in BDS 2006 IDE, my older computer gone, new ( i7 mount ) has been built and it has Windows 7 Ult OS 64bit, where 2006 was installed and QuickReports Pro as well as eDocEngine, FIB+, TMS, LMD, ZEOS & DB Comparer Component Packs - I use them in my products.
On computer I have Office 2010 installed as well, by default in 32bit version and Adobe CS6. That's it.
After installation I tried few times reinstall RAD 2009 and anyway, always the same problem, to simplify it is 100% reproducable like that:
Create new Delphi VCL Forms application ;
Click File / New / Other and goto, say, "Delphi files" and select Frame or DataModule. When new file is created, all the time we have message:
"Stack overflow - save your work and restart Delphi for Microsoft Windows"
After that IDE set in bad state and next F12 ( show VCL designer) closes Delphi with General Error.
Any idea what happens?
As I said, I tried few time uninstall - install 2006, start in any personality, use / do not use any of the updates or IDE fixes from Andy's site, nothing helps.
Any help would be greatly appreciated.

You can try running a second instance of the IDE in the debugger.
Create an empty dll or package project.
Open Run > Parameters
Set the host application to $(BDS)\bin\BDS.exe
Then just hit F9 to run the second instance of the IDE in the debugger. After that just follow the steps to reproduce the problem and wait for the exception. If all goes well you'll get a complete call stack to step through.
Note: You may see various other exceptions occurring as the IDE loads. These are normal and can usually be ignored.
Also you didn't mention what version of Windows was on your old machine. If it was Windows XP Uwe could be right. XP was a little more lax on security by default than Vista or 7. The new default is to restrict write access to any folder under Program Files. If that turns out to be the problem you can adjust the write permissions for $(BDS) for whatever user account you use for development.

Delete de PackageCache in Embarcadero registry entries. Its not a complete solution but worked for me.
Got that from here: http://qc.embarcadero.com/wc/qcmain.aspx?d=118669 (last answer).

I have no BDS 2006 at hand, but is it possible that the default folder for new projects is located below the Program Files folder? In that case there might be no write access to that folder.

Related

Delphi Rio after patching not starting

I just did a complete system rebuild (format C drive and go from there)... Win 10 Pro 64 bit. I reinstalled Delphi Rio, the INITIAL release (6.7GB).... Delphi started up fine. I had previously downloaded Delphi Rio Patch 2, (7.3GB), so I unzipped it, and ran setup. It automatically chose the middle option (Modify), so I left it at that... and installed. It appeared to run fine. After completion, I noticed that it had removed the Delphi icon I created on my desktop, and that the links in my start menu for Delphi no longer work... I did not investigate a whole lot, as I had a patch 3 (7.9GB) to install as well. I unzipped, ran setup, and again Modify was the default option, so I ran with that... no errors. When completed, I tried to run Delphi. I have what I think is the appropriate directory structure (C:\Program Files (x86)\Embarcadero\Studio\20.0\bin) with 298 files in the bin directory, however bds.exe is NOT one of the files. Any idea what is going on?
The only possibility I can think of is that I have let my subscription expire.... and I am not entitled to the patches, yet the Embarcadero support system let me download them. Could this be the explanation?
Updating a certain Delphi version is usually done like this:
Download new ISO file or web installer
Uninstall the Delphi version you want to update and keep the registry settings (you are asked about this during the process)
Run setup from downloaded ISO or web installer
Your approach of installing the newer version on top of the older one is clearly the wrong way.
This is also explained in the install instructions (readme file) that comes with every ISO or web installer.

Delphi 2006-2010 error: "Cannot create file C:\Users\Admin\AppData\Local\Temp\EditorLineEnds.ttr"

I am getting an error after installing Delphi 2007 (Edit: This problem occurs in all Delphi versions from 2006 to 2010) that I can not figure out and have never seen before. After restarting I can launch the program without any problems, but if I were to close out of the program and start again it will give me the following error:
"Cannot create file C:\Users\Admin\AppData\Local\Temp\EditorLineEnds.ttr". The process cannont access the file because it is being use by another process."
"System" has a handle on this file that cannot be cleared unless I reboot. I can also correct the problem by renaming the file before I launch the program.
I have tried reinstalling the program with no luck.
Version installed: CodeGear™ Delphi® 2007 for Win32® R2 Version 11.0.2902.10471.
Operation System: Windows 7 Pro 64bit
Update 08/14 13:35 EDT
Tried the following solutions, but still having the same file lock issue:
Renamed Temp Directory to a directory I know had full security rights. Files would be created in this directory when launching Delphi, but EditorLineEnds.ttr would still get locked by SYSTEM and prevent me from relaunching.
Uninstalled the following security updates KB2982791 and KB2976897, but this did not solve the problem. I have suppressed windows updates for now and will try uninstalling all security patches for 8/13.
Uninstalled Delphi completely and re-installed. Problem still occurs after re-installing everything.
I will try reinstalling Windows from scratch and install Delphi before Windows
updates to see if updates are truly the cause. My workaround for now is just renaming EditorLineEnds.ttr before launch Delphi.
There are three solutions to this that I am aware of:
Try uninstalling the Windows security update KB2982791 which was already mentioned by Francisco Caffagni. This solved the issue for me (Windows 8.1 + Delphi 2007) but it might not be such a good idea to uninstall a Windows security update.
Rename the file every time you start Delphi. See below for a simple program that does it for you.
Use Andreas Hausladen's IdeFixpack (Delphi 2007 version, beware that version 4.4 does not work under Windows 8, version 4.3 seems to work), (for later Delphi versions) Note that the editor option Show Lineends will use a different character if you use this fix because the IDE won't load the EditorLineEnds.ttr font any more. (Solution 1 and 2 don't have this drawback, but who uses that option anyway?)
Note: Microsoft withdrew this fix a few days later and issued a new one KB2984615 on 2014-08-27. Unfortunately this did not fix the issue for me. Maybe uninstalling KB2982791 first and then installing KB2984615 might work, but I haven't tried it.
I wrote a simple program, that solves the issue for me:
It uses FindFirstChangeNotification / FindNextChangeNotification and checks whether that file exists and if yes, moves it to a unique subdirectory in %temp%.
Binary download
The source code is available from sourceforge.
This is my bds_start.bat script running Delphi2006 on Win7-64bit system. I customized GabeMeister answer and similar script found in one of the links. I now can restart DelphiIDE without reboot. All ttr temp files are still locked by system so del command may not work. They are deletable once system is rebooted.
It's however impossible to restart Delphi double clicking myproject.dpr project files. I was afraid to install IDEFixPack for D2006 because one of comments did not promise it to work.
bds_start.bat
#REM http://www.danielmagin.de/blog/index.php/2014/08/windows-update-disable-delphi-2007-2010/
#REM http://stackoverflow.com/questions/25295980/delphi-2007-error-cannot-create-file-c-users-admin-appdata-local-temp-editorl
#REM http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/idecommandline_xml.html
#REM del files created by DelphiIDE, may not able to delete but
#REM moving to a new name is possible. Use unique name by timestamp.
del "%temp%\EditorLineEnds*.ttr"
set dt=%date%_%time:~3,2%-%time:~6,2%
rename "%temp%\EditorLineEnds.ttr" "EditorLineEnds_%dt%.ttr"
start "" "C:\Borland\BDS\4.0\Bin\bds.exe" -pDelphi
Running CBuilder change argument to -pCBuilder. Maybe best fix would be to create bds.exe replacement tool, del/move *.ttr file, run and passthrough cmd arguments to the original bds_original.exe file. This should enable *.dpr double click restarts. Or use BdsLauncher.exe which I think is regedit linked to *.dpr extension. Then process list had bds.exe name.
Here is another workaround from http://www.danielmagin.de/blog/index.php/2014/08/windows-update-disable-delphi-2007-2010/
Quote:
you can rollback easy in two ways
1: create a batch file with following lines
wusa /uninstall /kb:2982791
wusa /uninstall /kb:2970228
this batch file you run on start up of windows. but with auto update both updates installs every time
2: disable the KB's from autoupdate
after update goto WindowsUpdatesin your system. disable both KB's so on new updates it will be not
installed again
For Delphi 2007, install IDEFixPack 4.4 and add add the following environment variable to the system settings:
IDEFixPack.DisabledPatches=DotNet.GlobalizationSearch
Reboot and it should work.
I have 2 desktops with Win 8.1 Pro and its working like a charm!
If you are on windows, I made a batch file shortcut for starting Delphi. Basically it is a batch file that changes the name of EditorLineEnds.ttr to the current date time, moves it to a different sub folder, and then starts Delphi.
Here are the contents of my batch script:
SET HOUR=%time:~0,2%
SET dtStamp9=%date:~-4%%date:~4,2%%date:~7,2%_0%time:~1,1%%time:~3,2%%time:~6,2%
SET dtStamp24=%date:~-4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%
if "%HOUR:~0,1%" == " " (SET dtStamp=%dtStamp9%) else (SET dtStamp=%dtStamp24%)
if exist "C:\Users\<username here>\AppData\Local\Temp\EditorLineEnds.ttr" (
echo "Moving EditorLineEnds.ttr"
MOVE "C:\Users\<username here>\AppData\Local\Temp\EditorLineEnds.ttr" "C:\Users\<username here>\AppData\Local\Temp\ExtraEditorLineEnds\%dtStamp%.ttr"
) else (
echo "EditorLineEnds.ttr was not found."
)
start "C:\Program Files (x86)\CodeGear\RAD Studio\6.0\bin\bds.exe"
Just to point out that the KB2982791 update has been withdrawn by Microsoft. The reasons cited appear to be problems with font rendering and system crashes and not this specific issue which, on the face of it, does appear to be the fault of Delphi and is merely exacerbated by the update.
The KB article on the Microsoft site has been updated: http://support.microsoft.com/kb/2982791
Specifically these sections are of interest:
Known issue 2
Microsoft is investigating behavior in which fonts do
not render correctly after any of the following updates are installed:
2982791 MS14-045: Description of the security update for kernel-mode
drivers: August 12, 2014
2970228 Update to support the new currency
symbol for the Russian ruble in Windows
2975719 August 2014 update
rollup for Windows RT 8.1, Windows 8.1, and Windows Server 2012 R2
2975331 August 2014 update rollup for Windows RT, Windows 8, and
Windows Server 2012
Status
Microsoft has removed the download links to
these updates while these issues are being investigated.
Known issue 3
Microsoft is investigating behavior in which systems may
crash with a 0x50 Stop error message (bugcheck) after any of the
following updates are installed:
2982791 MS14-045: Description of the
security update for kernel-mode drivers: August 12, 2014
2970228
Update to support the new currency symbol for the Russian ruble in
Windows
2975719 August 2014 update rollup for Windows RT 8.1, Windows
8.1, and Windows Server 2012 R2
2975331 August 2014 update rollup for Windows RT, Windows 8, and Windows Server 2012
This condition may be
persistent and may prevent the system from starting correctly.
Status
Microsoft has removed the download links to these updates while
these issues are being investigated.
The problem seems to be with Windows Updates installed on 13th August.
I tried uninstalling KB2982791 as suggested by the previous poster, but that did not fix the problem.
Uninstalling all Windows updates from 13th August did cure the problem however.
The same for CodeGear Delphi 2009 on Windows 7
Uninstalling following windows update 2982791 2970228 wont help.
Using IDE Fix Pack after that will help.
dzEditorLineEndsFix - Cannot create file %Temp%\EditorLineEnd.ttr
This is a small program that fixes the problem introduced by the Windows update KB2982791 with Delphi 2006 to 2010 that causes the error "Cannot create file %Temp%\EditorLineEnds.ttr".
It works by moving the file to its own unique subdirectory whenever it is being created.
I'm using Windows 8, not 8.1
I turned off all Windows updates and yesterday I checked for updates and installed all security updates. Today I have the same problem, but none of the above mentioned update was installed on my notebook.
I looked for all of them, but did not find any between installed security updates:
KB2982791, KB2970228, KB2975719, KB2975331
But I found another update KB2993651 and tried to uninstall it, uninstallation process was halted. I reset my comp. Now I cant find this update, and the problem did not solved.
So did not find a another workaround and created the following script, that I run before opening RAD 2010.
cd %temp%
ren EditorLineEnds.ttr EditorLineEnds%RANDOM%.ttr
I'm using the %RANDOM% function, because with the fixed name on second time the renamed file will also be locked and the script will not succeed on rename.

AV in IDE when opening any project or creating new in Delphi 7

After many years of trouble-free use, Delphi 7 is now throwing an Access violation at address
40233A3E in module 'vclx70.bpl'. Read of address 0000021C.
When starting the IDE, the default empty project and unit/form appear and compile and run fine.
I'm developing Windows apps, running on Windows 7 (x64).
I haven't installed any new packages or tools in many, many months.
I stopped, dead in the water, unable to work.
Any suggestions other than a complete rip and re-install (which takes many hours...)
EDIT: I un-installed and re-installed Delphi 7. Now I'm getting Access violation in vcl70.bpl. I would have thought that uninstalling D7 would completely remove all of its libraries, etc... Are there folders that I should manually delete after uninstalling D7?
Problem fixed (and major machine rebuild averted)!
Gerrit Beuze of ModelMaker Tools suggested elsewhere:
Remove all .dsk (project desktop) files for the project you try to load, Temp remove all *.dst (desktop files) from C:\Program Files\Borland\Delphi7\Bin
After performing these steps, the problem appears to have been fixed.
A read at that low a memory address is typically a problem in a third-party component. However, you say you haven't installed anything new in months.
The other thing that's strange is that you're getting the error in vclx70, which is one of the CLX libraries. Are you doing anything using the CLX (leftover cross platform - Kylix) forms or dialogs?
If not, you might do a search in your source for QDialogs, QForms, or any of the other units in %PROGRAMFILES%\Borland\Delphi7\Source\Clx, and see if something mistakenly was added that you didn't intend that's pulling CLX into your project. If so, change it to the VCL version instead (by just removing the 'Q' from the front of the unit name in your source).
EDIT: You might try going into the registry (D7 would be HKCU\Software\Borland\Delphi\7.0) and temporarily changing the name of the delphiCLXide entry in Known IDE Packages to something else (put an underscore in front of the name or something). Then start the IDE. You should get an error message about Delphi being unable to load the package, and asking if you want to try and load it again in the future. Answer 'Yes', and let the IDE continue to load. Then try again with your project and see what happens.
The step above removes CLX temporarily from loading in the IDE designer. (Don't worry, you can just rename the key again to put it back if it's not the problem. If it doesn't come back, make sure the IDE didn't add an entry in the Disabled Packages entry; if it did, just remove it.)
If this works, you can open the project options (.DOF) file for your project, and remove the CLX libraries from the Packages list. This prevents it from being included when your project is loaded.
Once you've established whether the problem actually
My first suggestion would be to use XP Mode or another VM infrastructure to run such an old Delphi version on Windows 7 (I do it that way).
Another potential method is to use the compatibility settings in Windows 7 to set it to XP and to exempt the Delphi 7 process from DEP (data execution prevention) policies the system may otherwise impose. I've had some trouble with enabled DEP with older Borland IDEs and also VS 2003.

How to install Virtual Treeview?

Virtual treeview by Mike Lischke seems so popular on the web and as third party component. I just downloaded version 4.8.7 on my machine.
I have Delphi 2010 and Delphi 7.0 in 2 partitions.
Aftter clicking installer of virtual treeview, a log file prompts, saying it has been installed successfully.
I check Delphi 2010, yes, it is on component palette showing 3 controls.
But when I start Delphi 7.0, IDE prompts 'Can not load VirtualtreesD7.bpl...'. I ignore it, and find that Virtual treeview design time package is in list but UNCHECKED. If I try to check it, again it promts "Can not load virtualtreesD7...".
I search whole Disk and find a VirtualTreesD7D.bpl, and manually add it in design time package list. It is on palette with 3 controls.
I tested it quickly and exit Delphi 7.0. But when I restart Delphi 7.0, again it prompts "Can not load VirtualtreesD7.bpl...", it is again not on palatte and not Checked in design time package list.
This is very simple question. Can you let me know how to solve it?
Thank you very much in advance.
Edit:
Thanks for comments.
I tested your comments, but not work.
New problem:
If I uninstall virtual treeview by clicking unins000.exe and reinstall it only in Delphi 7.0, the installer prompts in the last screen ''...completed.." and no error prompts. When I start Delphi 7, the virtual treeview design time package is not in package list. This is even worse than the last time (last time it is in package list but not checked).
I check very carefully one line by one line of that log file, it says:
...
...
VirtualTreesD7.dpk(39)
VirtualTreesD7.dpk(39)
VirtualTreesD7.dpk(41)
VirtualTreesD7.dpk(43)
**VirtualTreesD7D.dpk(32) Fatal: Required package 'VirtualTreesD7' not found**
Why?
Why it does not successfully install and does not prompts the error in installation in the last install screen.
How to solve this "Fatal...not found" problem.
Thank you all for help.
New Edit: (Is this Answer?)
Thanks for your help and suggestion first.
I take 2 hours to test and find a possible solution. It works on my machine and it can be installed in Delphi 7.0.
Steps:
1. uninstall virtual treeview by clicking unins000.exe from Delphi 7.0 ( you can separately install virtual treeview in Delphi 2010)
2. clicking newly downloaded VirtualTreeview setup 4.8.7.exe, install it in Delphi 7 folder, do not install it in default...Rad..path. Important: INGNORE ALL ERROR PROMPTS DURING INSTALLATION (INCLUDING ERROR PROMPT IN THAT LARGE INSTALLATION LOG FILE).
3. Go to $\Virtual Treeview, right click VirtualTreesD7D.dpk, select Open with Delphi 32 development environment. A window prompts for you to compile. JUST CLICK COMPILE, DO NOT CLICK INSTALL.
4. Go to Component -> Install Packages. Go to $\Bpl folder and manually add VirtualTreesD7D.bpl into Design Package. The three controls will appear in Palette.
5. Go to folder $\Bpl and YOU MUST COPY VirtualTreesD7.bpl (NOT VirtualTreesD7D.bpl) INTO $\Bin folder.
6. Close Delphi 7 and restart it, you will find that this component is on Palette and in Package list, it is in Design package list and CHECKED.
I personally feel that the installer of Virtual treeview needs improvements to free users from such trouble and test in installation. The installer needs rewrite.
This is my case of installation. I do not know if it can be generalized to all users.
Thank you all.
The IDE uses LoadLibrary (actually, LoadPackage) to load packages for components that are installed. This means that it follows the same logic for where it looks for files that LoadLibrary does.
The problem is that the IDE can't find the package using LoadLibrary's search logic - see the Remarks section here. So the solution is to add the folder to Delphi's Library Path (Tools->Options->Environment Options->Delphi Options->Library - Win32), or move it somewhere on the system PATH.
Ensure you have the folder where the virtualtrees.pas (\source) is located in the environment search path.
You may manually need to install the *.dpk file for Delphi 7. Open the D7.dpk, compile then open and install the D7D.dpk (Runtime first then Designtime package)
Haven't done it on Delphi2010 w/ Delphi7, but installing with just Delphi7 is fine.
*edited

Where does CodeGear Delphi 2009 store settings

I'm running windows 7 ultimate (32bit) and have a very anoying problem with my installation of delphi.
The problem is with the feature "Code Insight" and with "Code template completion", it is very anoying when it every time i write something and it wants to complete some piece of code for me (for example i hate it when he completes the for condition). The problem is that i can't shut it down since i think it has a bug when installed on windows 7 that when i turn those features off it works once and then it turns on again, like it couldn't write in the settings file.
Does anybody know where Codegear Delphi 2009 stores it's setting/configuration file? Or how can i turn off.
I tried running it as administrator in compatibility mode (vista and xp) tried searching for the file but with no luck.
In the registry under: HKEY_CURRENT_USER\Software\CodeGear\BDS\6.0
Also in HKEY_LOCAL_MACHINE\SOFTWARE\CodeGear\BDS\6.0 but there seems to be no data there of interest.
Also under C:\Users*USERNAME*\AppData\Roaming\CodeGear\BDS\6.0 are some settings stored.

Resources