call stack overflow in function not : =

Q&A's, tips, howto's
Locked
methodic
Posts: 58
Joined: Tue May 10, 2005 5:04 am

call stack overflow in function not : =

Post by methodic »

anyone ever seen this error message before? i have a program that iterates through webpages and adds each link it finds to a list (queue) to check later, but when i reach about 10k list elements, i get the above error. the weird part is that the 10k element list has nothing to do with the regex or (not) function, at least in the execution of the script... this might be an internal bug where a stack is leaking or overflowing something else. this is newlisp 8.9.0.

this is the function it always crashes on. l is just a raw html link.

Code: Select all

(define (friend? l)
  (set 'ret (regex "friendid=(\\d+)" l 1))
  (if (not (= ret nil))
    (ret 3)
  )
)

methodic
Posts: 58
Joined: Tue May 10, 2005 5:04 am

Post by methodic »

Upping the stack size in newlisp seemed to work... executing with newlisp -s 10000 let it run without any problems. Is there a way to set the stack size in a newlisp script so I dont have to rely on -s on the command line?

Thanks.

Locked