Monday, 31 October 2016

Solution to Delphi IDE Freezing Problem

Over the last few years I've been using Delphi XE, and on quite a few occasions the IDE can just freeze for what seems to be no reason. It does not appear to be an issue with small projects, but mainly larger projects and might relate to code insight and how I have it configured. When this problem occurred I use to 'End Task' in task manager, which meant potentially losing some work, but the best solution for when this happens to to find the directory that contains all the 'dcu' files and delete them.


  1. This is also the work around we've been using for many many years. I almost never have to restart the IDE even though it freezes constantly.
    On my desktop I have a shortcut (with a keyboard shortcut assigned) to a shell script that deletes the 20 oldest files in the dcu folder. When the IDE freezes I just press the assigned key and the IDE magically unfreezes.

  2. Good idea, think I will do the same. It's a shame Embarcadero does not fix the issue. Maybe in the next version.

  3. Here's my script. Note that I'm deleting the 10 most recent files. Not the 20 oldest as I wrote.

    @echo off

    echo Deleting most recent 10 files from Trunk DCU folder
    echo ----------------------------------------------

    set folder=C:\blah\blah\Lib
    set /a count=0
    for /f "delims=" %%F in ('dir /o:-d /t:w /b "%folder%\*.dcu"') do (
    del %folder%\%%F
    echo %%F
    set /a count=!count!+1
    if !count! == 10 goto :exit
    echo ----------------------------------------------