The program that presents the problem is an IDE that I created for a particular DSL that I defined. This IDE has a main menu and a toolbutton. The principal functions of the menu also have an associated button in the toolbar. Obviously I use actions to manage this situation in a unified way.
I have a function in the menu and in the toolbar (
ViewCompilerMessages) that allows you to view any messages from (my) compiler. This is associated with an Action, where the Update method (
ActionViewCompilerMessagesUpdate) enables or disables the related menu item and button depending on whether there are messages from (my) compiler. At startup the button starts disabled, but obviously the Update method of the relative Action is called, repeatedly, by definition. If the program is launched outside the Lazarus IDE, it freezes at startup, before showing its GUI. Here the offending code:
procedure TMainForm.ActionViewCompilerMessagesUpdate(Sender: TObject);
begin
ActionViewCompilerMessages.Enabled:=MainHelper.CompilerMessageList.Count>0; // here run time error arises
end;
Now here at work I can't install version 4Rc1. At home I will try to generate a small example that makes the problem reproducible, starting from the application, but I don't know if this will be possible.