From 58ce8fac72d6aebd75529d20de740de992583fbc Mon Sep 17 00:00:00 2001 From: tiresiasfromthebai Date: Sun, 9 Aug 2026 17:34:27 +0200 Subject: [PATCH] Don't auto-refresh the Array/Matrix visualizers when the program exits gdb reports the exit as a *stopped event (reason="exited-*"), so with the Auto checkbox checked the visualizers fired one last refresh on a process that no longer exists, logging "unable to read memory" errors. --- src/SeerArrayVisualizerWidget.cpp | 5 +++-- src/SeerMatrixVisualizerWidget.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/SeerArrayVisualizerWidget.cpp b/src/SeerArrayVisualizerWidget.cpp index 7dcb88b..e5d0694 100644 --- a/src/SeerArrayVisualizerWidget.cpp +++ b/src/SeerArrayVisualizerWidget.cpp @@ -722,8 +722,9 @@ void SeerArrayVisualizerWidget::handleText (const QString& text) { bArrayStrideLineEdit->setFocus(); } - // At a stopping point, refresh. - }else if (text.startsWith("*stopped,reason=\"")) { + // At a stopping point, refresh. Skip the "exited" reasons: the program + // is gone and reading the arrays would fail with a memory error. + }else if (text.startsWith("*stopped,reason=\"") && text.startsWith("*stopped,reason=\"exited") == false) { if (autoRefreshCheckBox->isChecked()) { handleaRefreshButton(); diff --git a/src/SeerMatrixVisualizerWidget.cpp b/src/SeerMatrixVisualizerWidget.cpp index 1dc4002..27a1764 100644 --- a/src/SeerMatrixVisualizerWidget.cpp +++ b/src/SeerMatrixVisualizerWidget.cpp @@ -417,8 +417,9 @@ void SeerMatrixVisualizerWidget::handleText (const QString& text) { matrixStrideLineEdit->setFocus(); } - // At a stopping point, refresh. - }else if (text.startsWith("*stopped,reason=\"")) { + // At a stopping point, refresh. Skip the "exited" reasons: the program + // is gone and reading the matrix would fail with a memory error. + }else if (text.startsWith("*stopped,reason=\"") && text.startsWith("*stopped,reason=\"exited") == false) { if (autoRefreshCheckBox->isChecked()) { handleRefreshButton();