Discussion:
writeCode StackOverflow Error
(too old to reply)
Nick Whelan
2005-10-03 05:52:17 UTC
Permalink
I'm getting this odd StackOverflow error when I run my rev adaptive on
larger tests, but assuredly from something happening to my tree structure
with removeZero.

Has anyone gotten this error?

Could someone please explain the special cases for RevAdaptive, and what
you're supposed to do for each? Any help here would be greatly appreciated.

Thanks,

Nick
t3h j1mb0
2005-10-03 19:18:23 UTC
Permalink
Post by Nick Whelan
I'm getting this odd StackOverflow error when I run my rev adaptive on
larger tests, but assuredly from something happening to my tree structure
with removeZero.
Has anyone gotten this error?
Could someone please explain the special cases for RevAdaptive, and what
you're supposed to do for each? Any help here would be greatly appreciated.
Thanks,
Nick
I'm getting the same error. I think it happens because the writeCode
function keeps calling itself for-frickin'-ever and goes into infinite
recursion. Anyone know why? If it's my fault, I can fix it. If not,
then *various swear words concerning the promiscuity of this project's
mother*.
-Jimbo
Zach
2005-10-03 19:53:05 UTC
Permalink
Post by t3h j1mb0
I'm getting the same error. I think it happens because the writeCode
function keeps calling itself for-frickin'-ever and goes into infinite
recursion. Anyone know why? If it's my fault, I can fix it. If not,
then *various swear words concerning the promiscuity of this project's
mother*.
-Jimbo
Same thing happened to me. It was a bug in my SlideAndIncrement function
that slid the node 1 spot too far. This made getParent() give confusing
results, and since writeCode traverses up the tree using getParent() it
never reached the root node and looped until there was a StackOverflow.

I debugged it by running it on some simple string "ABCDDDD" that I
previously calculated out on paper. I then compared my internal array to
the array notation of the correct tree and noticed that the nodes were
sliding too far.

Loading...