From 1b6c813fca159b609d4aa0c2e5a8547bc4d17ea4 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sun, 30 Sep 2018 18:49:06 +0200 Subject: [PATCH] Silence a crash in TQueryTab.TimerStatusUpdateOnTimer, probably happening when accessing the no longer running thread. See https://www.heidisql.com/forum.php?t=25418#p25484 --- source/main.pas | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/main.pas b/source/main.pas index e3cec36c..8c9bebb6 100644 --- a/source/main.pas +++ b/source/main.pas @@ -12677,7 +12677,12 @@ begin Msg := f_('queries #%s to #%s', [FormatNumber(ExecutionThread.BatchPosition+1), FormatNumber(ExecutionThread.BatchPosition+ExecutionThread.QueriesInPacket)]); Elapsed := MilliSecondsBetween(ExecutionThread.QueryStartedAt, Now); ElapsedMsg := FormatTimeNumber(Elapsed/1000, True); - MainForm.ShowStatusMsg(ElapsedMsg + ': ' + f_('Executing %s of %s ...', [Msg, FormatNumber(ExecutionThread.Batch.Count)])); + try + MainForm.ShowStatusMsg(ElapsedMsg + ': ' + f_('Executing %s of %s ...', [Msg, FormatNumber(ExecutionThread.Batch.Count)])); + except; + // Some crashes here, probably when accessing the no longer running thread. + // See https://www.heidisql.com/forum.php?t=25418#p25484 + end; end;