Page 1 of 1

[Done] PB640a1 bug with list

Posted: Fri Jan 23, 2026 5:36 pm
by drgolf
hello,

This code dont work with PB 640 but work with PB 630 (Windows 11 pro) :

Code: Select all

Global NewList mru.s()

For i=1 To 10
  AddElement(mru())
  mru()=Str(i)+ProgramFilename()
Next
;
ForEach mru()
Debug mru()  
Next

;;
;[17 :28 :15] Attente du démarrage du programme...
;[17 :28 :15] Type d'exécutable: Windows - x64  (64bit, Unicode)
;[17 :28 :15] Exécutable démarré.
;[17 :28 :15] [ERREUR] Ligne: 5
;[17 :28 :15] [ERREUR] Accès mémoire invalide. (erreur de lecture à l'adresse 18446744073105703264)


Re: PB640a1 bug with list

Posted: Sat Jan 24, 2026 1:18 pm
by mk-soft
Short bug code

Code: Select all

a.s = Str(i) + ProgramFilename()

Code: Select all

;a.s = Str(i) + ProgramFilename()
;a.s = ProgramFilename() + Str(0)
;a.s = Str(i) + CPUName()
a.s = Str(i) + UserName()
; etc

Re: PB640a1 bug with list

Posted: Mon Jan 26, 2026 2:40 pm
by Fred
Does it happen everytime ? Is purifier on ? I can't reproduce it here

Re: PB640a1 bug with list

Posted: Mon Jan 26, 2026 2:48 pm
by breeze4me
Fred wrote: Mon Jan 26, 2026 2:40 pm Does it happen everytime ? Is purifier on ? I can't reproduce it here
The error occurs regardless of the purifier setting.

Re: PB640a1 bug with list

Posted: Mon Jan 26, 2026 2:50 pm
by drgolf
This code :

Code: Select all

Global NewList mru.s()

For i=1 To 10
  AddElement(mru())
  mru()=Str(i)+ProgramFilename()
Next
;
ForEach mru()
Debug mru()  
Next
Crash every time with debuger on and dpi checked.

Re: PB640a1 bug with list

Posted: Mon Jan 26, 2026 2:58 pm
by fryquez
You should declare SYS_ConcatString!

Code: Select all

M_SYSFUNCTION(integer) SYS_ConcatString(TCHAR **Address, const TCHAR *String);

Re: PB640a1 bug with list

Posted: Mon Jan 26, 2026 3:47 pm
by Fred
I tried these snippets with other code below, that's why I didn't noticed this error. Now, the gcc backend will report an error if a function prototype isn't declared, as it should never happen. Thanks fryquez !