Page 1 of 1

What does "Overflow in a string memory block" mean?

Posted: Sun Feb 22, 2026 9:13 pm
by jacdelad
Hi,

in a bigger project I suddenly get "Overflow in a string memory block" errors. These errors occur on different places which worked before and look a bit random. The project uses threads, threadsafe is enabled. Can someone explain this further and maybe offer a solution?
Windows 11 x64, PB 6.30 x64 (the errors occur for both, C-Backend and ASM Backend)

Re: What does "Overflow in a string memory block" mean?

Posted: Sun Feb 22, 2026 10:29 pm
by STARGĂ…TE
If the purifier is activated, all strings have a memory pattern before and after the string.
If you then write something behind the string, this error occurs.

Code: Select all

Define String.s = "Hello World!"

PokeS(@String+20, "Overflow")

Re: What does "Overflow in a string memory block" mean?

Posted: Mon Feb 23, 2026 12:51 am
by BarryG
Is the Purifier active in a compiled exe, or only during runtime from the IDE?

Re: What does "Overflow in a string memory block" mean?

Posted: Mon Feb 23, 2026 7:14 am
by jacdelad
@STARGATE: That makes sense, but it spits out lines like

Code: Select all

Error$=ReadProgramError(prog)
to be the problem.

Anyway, I'll try without purifier. Strange that it worked until yesterday.

Re: What does "Overflow in a string memory block" mean?

Posted: Mon Feb 23, 2026 8:35 am
by jacdelad
Found the culprit: In a thread a PokeS with a long string was done on a too small dimensioned string. It's a bit confusing that a totally different line was spat out as the errorneous one. Anyway, I can fix it now.

Thanks for your assistance!

Re: What does "Overflow in a string memory block" mean?

Posted: Mon Feb 23, 2026 9:19 pm
by spikey
jacdelad wrote: Mon Feb 23, 2026 8:35 am It's a bit confusing that a totally different line was spat out as the errorneous one.
The purifier does sample testing periodically rather than all the time. It's error messages aren't definite like a compiler or debugger error is, this is done for performance reasons. The error is reported at the line the problem was identified. This isn't necessarily the line which caused the problem (as you've discovered).

If you encounter a specific problem that proves difficult to trace you can adjust the frequency of checks with the PurifierGranularity instruction, or via the dialog.

Lower values (above 0) will yield better accuracy at a cost of worse performance.

Re: What does "Overflow in a string memory block" mean?

Posted: Tue Feb 24, 2026 9:59 am
by jacdelad
Thanks spikey. I have not encountered such a case before, that's why I was a bit confused.
Now, I'm prepared for future problems.