FireDAC: Access Violation in bds.exe when using the VCL component

Klicke hier für den deutschen Artikel.

Symptom

When inserting a List & Label component, such as TListLabelXX from the palette, an Access Violation may occur in the bds.exe module, accompanied by a call stack of this form:

...
{exceptiondiag290.bpl} JclDebug.TJclStackBaseList.Create (Line 4932, "JclDebug.pas" + 3)
{rtl290.bpl } System.TObject.InitInstance (Line 18514, "System.pas" + 8)
{rtl290.bpl } System.@AfterConstruction (Line 19710, "System.pas" + 2)
{rtl290.bpl } System.TMonitor.Exit (Line 20105, "System.pas" + 1)
{ListLabelXXComponents.bpl} ListLabelXX.TListLabelXX.JobFree (Line 1954, "ListLabelXX.pas" + 3)
{ListLabelXXComponents.bpl} ListLabelXX.TListLabelXX.Destroy (Line 1103, "ListLabelXX.pas" + 1)
{rtl290.bpl } System.@ClassCreate (Line 19691, "System.pas" + 35)
{rtl290.bpl } System.@IntfCopy (Line 39146, "System.pas" + 6)
{rtl290.bpl } System.@AfterConstruction (Line 19710, "System.pas" + 2)
{ListLabelXXComponents.bpl} ListLabelXX.TListLabelXX.JobInit (Line 1902, "ListLabelXX.pas" + 10)
{ListLabelXXComponents.bpl} ListLabelXX.TListLabelXX.Create (Line 1090, "ListLabelXXpas" + 41)
{delphicoreide290.bpl} CompPalMgr.TComponentPalettePageItemDelegate.CreateComponent (Line 2743, "CompPalMgr.pas" + 2)
...

Possible Cause and Background

When the List & Label component is utilized, the native modules/DLLs are loaded. These are located in the Windows installation at <InstallDIR>\Redistribution\x86\ for the 32-bit modules and <InstallDIR>\Redistribution\x64\ for the 64-bit modules. To facilitate the loading of these modules, the List & Label installation already incorporates both paths into the system’s PATH variable.

However, in certain scenarios, Embarcadero RAD Studio may be unable to read or utilize the values from the PATH variable, or it might have its own PATH variable defined in its environment settings, which overrides the system’s PATH variable.

Possible Solutions

In Embarcadero RAD Studio, under Tools > Options > IDE > Environment Variables in the section User System Overrides, there is already a different PATH variable that does not yet include the paths from the List & Label installation. Please update this separate PATH variable accordingly to include the values from the List & Label installation.

Alternatively, you can check the file environment.proj in the directory %APPDATA%\Embarcadero\BDS\<Version>\ to see if the paths from the List & Label installation are included in the PATH variable, and if necessary, update them there as well.