Re-evaluate the visualized variable's address on refresh

The Array and Matrix visualizers evaluated the variable's address only
when the name was typed; every refresh then re-read memory at that
stored address forever. A stale address (a vector entered before its
construction, a reallocation, a re-run) kept being read — errors at
best, plausible-looking dead data at worst.

Split the refresh in two: the refresh handlers now re-evaluate the
variable name, and the answer reads the memory at the fresh address
(readaMemory/readbMemory/readMemory). Every refresh path — the manual
button, the auto-refresh at each stop, and the length/offset/stride
changes — now goes through the re-evaluation. The read is skipped for a
null address or an empty length, so a not-yet-constructed variable shows
its 0x0 address quietly instead of raising memory errors.
This commit is contained in:
tiresiasfromthebai
2026-08-13 10:16:28 +02:00
parent 04b5cf519f
commit 84f7d81ea9
4 changed files with 75 additions and 8 deletions
+2
View File
@@ -76,6 +76,8 @@ class SeerArrayVisualizerWidget : public QWidget, protected Ui::SeerArrayVisuali
void resizeEvent (QResizeEvent* event);
private:
void readaMemory ();
void readbMemory ();
void createASeries ();
void createBSeries ();