10-17-2025, 06:59 PM
(10-17-2025, 11:12 AM)pmackay Wrote:I fixed it with a manual stack. done. windows now compiling no stack crash. //original file saved as running on linux no probs/stack recursion error on windows. alternate file with fix saved also working both windows and linux with same output as original.(05-28-2023, 02:04 PM)bplus Wrote: Ewh! disappointing that QB64pe dies in mid 18,000's BaCon and FreeBasic do way better...is this same error across all OS, My program compiles fine on linux, but it crashes on windows / this is the text i received for my program " Had a runtime error in Sub CarveMaze, due to recursion levels/out of stack space. Setting a ridiculous stack size in QB64PE's C++ Linker Flags took care of it. I did not try to find a minimum requirement, and the format of this option might be different on other operating systems (I'm on Windows). I think the default size is 2MB, so 4MB or 8MB might be enough, but I pasted in 128MB from a forum post.
https://rosettacode.org/wiki/Find_limit_...sion#BASIC
Here is code I checked with, maybe there is better?
Code: (Select All)howRecursive 1
Sub howRecursive (i As _Integer64)
If i < 0 Then Print "_Integer64 turned negative.": End
Print i
_Delay .000000000005
howRecursive i + 1
End Sub
Maybe with manual stack?
C++ Linker Flags: -Wl,--stack,134217728
Note, after changing the Compiler or Linker option flags, the first time you compile or run a program QB64 PE will rebuild runtime libraries, which can take a few minutes. It just says "Building .exe file..." https://www.facebook.com/share/p/17CKtMLKts/

