if it compiles ok then your likely clobbering memory, compile with purifier compiler options -> Compile / run -> Enable Purifier then set a break point and you can then check the settings Debugger - > Purifier and Change String Variables every line. it might show where the problem is.
If your threaded, that's a little harder as you need to look prior to the crash to either the last allocate memory or dynamic string.
Removed: ASCII mode -- What dooes that mean??
-
Randy Walker
- Addict

- Posts: 1203
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
- Contact:
Re: Removed: ASCII mode -- What dooes that mean??
I'm sorry. I'm not sure I follow you. Are you saying I can change variable values using profiler? Never used it because I don't understand it's purpose.idle wrote: Tue Jan 20, 2026 3:40 am if it compiles ok then your likely clobbering memory, compile with purifier compiler options -> Compile / run -> Enable Purifier then set a break point and you can then check the settings Debugger - > Purifier and Change String Variables every line. it might show where the problem is.
If your threaded, that's a little harder as you need to look prior to the crash to either the last allocate memory or dynamic string.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
Re: Removed: ASCII mode -- What dooes that mean??
Sorry for the confusion, "String Variables" is a setting in the purifier that checks string variables every 64 lines vs every line.Randy Walker wrote: Tue Jan 20, 2026 5:05 amI'm sorry. I'm not sure I follow you. Are you saying I can change variable values using profiler? Never used it because I don't understand it's purpose.idle wrote: Tue Jan 20, 2026 3:40 am if it compiles ok then your likely clobbering memory, compile with purifier compiler options -> Compile / run -> Enable Purifier then set a break point and you can then check the settings Debugger - > Purifier and Change String Variables every line. it might show where the problem is.
If your threaded, that's a little harder as you need to look prior to the crash to either the last allocate memory or dynamic string.
The purifier helps catch buffer overflows of memory and strings.
Re: Removed: ASCII mode -- What dooes that mean??
There are few points to consider to bring a program to version 6.xx.
- New Adjust PB functions
- If strings are processed with pointers: Address pointer calculation of constant 1 to SizeOf(Character)
- Previously for 32bit to 64bit: Adjust pointer as default variable from .l (LONG) to .i (INTEGER)
- Third API (DLL) check if it exists as Unicode. Otherwise create prototype with string as "p-ascii"
- Prepared Window API is automatically adjusted.
- New Adjust PB functions
- If strings are processed with pointers: Address pointer calculation of constant 1 to SizeOf(Character)
- Previously for 32bit to 64bit: Adjust pointer as default variable from .l (LONG) to .i (INTEGER)
- Third API (DLL) check if it exists as Unicode. Otherwise create prototype with string as "p-ascii"
- Prepared Window API is automatically adjusted.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
-
Randy Walker
- Addict

- Posts: 1203
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
- Contact:
Re: Removed: ASCII mode -- What dooes that mean??
The more I look the less it makes any sense. The help gives this code snippet telling size will be 10 but when I run it I get 18 instead:
Code: Select all
Structure Person
Name.s
ForName.s
Age.w
EndStructure
Debug "The size of my friend is "+Str(SizeOf(Person))+" bytes" ; will be 10 (4+4+2)
John.Person\Name = "John"
Debug SizeOf(John) ; will be also 10- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
Re: Removed: ASCII mode -- What dooes that mean??
you can't use sizeof() on a variable
Re: Removed: ASCII mode -- What dooes that mean??
It's out of date, it was written for the 32-bit compiler where pointers are 4 bytes (32-bits). Pointers are 8 bytes on a 64-bit processor.Randy Walker wrote: Tue Jan 20, 2026 6:35 pm The help gives this code snippet telling size will be 10 but when I run it I get 18 instead:
Are you looking at an old help file? It looks Ok to me in the current version:
(Dynamic) strings don't get stored actually in a structure. The structure contains a pointer to a heap allocation location where the contents are stored.Help 6.31 wrote:Code: Select all
Debug "The size of my friend is "+Str(Sizeof(Person))+" bytes" ; will be 10 on 32-bit compiler as a string pointer is 4 bytes in memory ; will be 18 on 64-bit compiler as a string pointer is 8 bytes in memory
So what the snippet is quoting is two 4 byte pointers + a 2 byte word and what you are seeing at runtime is two 8 byte pointers + a 2 byte word.

