Delphi: Unable to create process - delphi

I've got exactly this problem: "Unable to create process ...\project1.exe" when debugging a Win64 apps in Windows 8
But none of the answers then solves the problem. On the 10th and 11th I had updates from Microsoft for Windows 11. It can hardly not have anything to do with that. Anyone else experiencing this problem?
Windows 11 Pro v10.0.22000 build 22000
KB4023057, KB85011493, KB5012417, KB5012418, KB5012416 installed recently
Delphi 10.4 Version 27.0.40680.4203

I had the same issue, i just run BDS as administrator

Related

Delphi 10.2.3 hangs when starting (with debugging) a 32 bit application

Update: as noted by some, this is a problem brought about by NOD32. An issue item for this in their system is:
https://forum.eset.com/topic/16237-probleme-debug-delphi-with-eset-11249/
Delphi 10.2.1 and 10.2.3 hang when starting (with debugging) any 32 bit application on Windows 10/64. This started after the computer was rebooted for the weekend like it is every weekend.
Debugging a 64 bit project compiles & runs ok.
Debugging a 32 bit project compiles but hangs before/slightly after the project even starts running ("end task" on Delphi is the only option now). If I run without the debugger, the project runs ok. Delphi "stops responding".
I've seen this single form "do nothing" test application I have used to investigate this freeze after loading Kernel32 or Comdlg32.
Hearing how similar this is to the problems with Delphi 10.2 and Windows 10's Creator update, I migrated to Delphi 10.2.3. Same problem as before.
I restored to a backup of the Windows partition. After I did that, it worked until I rebooted and then it broke again.
I went to an earlier backup of the Windows partition & got the same result.
This is so strange...any ideas?
I Thought it might relate to Nod32 as I had the same issue happen after a nod 32 update.
I have added the BDS.exe directory to be excluded from real time file system protection.
Seems to be fine now.
I have seen this kind of behavior with F-Secure antivirus and Windows 10 1803 (April 2018 Update).
This is similar to the last comments on this post : http://blog.marcocantu.com/blog/2017-june-delphi-packages-creators-update.html.
The only workaround I've found was to define the affinity of the BDS.exe process.
You can do this by right clicking the bds.exe process in the Details tab of the Task Manager and Define affinity but it will only define it for the current run.
You can define affinity definitively by running BDS through the command line.
Here is my shortcut :
C:\Windows\System32\cmd.exe /C START /affinity 1 bds.exe
ESET is deploying 11.2.63.0 release of it's antivirus and the problem of freezing Delphi for Win32 debugging is now solved.

XE3 IDE runtime error 217 at 5009763B in Windows 10

When I try to start delphi XE3 IDE (bds.exe) on my laptop I get "runtime error 217 at 5009763B".
I have recently updated the laptop to Windows 10. This is the first time I tried to run delphi again. So I think it is Windows 10 that is the problem.
I have tried starting with -rfoo, no luck.
The Dutch dealer suggested going to XE8. But not all of my code and not all 3rd party packages are compatible with XE8. So that is no solution either.
The Dutch dealer also told me that some XE3 customers do and some don't have any problems using Windows 10.
Did anybody fix this problem?
I have taken the long way out and installed a clean W10 on my laptop. Now I must reinstall everything I use. I installed XE3 and now it runs ok.

Teechart control ocx not working with window 8

Actually we have integrated Teechart in our application and it works fine on windows 7 64 bit.
But now we moved to windowss 8 where our application 32 bit works fine with Teechart but 64 bit gives access violation error.
we taught it might be our issue so we build samople application seriesTxt source and tried to execute we found that the Teeeditor is disable and in out code we used it to set legend size that where it crashes.
Can you please execute the sample code in the Example by building in 64 bit and check on wwindows 8 (64 bit) whether it works fine.
Also we found out the issue might be because of casting some variable in DWORD which work in windows 7 but windows 8 required the type casting to be DWORD64 may be some where in your code this can be the issue.
Thanks
Akshay
Note we changed the CLSIDs of the components on TeeChart ActiveX v2014.0.0.2.
However, I'm afraid the demo in the "Examples\Visual C++\Version 6\SeriesTextSource" folder still references the old CLSIDs.
Updating them I could build and run the project without errors in Visual Studio 2010 here, both in 32 and 64bit, in a Windows 8.1 64bit machine.
Find here the corrected project:
http://goo.gl/7Ro3OS
Also check you have both the 32bit and the 64bit versions of the .ocx registered. To register them, open an elevated command prompt at the TeeChart installation path and run:
regsvr32 "TeeChart2014.ocx"
regsvr32 "64bit files\TeeChart201464.ocx"

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.

Delphi issues on windows 7 x64?

I searched around but I couldn't find a straight answer to these questions, only bits and pieces: if I install windows seven x64,
1 - will I be able to use delphi 2007+ as I'm used to aka start it, code in it, debug in it, compile in it ? I've seen the debugger issue and the hex edit workaround.
2 - will my application compiled in that environnement work on 32 bit versions of windows ?
3 - will my application I compiled with delphi on 32 bit windows work this 64 bit version ?
(of course all this is assuming "normal" applications as-in I don't expect things to work if I'm playing with pointers expecting them to be 32 bits long, obviously)
The overall question of this would be, as someone who is moving to windows seven 64 bits, will I be able to/should I use this as my main delphi developpement platform or will i be better off keeping a 32 bit boot for delphi dev ?
Thanks to anyone who can give me a clue about this
As Mason Wheeler stated, there's a problem with the 2007/2009 debugger and 64-bit platforms but it can easily be fixed.
I'm using D2007 (with this fix) on Windows 7 64-bit on a daily basis and it works just great.
There is now a hotfix for this.
No idea about Windows 7 64 bit version, but I have been using Delphi 4, 5, 2007 and 2009 for nearly a year now on Windows XP 64 bit, and given the effort Microsoft spends on backwards compatibility I don't see why things should be very different on Windows 7. This answers your last question - no need to keep a separate partition. Use virtualization for running things on a 32 bit system. Windows 7 does AFAIK offer you a virtualized Windows XP subsystem - at no cost, but you may need to download it separately.
Re 2. and 3.: The OS an application is compiled on does not matter for the deployment, as long as the compilation itself works. I have only ever been compiling 16 bit Delphi programs on 32 bit Windows versions, without problems. You should however always test on clean installations of your target OS versions, as a developer PC is sufficiently different from a user PC to not assume that everything will just work. This however is general advise, and has nothing to do with a 64 bit OS.
Your Delphi programs will run on a 32 bit layer (WOW64 - Windows on Windows 64) of Windows 64 bit which is close enough to the real 32 bit OS that you do not need to care about it, unless you work very closely with the lower system level.
I was doing some work on Delphi 2007 under Windows 7 64-bit yesterday, and it was a disaster. Every time I'd leave the program while debugging, either by quitting out normally or by stopping the debugger, it would raise an assertion failure that I couldn't get out of, bringing down the entire IDE. (This never happened under XP.) Apparently the WOW64 emulator isn't quite as stable as it ought to be... :(
If you're going to try to work on Windows 7 64-bit, I'd strongly recommend upgrading to Delphi 2010, which was built specifically with Windows 7 compliance in mind. If that's not an option, then at least install a VM with XP on it for your dev work.
Answers are:
1. Yes - With the workaround for the debugger issue
2. Yes - Delphi 2007 (native) will only build 32 bit applications
3. Yes - Unless it's a Device Driver or low-level service
First apply the patch as mentioned on Olaf's Blog. This fixes the debugger exit error.
Second, Install Windows XP Mode, which is a fully clean (and legal) windows XP 32bit virtual machine.
Compile application on Windows 7 64bit. Install onto the virtual machine. It should just work. Rinse, lather and repeat for other applications you are developing.
XP Mode is available to all owners of Windows 7 Professional and Ultimate editions. Don't know about corporate editions.
This is what I'm currently using for development as I had to perform an emergency OSectomy of a Macbook Pro
I run Delphi 2007 on Windows 7 Professional 64 bit and it was fine for a bit until a patch Tuesday a while ago. The IDE would die after throwing the debug error (SetThreadContext failed). I applied the patch found at http://cc.embarcadero.com/item/27521 and no more problems.
HTH. YMMV.
Doug
FYI, I am running Delphi 7 on Win7 64-bit. The trick to run this version is to NOT install to the Program Files(x86) folder - instead, install to something like C:\Delphi7. Been working with it this way for about a month now with a pretty heavy development load and it works great!

Resources