Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Recursion Limit
#14
(10-17-2025, 11:12 AM)pmackay Wrote:
(05-28-2023, 02:04 PM)bplus Wrote: Ewh! disappointing that QB64pe dies in mid 18,000's BaCon and FreeBasic do way better...

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?
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.
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/
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.
Reply


Messages In This Thread
Recursion Limit - by bplus - 05-28-2023, 02:04 PM
RE: Recursion Limit - by CharlieJV - 05-28-2023, 02:39 PM
RE: Recursion Limit - by dbox - 05-28-2023, 03:55 PM
RE: Recursion Limit - by CharlieJV - 05-28-2023, 03:06 PM
RE: Recursion Limit - by mnrvovrfc - 05-28-2023, 03:37 PM
RE: Recursion Limit - by bplus - 05-28-2023, 06:10 PM
RE: Recursion Limit - by CharlieJV - 05-28-2023, 06:59 PM
RE: Recursion Limit - by Jack - 05-28-2023, 06:30 PM
RE: Recursion Limit - by bplus - 05-28-2023, 10:30 PM
RE: Recursion Limit - by bplus - 05-28-2023, 11:14 PM
RE: Recursion Limit - by dbox - 05-29-2023, 12:04 AM
RE: Recursion Limit - by pmackay - 10-17-2025, 11:12 AM
RE: Recursion Limit - by pmackay - 10-17-2025, 06:59 PM
RE: Recursion Limit - by bplus - 10-17-2025, 12:10 PM
RE: Recursion Limit - by a740g - 10-17-2025, 07:46 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Feature Request: Limit Scope of a "Find" and "Change" hanness 5 718 06-21-2025, 11:21 PM
Last Post: SMcNeill
  Recursion limit? TerryRitchie 5 1,167 03-12-2024, 02:17 PM
Last Post: GareBear
  Stack size limit for If/Then statements? JamesAlexander 20 3,640 01-31-2024, 06:21 PM
Last Post: Kernelpanic

Forum Jump:


Users browsing this thread: 1 Guest(s)