The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,482 other followers

Delphi keeping EXE locked; some links

Posted by jpluimers on 2016/07/12

For my own reference when coping with “[dcc32 Fatal Error] F2039 Could not create output file” which happens with a lot of Delphi versions:

As a temporary measure (in the end you have to restart the IDE), I often use Process Explorer to force close the open handles from bds.exe to the EXE.

It also happens intermittently using Visual Studio, where  devenv.exe keeps handles locked. Same Process Explorer trick applies there too.

You can do similar tricks with LockHunter or Handle.exe.

–jeroen

10 Responses to “Delphi keeping EXE locked; some links”

  1. ozziSteve said

    I develop using Seattle and Berlin on Win 7 hosted on a Macbook using Parallels. My preference is to have the project directories on a shared folder on the Mac and this has some implications that I use to my advantage:

    I can run up two instances of the same Win32 or Win64 program which is useful for testing tethered apps. The .exe appears to be locked, preventing a full recompilation, but the IDE launches a second or third instance without a problem. On a regular Win 7 machine I’m preventing from launching a second instance. (I don’t think I have IDEFixpack loaded on Berlin.)
    The only way to re-compile a FMX project for Android or iOS is to “Right-click Clear” the project prior to each compilation. Solution, change the output directory on the project options to C:\Temp\Somewhere for the iOS and Android configurations.

    Also, I make sure any source control applications (Git & TMS…yes, I’m sometimes using both at the same time) are shut down. I’ve got a sneaky suspicion that these fella’s are monitoring the project directory and can occasionally cause locking issues.

    • jpluimers said

      Thanks for the good comments.
      Especially tooling that monitors directories can be a pain (including many anti-virus software), so I’ve banned those from my system except for everything which doesn’t operate on the file level.

  2. Yogi Yang said

    I have been facing same problem for quite some time. I learned that using IDEFixPack seems to solve the problem.

    • jpluimers said

      I was using IDEFixPack. With that it still occurs, but not as often.

      • Yogi Yang said

        Ok then I think this Reg Entry will do the trick for your.

        I was suggested by a user called SkyDevil.

        Windows Registry Editor Version 5.00

        [HKEY_CURRENT_USER\Software\Embarcadero\BDS\14.0\Debugging\Embarcadero Debuggers\Evaluators]
        “comp32x.dll”=”-1″

        Put this in a .reg file and double click it to append it to the registery.

        • jpluimers said

          So what’s this comp32x.dll for?

          • Yogi Yang said

            To be frank. I don’t know at to what the hell comp32x.dll is for!

            I have started using this reg patch and the problem has vanished… so I don’t think much about it… as I am already loaded with dearth of work to complete in limited period.

  3. Jason Chapman said

    just as an aside, VMWare does this a lot if your VM has a VMShared folder on the host and you put a file these, the host won’t be able to rename the file eventhough no process in the VM is touching it.

  4. JRL said

    Sometimes the exe file is locked by Windows File Explorer (explorer.exe) if you have one instance open viewing exe folder, specially if exe file is selected or visible in the list view.

    I guess that it has some relation with automatic refresh of the icon by the list view when the file is modified after compilation+linking.

    It usually stops to happen if other file is selected, the view is scrolled such as the exe file ceased to be visible, or other folder is displayed, but the best option is to close that file explorer instance.

    I have also seen this same problem updating a WinZip self-extractor.

    • Yogi Yang said

      JRL,
      From my experience I can say that it is not Windows Explorer problem. It is Delhi IDE problem. To be specific it is the Debugger. If you change the setting of the IDE to generate debug symbol file separately from the exe you will observe that the thus generated .tds file seems to get locked up.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: