News/Info Patch 2 for RAD Studio 10.4 now available


Staff member
Patch 2 for RAD Studio 10.4 now available
17 Jul 2020 by Marco Cantu
This patch addresses a number of issues in RAD Studio 10.4, pertaining to Delphi Compiler, the RAD Studio IDE in general and the new LSP-based Code Insight in particular, plus C++ Builder Android exceptions and some debugger issues.

The installation of this patch requires a prior installation of Patch #1 (separately available on GetIt and in the download portal). Installing this patch is recommended for all RAD Studio 10.4 customers. Note that this patch is fairly large to download (around 190 MB).

The patch includes detailed installation instructions as part of the Readme. Please read the steps carefully (or the corresponding steps in this blog post), as the GetIt download does not install the patch automatically. You must follow the instructions in order to install. Just using GetIt is not enough.

How to Download Patch 2
We recommend you use GetIt in the RAD Studio IDE to download the patch. The patch should be listed on the Welcome Page in the IDE, and available in the “Patches and Hotfixes” section of the GetIt Package Manager, as depicted here:

There is more one patch, depending on your edition. You should see only one of them (Professional or Enteprise and for different personalities), install it.

Note: Installing Patch #2 through GetIt in the IDE requires an internet connection. If you installed RAD Studio via the Offline (ISO) Installer, you might also need to issue the command GetItCmd.exe -c=useonline (unless you have already issued the command once).
You can also download the patch via the new download portal,, copy it to the development machine, unzip and follow the same installation steps.

From GetIt once you select the Patch #2 and press the install button, it will ask you to accept the RAD Studio license (under which it is released). Agree to the license and it starts the download. This will take some time:

How to Install Patch 2
Once the download is completed, GetIt will open the readme file and the download folder (see below). The installation of Patch 2 needs to be done manually, as GetIt only downloads the patch, it does not install it.

The patch executable is copied along with a ZIP file into a folder like:

The folder is opened automatically by the last GetIt action. Now, close the RAD Studio 10.4 IDE (and also any other earlier versions of RAD Studio IDE that may be running) and from the folder mentioned above, run the batch file patch2.bat.

Note: The following installation steps might trigger warning by your antivirus software.

The process requires elevation and proceeds showing the steps and adding a detailed log file to the catalog repository folder:

As you can see in the image above, the installation displays some warning (actually 2) as it adds files that were missing in the original 10.4 release. This is expected. The information displayed on the screen is also logged in a file called patch.log in the Catalog Repository folder for the patch.

At the end of the process, the command line window closes and you can restart the RAD Studio 10.4 IDE.

Verifying Correct Installation
To verify that the patch has been successfully installed, you can look at the timestamp of the replaced files, for example getit170.bpl under the bin folder should have a July 2020 timestamp (rather than the May 2020 one most files have).

Uninstallation Steps
In case you run into any issues with the patch you can remove the it by closing RAD Studio, opening the Catalog Repository installation folder (the same folder mentioned above) and run patch2uninstall.bat. This will restore the backup files of the original version.

The patch process creates a backup of the files replaced in a _patch_backup subfolder of the RAD Studio main installation folder. For each execution, it creates a subfolder with the installation timestamp, which also includes an install.log file. As an alternative for uninstalling the patch, you can manually copy the files from this backup folder to the main BDS folder.

Only after you have uninstalled the patch, you can uninstall the package from GetIt. If you uninstall the package from GetIt first, it will remove the download and the uninstall script, but not the installed patch. In this case, you can manually restore the files from the backup folder as indicated above or you can download the patch again and run the uninstall batch file.

List of Customer Reported Issues Addressed in 10.4 Patch 2
RAD Studio 10.4 Patch #2 addresses the following issues reported by customer on Embarcadero Quality Portal (

RSP-29628 VCL Grids bug
RSP-29560 [REGRESSION] Misalignment in TStringGrid, StretchDraw method in OnDrawCell
RSP-29412 Compiler generates incorrect code for if-then
RSP-29402 Delphi 10.4 TStringGrid.OnDrawCell bug
RSP-29374 Wrong rect coords in TStringGridDrawCell, so image are drawn at wrong position
RSP-29347 [DelphiLSP] IDE Crashes when view form as text is selected and running LSP server
RSP-29310 Internal error L891 when linking because of complex types based on records with class var
RSP-29299 CODEGEN bug in managed fields initialization, associated with new management operators.
RSP-29271 [DelphiLSP] Code Insight adds unneeded () when changing procedures/functions
RSP-29256 Compiler generates wrong code for template function
RSP-29227 Incorrect property value obtained from the record
RSP-29226 Access violation with working code under 10.2
RSP-29218 compiling static library under Android error E4620 processing resource .fmx -2 raised
RSP-29172 Access Violation when opening License Manager
RSP-29142 GoTo statements not working
RSP-29136 Dialog constantly pops up during debugging
RSP-29129 iOS App simply crashes with a TWebBrowser on it.
RSP-29127 Compiler internal error if you ignore the result of a function that returns a generic record
RSP-29124 ICE E1812
RSP-28989 License Manager has access violation error when i click on Workstation Licenses
RSP-28887 Space does not finish code completion
RSP-28857 Default(T) generates bad code for managed record
RSP-28821 [Regression] TStringGrid.OnDrawCell parameter Rect contains wrong values
RSP-28808 Project options dialog page "Delphi Compiler" is not populated when opening the dialog
RSP-28796 RVO for M-records: initialisation of local variables
RSP-28761 [REGRESSION] E2154 Type 'T' needs finalization - not allowed in variant record
RSP-28737 Compiler error when inlining new Bit Counting Standard Functions
RSP-28735 Managed Records Causing Internal Compiler Error
RSP-28717 Delphi Package fails to compile
RSP-28701 Bind visually on TDBGRID kills the IDE
RSP-28669 [BadCG] Value M-record parameters: improper AddRefRecord
RSP-28659 RVO for M-records: assignment to local variables
RSP-28616 [BadCG] Operator Assign should not allow non-default calling conventions
RSP-28615 [BadCG] In the absence of Initialize, finalisation is not guaranteed for local variables
RSP-28552 Poor code generation for local managed record variables
RSP-28499 Options - Translation tools - Font - Corrupted?
RSP-28476 LSP ErrorInsight in Structure Pane only shows one keystroke after editor
RSP-28400 [BadCG] Operator Assign is not always invoked for fields
RSP-28372 [Regression] Bad codegen in function returning generic type
RSP-27268 C++ Builder 10.3.3 Android Exceptions
RSP-27251 Internal error when trying to inline with optimization on
RSP-24079 Package version is broken
RSP-23403 Build for linux 64 error
RSP-23024 Record helper class constructor gives senseless compiler warning
RSP-22318 Pointer type check missed when object field is a dynarray
RSP-21554 Compiler generates incorrect code for parameterized record type
RSP-21248 Const dynamic array unexpectedly contains uninitialized data
RSP-20372 A generic "reference to function" will only match the first of several overloaded functions
RSP-19714 Win32 compiler - Memory corruption with array helpers
RSP-18241 *.c source files, added to C++ project, got added to DeploymentManager file list
RSP-18148 AV in TList<T>.Remove (64-bit compiler only)