GExperts Bug Report
Description:
When building packages we use in Delphi 11.1 patch 1 with a .bat script (it starts IDE, builds packages with command line and closes IDE) when IDE is closing an Application Error appears:
Exception EAssertionFailed in module GExpertsRS110.dll at 00070619.
Call DeactivateFontsInfo before calling this.
(D:\source_sourceforge\GExperts\externalsource\UniSynEdit\SynTextDrawer.pas, line 475)
Bug Details:
The bug is reproducible 100% of the time
The bug occurs on multiple machines
Steps:
bds.exe -ns -b .\PackageGroup.groupproj
Configuration:
OS: Windows 10 (1903) (kernel 10.0.19041 build 1645)
GExperts: GExpertsRS110.dll 1.3.21.3833 from 2022-04-09 12:59:42
IDE: ideRS11U1
ComCtl32: <unknown></unknown>
Installed Experts:
$(BDS)\Bin\Scooter.BeyondCompare.Expert.dll = Beyond Compare IDE Package
D:\programy\CnPack\CnWizards\CnWizLoader.dll = CnWizards_Loader
d:\programy\GExperts for RAD Studio 11\GExpertsRS110.dll = GExperts
Installed Packages:
__Embarcadero Metropolis UI Live Tile Standard Components = $(BDSBIN)\dclMetropolisUILiveTile280.bpl
Embarcadero XML Components = $(BDSBIN)\dclxml280.bpl
Embarcadero Git Integration = $(BDSBIN)\gitide280.bpl
Embarcadero Mercurial Integration = $(BDSBIN)\hgide280.bpl
Embarcadero Subversion Integration = $(BDSBIN)\svnide280.bpl
User interface code for subversion integration = $(BDSBIN)\svnui280.bpl
Subversion integration = $(BDSBIN)\svn280.bpl
Embarcadero LiveBindings Components = $(BDSBIN)\dclbindcomp280.bpl
Embarcadero Experts UI Components = $(BDSBIN)\ExpertsUI280.bpl
Embarcadero Common Design Resources = $(BDSBIN)\dclcommon280.bpl
Embarcadero LiveBindings Components FireMonkey = $(BDSBIN)\dclbindcompfmx280.bpl
Embarcadero - RTL Component Editors = $(BDSBIN)\dclrtl280.bpl
Embarcadero - Tethering Component Editors = $(BDSBIN)\dcltethering280.bpl
Embarcadero ActionBar Components = $(BDSBIN)\dclact280.bpl
Embarcadero Database Components = $(BDSBIN)\dcldb280.bpl
Embarcadero Standard Components = $(BDSBIN)\dclstd280.bpl
Embarcadero Editor Emacs Enhancements = $(BDSBIN)\dclemacsedit280.bpl
Embarcadero Markup Language Wizards = $(BDSBIN)\dclmlwiz280.bpl
Embarcadero QuickEdit Designer 2.0 = $(BDSBIN)\dclQuickEdit280.bpl
Embarcadero ShareContract Components = $(BDSBIN)\dclshare280.bpl
Embarcadero WinX Controls = $(BDSBIN)\dclwinx280.bpl
Embarcadero Sample Debugger Visualizers = $(BDSBIN)\samplevisualizers280.bpl
Embarcadero Control Panel Applet Package = $(BDSBIN)\applet280.bpl
Embarcadero Usertility Analytics Component = $(BDSBIN)\dclappanalytics280.bpl
Embarcadero LiveBindings Components VCL = $(BDSBIN)\dclbindcompvcl280.bpl
Embarcadero MyBase DataAccess Components = $(BDSBIN)\dclmid280.bpl
Embarcadero Internet Server Wizards = $(BDSBIN)\dclnetwiz280.bpl
Embarcadero Internet Components = $(BDSBIN)\dclnet280.bpl
Embarcadero Experts Creators Components = $(BDSBIN)\ExpertsCreators280.bpl
Embarcadero VCL Database Components = $(BDSBIN)\dclvcldb280.bpl
Delphi 1.0 Compatibility Components = $(BDSBIN)\dcl31w280.bpl
Embarcadero Sample Components = $(BDSBIN)\dclsmp280.bpl
Embarcadero Editor Script Enhancements = $(BDSBIN)\dclsmpedit280.bpl
Embarcadero Touch Components = $(BDSBIN)\dcltouch280.bpl
Embarcadero Unit Testing IDE Package = $(BDSBIN)\DUnitXIDEExpert280.bpl
Embarcadero InterBase Express Components = $(BDSBIN)\dclib280.bpl
Embarcadero InterBase Express Monitoring = $(BDSBIN)\ibmonitor280.bpl
TeeChart Lite FMX Components = $(BDSBIN)\dclFMXtee9280.bpl
TeeChart Standard VCL Components = $(BDSBIN)\dcltee9280.bpl
Embarcadero Mobile Wizard Help = $(BDSBIN)\MobileWizardExpert280.bpl
Data Explorer Reusable Services = $(BDSBIN)\DataExplorerService280.bpl
Embarcadero Driver Components = $(BDSBIN)\dclDBXDrivers280.bpl
Embarcadero Intro Driver Components = $(BDSBIN)\dclDBXDriversInt280.bpl
Embarcadero REST-Backend Components = $(BDSBIN)\dclRESTBackendComponents280.bpl
Embarcadero REST-Library Components (Designtime) = $(BDSBIN)\dclRESTComponents280.bpl
Embarcadero dbExpress Components = $(BDSBIN)\dcldbx280.bpl
Embarcadero SimpleDataset Component (DBX) = $(BDSBIN)\dcldbxcds280.bpl
Embarcadero Cloud management components = $(BDSBIN)\dclCloudService280.bpl
FireDAC Data Explorer Integration = $(BDSBIN)\DataExplorerFireDACPlugin280.bpl
Embarcadero FireDAC Components = $(BDSBIN)\dclFireDAC280.bpl
LiveBinding Expression Components FireDac = $(BDSBIN)\dclBindCompFireDAC280.bpl
Embarcadero FMX FireDAC Components = $(BDSBIN)\dclFMXFireDAC280.bpl
Embarcadero VCL FireDAC Components = $(BDSBIN)\dclVclFireDAC280.bpl
Embarcadero FMX Standard Components = $(BDSBIN)\dclfmxstd280.bpl
Embarcadero Style Designer Package = $(BDSBIN)\fmxstyledesigner280.bpl
Edge WebView2 Components = $(BDSBIN)\dcledge280.bpl
Internet Explorer Components = $(BDSBIN)\dclie280.bpl
DBExpress Data Explorer Integration = $(BDSBIN)\DataExplorerDBXPlugin280.bpl
DBExpress InterBase Data Explorer Integration = $(BDSBIN)\DataExplorerDBXPluginInt280.bpl
LiveBindings Expression Components DbExpress = $(BDSBIN)\dclbindcompdbx280.bpl
Embarcadero XML Transform Provider Components = $(BDSBIN)\dcldsnapxml280.bpl
Embarcadero DataSnap Connection Components = $(BDSBIN)\dclmcn280.bpl
Embarcadero SOAP Midas Components = $(BDSBIN)\dclsoapmidas280.bpl
Embarcadero SOAP Components = $(BDSBIN)\dclsoap280.bpl
Embarcadero SOAP Server Components = $(BDSBIN)\dclsoapserver280.bpl
Embarcadero Internet DB Components = $(BDSBIN)\dclnetdb280.bpl
Embarcadero ADO DB Components = $(BDSBIN)\dclado280.bpl
Microsoft Office 2000 Sample Automation Server Wrapper Components = $(BDSBIN)\dcloffice2k280.bpl
Microsoft Office XP Sample Automation Server Wrapper Components = $(BDSBIN)\dclofficexp280.bpl
TMS Cryptography Pack = C:\BPL22\TMSCryptoPkgDXE14.bpl
Abbrevia = C:\BPL22\AbbreviaVCLDesign200.bpl
Envision Image Library = C:\BPL22\En_DXE6.bpl
Fast Script = C:\BPL22\dclfs20.bpl
Fast Report = C:\BPL22\dclfrx20.bpl
Fast Report Exports = C:\BPL22\dclfrxe20.bpl
Fast Report DB components = C:\BPL22\dclfsDB20.bpl
Fast Report DB X components = C:\BPL22\dclfrxDB20.bpl
FrameViewer = C:\BPL22\dclFrameViewerXE6.bpl
Indy Core = C:\BPL22\dclIndyCore200.bpl
Indy Protocols = C:\BPL22\dclIndyProtocols200.bpl
QuickReport = C:\BPL22\qrptXE6.bpl
QuickReport Design = C:\BPL22\DclqrtXE6.bpl
TDBF = C:\BPL22\dcltdbf200.bpl
Acquire Image = C:\BPL22\AqrImgPcgXE.bpl
dacvcl = C:\BPL22\dacvcl250.bpl
dcldac = C:\BPL22\dcldac250.bpl
unidacvcl = C:\BPL22\unidacvcl250.bpl
dclunidac = C:\BPL22\dclunidac250.bpl
ibprovider = C:\BPL22\ibprovider250.bpl
tdsprovider = C:\BPL22\tdsprovider250.bpl
msprovider = C:\BPL22\msprovider250.bpl
Virtual Treeview = C:\BPL22\VirtualTreesD20.bpl
kbmMemTable = C:\BPL22\kbmMemDesDXE6Pro.bpl
kbmMW = C:\BPL22\kbmMWDesDXE6Ent.bpl
madBasic = C:\BPL22\madBasic_.bpl
madHelp = C:\BPL22\madHelp_.bpl
madDisAsm = C:\BPL22\madDisAsm_.bpl
madExcept = C:\BPL22\madExcept_.bpl
madExceptIde = C:\BPL22\madExceptIde_.bpl
madExceptVcl = C:\BPL22\madExceptVcl_.bpl
madExceptWizard = C:\BPL22\madExceptWizard_.bpl
ChromeTabs = C:\BPL22\ChromeTabs_D.260.bpl
WaveAudio = C:\BPL22\WA2007.bpl
TMS Cryptography Pack = C:\BPL22\TMSCryptoPkgDEDXE14.bpl
HuzarSoftware = C:\BPL22\HuzarSoftwareXE.bpl
HuzarSoftwareFR = C:\BPL22\HuzarSoftwareFRXE.bpl
HuzarSoftwarekbmMW = C:\BPL22\HuzarSoftwarekbmMWXE.bpl
HuzarSoftwareMSSQL = C:\BPL22\HuzarSoftwareMSSQLXE.bpl
HuzarSoftwareTimeTable = C:\BPL22\HuzarSoftwareTimeTableXE.bpl
HuzarSoftwareTools = C:\BPL22\HuzarSoftwareToolsXE.bpl
Installed IDE Packages:
Embarcadero GetIt Package = $(BDS)\Bin\GetIt280.bpl
Embarcadero Guided Tour Package = $(BDS)\Bin\GuidedTour280.bpl
Embarcadero IDE VCL Package = $(BDS)\Bin\IDEvcl280.bpl
Embarcadero Theme Package = $(BDS)\Bin\ModernTheme280.bpl
Embarcadero Theme Package = $(BDS)\Bin\darktheme280.bpl
Embarcadero Theme Package = $(BDS)\Bin\themeloader280.bpl
CodeQuery API Package = $(BDS)\bin\codequeryide280.bpl
Embarcadero Multi-Device Preview package = $(BDS)\Bin\MultidevicePreview280.bpl
Assembly Browser Package = $(BDS)\Bin\asmview280.bpl
(Untitled) = $(BDS)\Bin\dbkdebugide280.bpl
Delphi Win32 Platform = $(BDS)\Bin\delphiwin32280.bpl
.NET Core IDE Package = $(BDS)\Bin\dotnetcoreide280.bpl
(Untitled) = $(BDS)\bin\exceptiondiag280.bpl
(Untitled) = $(BDS)\bin\fileexplorer280.bpl
(Untitled) = $(BDS)\bin\historyide280.bpl
HtmlHelp Viewer = $(BDS)\Bin\htmlhelp1280.bpl
__HtmlHelp Viewer = $(BDS)\Bin\htmlhelp2280.bpl
IDE File filters = $(BDS)\bin\idefilefilters280.bpl
Pluggable Tree View Package = $(BDS)\bin\plugview280.bpl
Value Data: Project and template library package = $(BDS)\Bin\projpageide280.bpl
Welcome Page Create New Plugin = $(BDS)\Bin\WelcomePage.Plugin.CreateNew280.bpl
Welcome Page GetIt Feed Plugin = $(BDS)\Bin\WelcomePage.Plugin.GetItFeed280.bpl
Welcome Page Learn Plugin = $(BDS)\Bin\WelcomePage.Plugin.Learn280.bpl
Welcome Page Open Recent Plugin = $(BDS)\Bin\WelcomePage.Plugin.OpenRecent280.bpl
Welcome Page IDE Package = $(BDS)\Bin\WelcomePageIDE280.bpl
TypeLibrary Browser Package = $(BDS)\Bin\tlbview280.bpl
LSP feature = $(BDS)\Bin\IDELSP280.bpl
HtmlHelp Viewer = $(BDS)\Bin\comcore280.bpl
(Untitled) = $(BDS)\Bin\projecttargets280.bpl
.NET Core IDE Package = $(BDS)\Bin\vclmenudesigner280.bpl
Component Toolbar Package = $(BDS)\bin\comptoolbar280.bpl
Embarcadero Tracking System Package = $(BDS)\Bin\TrackingSystem280.bpl
(Untitled) = $(BDS)\Bin\unittestide280.bpl
(Untitled) = $(BDS)\Bin\android64debugide280.bpl
(Untitled) = $(BDS)\Bin\androiddebugide280.bpl
Delphi Android Platform = $(BDS)\Bin\delphiandroid280.bpl
(Untitled) = $(BDS)\Bin\gdbdebugcore280.bpl
(Untitled) = $(BDS)\Bin\gdbdebugide280.bpl
(Untitled) = $(BDS)\Bin\ios32debugide280.bpl
(Untitled) = $(BDS)\Bin\ios64debugide280.bpl
Embarcadero FireUI Live Preview Package = $(BDS)\Bin\LivePreview280.bpl
Embarcadero Mirror Package = $(BDS)\Bin\MirrorHub280.bpl
(Untitled) = $(BDS)\Bin\codetemplates280.bpl
Core IDE Pro Package = $(BDS)\bin\coreproide280.bpl
(Untitled) = $(BDS)\bin\dbkdebugproide280.bpl
(Untitled) = $(BDS)\Bin\profiledeployide280.bpl
(Untitled) = $(BDS)\Bin\profilemgride280.bpl
Embarcadero SDK Manager = $(BDS)\Bin\sdkmgride280.bpl
Core Refactoring Package = $(BDS)\bin\refactoride280.bpl
ToDo = $(BDS)\bin\todoide280.bpl
(Untitled) = $(BDS)\Bin\DataExplorerIDE280.bpl
Visualization IDE Service Package = $(BDS)\Bin\VisualizationServiceIDE280.bpl
Embarcadero Mobile Device Manager Package = $(BDS)\Bin\DeviceManager280.bpl
(Untitled) = $(BDS)\bin\htmide280.bpl
(Untitled) = $(BDS)\bin\mlcc280.bpl
(Untitled) = $(BDS)\Bin\iteidew32280.bpl
(Untitled) = $(BDS)\Bin\tgide280.bpl
(Untitled) = $(BDS)\Bin\macosx64debugide280.bpl
(Untitled) = $(BDS)\Bin\macosxarm64debugide280.bpl
(Untitled) = $(BDS)\Bin\macosxdebugide280.bpl
Delphi iOS Platform = $(BDS)\Bin\delphiios280.bpl
(Untitled) = $(BDS)\Bin\win64debugide280.bpl
Delphi Win64 Platform = $(BDS)\Bin\delphiwin64280.bpl
_(untitled) = $(BDS)\bin\getitide280.bpl
GExperts Experts:
1 = GrepResuls
1 = CleanDirectories
1 = UsesClauseMgr
1 = FilterExceptions
1 = CodeLibrarian
1 = GrepMenuEntry
1 = GrepNextItem
1 = GrepPrevItem
1 = ExpertManager
1 = ASCIIChart
1 = BackupProject
1 = BookmarksExpert
1 = ClassBrowser
1 = ClipboardHistory
1 = ComponentGrid
1 = RenameComponents
1 = ComponentsToCode
1 = CopyComponentNames
1 = EditorExpertsMenu
1 = FavoriteFiles
0 = FindComponentReference
1 = GrepSearch
1 = HideComponents
1 = IDEMenuShortCuts
1 = InsertAutoToDo
1 = MacroLibrary
0 = MacroLibRecord
0 = MacroLibPlayback
1 = MessageDialog
1 = OpenFile
1 = PEInformation
1 = ProcedureList
1 = ProjectDependencies
1 = ProjOptionSets
1 = CodeProofreader
1 = ReplaceComponents
0 = SetComponentProperties
1 = SetFocusControl
1 = SourceExport
1 = SetTabOrder
1 = ToDoList
1 = ReselectDesktop
1 = TKeyboardShortcutsExpert
1 = TAddDockWindowExpert
1 = SelectComponents
1 = GotoExpert
1 = FocusCodeEditor
1 = TFormHotkeysExpert
1 = TExplicitFilterExpert
CPU:
# Processors: 8
Type: Intel 586 model 60 Stepping 3
Speed: 3606,77 MHz
Keyboard:
Type 0: Japanese keyboard with OEM FKeys
Layout: Polish (Programmers) (pl) in KBDPL1.DLL
Locale Info:
Number of Digits: '2'
Leading Zero: '1'
List Separators: ';'
Grouping: '3;0'
Decimal Separator: ','
Group Separator: ' '
Monetary Grouping: '3;0'
Monetary Decimal Separator: ','
Monetary Group Separator: ' '
A possible workaround would be to specify a custom registry branch for use with the automatic build. See the -r command line option of bds. That custom registry branch would then not load GExperts which isn't required for the automatic build.
EDIT: I just tried it. Apparently -r cannot be used together with -b, so the IDE started with default settings (no GExperts) but did neither load nor build the project group. So, no cookie, sorry. Unless, this is a bug with Delphi 2007 which I used for the test. Maybe it works for Delphi 11, I can't test that.
Last edit: Thomas Mueller 2022-06-19
This exception message also appears if the IDE is shutdown (ExitProcess) by the GetIt Package Manager; esp. when trying to install a patch for the IDE. Because the IDE is still running (it shows the exception message), the patch application fails to install the new files. I had to remove GExperts from the registry to be able to install "RAD Studio 11.1 Patch 1" and "Debugging Patch for RAD Studio 11.1".
Maybe there is a way to detect this hard shutdown (handling DLL_PROCESS_DETACH ?) and then ignore all exceptions/messages until the process is completely gone.
Some more information:
I've temporarily included a modified version of GX_SampleExpert.pas into GExperts, which calls ExitProcess(0) when invoked. Now I could reproduce the shutdown by clicking a menu item. I also enabled "Ignore non-user breakpoints" in Tools->Options->Debugger->Embarcadero Debuggers, to not stop in external code.
To workaround the Assertion in UniSynEdit\SynTextDrawer.pas I changed the code in TSynFontsInfoManager.ReleaseFontsInfo to call UnlockFontsInfo() first; see attached Patch. There is similar code in TSynFontStock.ReleaseFontsInfo() so I guess this is the correct way to free the font resources. Please review my patch.
Hm, interesting. so the function DeactivateFontsInfo (which doesn't exist anywhere in the code) to be called apparently is UnLockFontsInfo. I have applied that patch to my working copy and will try to reproduce the problem or rather reproduce the absence of the problem.
edit: I tried to uninstall Bookmarks. Now a different assertion fails, apparently some other code tries to re-init GExperts. Just great!
Last edit: Thomas Mueller 2022-08-21
I applied Achim's patch in revision #3867. So far the error has not occurred on my machine.