Need help figuring out why Javascript "call stack size exceeded"

26 views
Skip to first unread message

Glenn Iba

unread,
Mar 15, 2023, 4:30:14 PM3/15/23
to ClojureScript
Greetings, 

  I'm a total newbie to this group. Hoping to get some help ...

I'm writing a Clojurescript/Reagent app, which among other things, does
some medium size searches to solve puzzles I randomly generate.
My larger searches (some only depth 10 or so) are causing Javascript to
hit its "stack size limit" :
   core.cljs:3816 Uncaught RangeError: Maximum call stack size exceeded
I am using loop and recur instead of pure recursion, so I don't think that's
the issue.
I am using some moderately large hashmaps to store "positions visited by search",
but these should have less than 100k key-value pairs.
Could something to do with these hashmaps be causing the stack issue??
I'm using CONJ to add new key-values to hashmap.

I can't find the call stack to examine what's going on -- is there some way anyone
can suggest for me to do that?  The normal Chrome inspector gives me an uncaught
exception, but I can't seem to access the actual call stack.

Please help - any and all suggestions much appreciated!!

If some kind and generous soul would be willing to look at my code,
I'd be quite happy to share it :)

Thanks in advance!!
   --Glenn

Reply all
Reply to author
Forward
0 new messages