The unknown dangerous Procedure StringFunction Bug
Re: The unknown dangerous Procedure StringFunction Bug
Can you reproduce the bug without using any BF stuff?
If not, maybe there is somewhere a memory/pointer bug in BF.
If yes, please provide a full working code which shows the error, that we can jump in and investigate that behaviour.
If not, maybe there is somewhere a memory/pointer bug in BF.
If yes, please provide a full working code which shows the error, that we can jump in and investigate that behaviour.
Re: The unknown dangerous Procedure StringFunction Bug
Hi
As already said.
This error occurs very rarely and I cannot explain the cause.
And the code works perfectly under Linux and Windows.
And it cannot be reproduced in a mini or any larger pseudo code.
So you need at least one Mac to be able to see the error in the first place.
If I move the parameter up four places and the error moves exactly with it, how is that going to work?
Try to reproduce this bug, it doesn't work.
As already said.
This error occurs very rarely and I cannot explain the cause.
And the code works perfectly under Linux and Windows.
And it cannot be reproduced in a mini or any larger pseudo code.
So you need at least one Mac to be able to see the error in the first place.
If I move the parameter up four places and the error moves exactly with it, how is that going to work?
Try to reproduce this bug, it doesn't work.
Last edited by Saki on Sun Feb 14, 2021 11:44 pm, edited 1 time in total.
地球上の平和
Re: The unknown dangerous Procedure StringFunction Bug
I was paraphrasing Paul. If, in fact, you are using go-to in contradiction to the manual, then you need to remove all of them before claiming there's a bug in the compiler. I'm not saying you are doing that, but that is what I understand from what Paul wrote.Saki wrote:Hi Tenaja,
show me the mistake I made.
The localisation of programming errors is always based on facts, not on assumptions.
No offence, but you can't judge my codes negatively without knowing them.
Re: The unknown dangerous Procedure StringFunction Bug
Hi Tenaja
It's not true at all, it's absolutely wrong.
Go to the codes, search for Goto, there is not a single Goto in the entire FontWizzard.
In the entire GFX_Wizzard_BF, Goto is only used twice.
Once when an error occurs in the progress bar, which has never happened until now.
The second time is when searching for an unused colour in an image,
which is absolutely rare and absolutely simple, a few lines all over.
It's not true at all, it's absolutely wrong.
Go to the codes, search for Goto, there is not a single Goto in the entire FontWizzard.
In the entire GFX_Wizzard_BF, Goto is only used twice.
Once when an error occurs in the progress bar, which has never happened until now.
The second time is when searching for an unused colour in an image,
which is absolutely rare and absolutely simple, a few lines all over.
地球上の平和
Re: The unknown dangerous Procedure StringFunction Bug
Saki wrote:In the whole GFX_Wizzard_BF 11 Goto are used with over 26 000 lines.
Are you debugging an old version of that BF thing...Saki wrote:...In the entire GFX_Wizzard_BF, Goto is only used twice.

Re: The unknown dangerous Procedure StringFunction Bug
It occurs 11 times, of which 10 times it points to the same error routine
inside the same function that has never been triggered, its only a fuse....
Read the thread and you will find that too.
And again, I'm writing it very slowly now to read along.
There is no Goto in theFontWizzard.
inside the same function that has never been triggered, its only a fuse....
Read the thread and you will find that too.

And again, I'm writing it very slowly now to read along.
There is no Goto in theFontWizzard.
Last edited by Saki on Mon Feb 15, 2021 12:19 am, edited 1 time in total.
地球上の平和
Re: The unknown dangerous Procedure StringFunction Bug
something odd is going on, the issue arises in the call to DrawText_FW, it does seem to be a parameter order issue
Windows 11, Manjaro, Raspberry Pi OS


Re: The unknown dangerous Procedure StringFunction Bug
bug is in x64 call parsing, it is set off by a float of double parameter, if the last parameter is changed to an integer the code works
this code result is on linux x64 PB 5.72
this code result is on linux x64 PB 5.72
g 7
h 10
bug below
g 8873415
h
Code: Select all
Procedure bar(a,b,c,d,e,f,g,h.s=" ",i=9,j.d=10.0)
Debug g
Debug h
EndProcedure
Procedure foo()
Protected a,text.s
For a = 1 To 10
text=Str(a)
bar(1,2,3,4,5,6,7,text,9,#PI)
Next
Debug " bug below "
For a = 1 To 10
bar(1,2,3,4,5,6,7,Str(a),9,#PI)
Next
EndProcedure
foo()
Windows 11, Manjaro, Raspberry Pi OS


Re: The unknown dangerous Procedure StringFunction Bug
Hi Idle
You got it ?
I don't have a Mac on at the moment.
Great !
You got it ?
I don't have a Mac on at the moment.
Great !
Last edited by Saki on Mon Feb 15, 2021 1:24 am, edited 2 times in total.
地球上の平和
Re: The unknown dangerous Procedure StringFunction Bug
I don't have windows either, it might just be linux x64 and osxSaki wrote:Hi Idle
You got it ?
I don't have a Mac on at the moment.
Great !
Windows 11, Manjaro, Raspberry Pi OS


Re: The unknown dangerous Procedure StringFunction Bug
It works with Windows, but I've also had these problems on all OS.
I haven't had Mac for long.
Best Regards Saki
I haven't had Mac for long.
Best Regards Saki
地球上の平和
Re: The unknown dangerous Procedure StringFunction Bug
that might be why it's gone under the radar, x64 call conventions are different for windows and linux / osx
I will post a bug report for linux and osx.
I will post a bug report for linux and osx.
Windows 11, Manjaro, Raspberry Pi OS


Re: The unknown dangerous Procedure StringFunction Bug
In the older PureBasic days, when standalone snippets couldn't show the problem, Fred would ask for a copy of your entire code so he can test it. Maybe PM/email him and see if he's still willing to do that?Saki wrote:I would have liked to make a small neutral code, but unfortunately I did not succeed.
Because I can tell you now, unless Fred can see a proven bug then this will not get fixed or looked at, and just relegated to the realms of being a user error.
Re: The unknown dangerous Procedure StringFunction Bug
Let's begin with the fact that PureBasic does not implement a functional paradigm, nor does it natively support lambdas or higher-order functions. Then, let's also realise that callbacks in imperative and procedural languages (which PureBasic is), are passed as address pointers, and not as function types.ProphetOfDoom wrote:Oh my! I don’t know where to begin. In Haskell, entire programs are glued together by higher-order functions. Gtk uses callbacks for every signal.
In this paradigmatic respect, to pass functions as arguments would mean to pass the unassigned function results directly. Not a good idea.
Context is always king.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel 
