You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I stumbled over a problem with the implementation of the logging class when I added a memo on my main panel as a log output option.
My logging class wrapper sends an ExitApplicationevent to the logger when the application terminates (in finalization part of my loggingclass wrapper)
At this point the form containing the memo is already destroyed so the FMemo.parent and FMemo.owner handles are already nil and lead to an error/exception when trying to write to the memo.
I've modified the WriteLog procedure to check if the owner of a TMemo is still valid before trying to write to it.
In this way no exception is raised and the application can shut down sending the ExitApplication messages to the remaining LogAppenders like FileAppender or SyslogAppender
I stumbled over a problem with the implementation of the logging class when I added a memo on my main panel as a log output option.
My logging class wrapper sends an
ExitApplication
event to the logger when the application terminates (in finalization part of my loggingclass wrapper)At this point the form containing the memo is already destroyed so the FMemo.parent and FMemo.owner handles are already
nil
and lead to an error/exception when trying to write to the memo.I've modified the WriteLog procedure to check if the
owner
of a TMemo is still valid before trying to write to it.In this way no exception is raised and the application can shut down sending the ExitApplication messages to the remaining LogAppenders like FileAppender or SyslogAppender
The text was updated successfully, but these errors were encountered: