[Done] OnErrorGoto() doesn't work

Post bugreports for the Linux version here
User avatar
Shardik
Addict
Addict
Posts: 2058
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

[Done] OnErrorGoto() doesn't work

Post by Shardik »

The help example for OnErrorGoto() doesn't work (tested on Linux Mint 21.3 x64 'Virginia' with Cinnamon and PB 6.20, it works like a charm on MacOS and Windows 10). The jump to the ErrorHandler is not executed and the program is terminated without any message (with Debugger turned off):

Code: Select all

CompilerIf #PB_Compiler_Debugger
  CompilerError "The debugger must be turned OFF for this example"
CompilerEndIf

MessageRequester("OnError test", "Test start")

OnErrorGoto(?ErrorHandler)
PokeS(10, "Hello World") ; Cause a #PB_OnError_InvalidMemory error

MessageRequester("OnError test", "This should never be displayed")
End

ErrorHandler:
MessageRequester("OnError test", "The following error happened: " + ErrorMessage())
End
Last edited by Shardik on Sun May 04, 2025 6:58 pm, edited 5 times in total.
User avatar
mk-soft
Always Here
Always Here
Posts: 6224
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: OnErrorGoto() doesn't work

Post by mk-soft »

Does not work with any version (pb v6.03 +)
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
User avatar
Shardik
Addict
Addict
Posts: 2058
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: OnErrorGoto() doesn't work

Post by Shardik »

The OnErrorGoto() example also doesn't work in PB 5.46 x64 and 5.73 x64.

But on Debian 12 'Bookworm' x86 in PB 6.10 x86 the example works like a charm. So it appears to be a problem of the 64-bit version of PureBasic!
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [Done] OnErrorGoto() doesn't work

Post by Fred »

Fixed.
Post Reply