The Uses Clause Manager runs a thread (TUnitExportParserThread) that collects the identifiers of the units in the search path. Besides the Identifiers tab of the Uses Clause Manager, its result is used by Declare Variable (TUsesClauseMgrExpert.TryGetIdentifiers), to find the types of identifiers declared in other units, and by the code formatter and the Code Proofreader (TUsesClauseMgrExpert.TryLookupIdentifier), to find how an identifier is spelt.
When the Uses Clause Manager dialog opens, it takes the list of identifiers away from the thread (DetachIdentifiers in TfmUsesManager) and frees it when it is closed. The thread is left without a list, so TryGetIdentifiers and TryLookupIdentifier fail until the active project changes or the Uses Clause Manager is opened again.
Reproduced in Delphi 13.2: a project with function GxFunc554: Integer; in one unit, and X := GxFunc554; in another unit that uses it.
X offers the type Integer.X again: the type is empty.Possible fix: the dialog uses the thread's list without taking it over. The thread is only restarted when the active project changes or the dialog opens, and neither can happen while the modal dialog is shown.
Found while looking into bug [#605].