math3d-react icon indicating copy to clipboard operation
math3d-react copied to clipboard

Cyclic function assignment cause stack error

Open nedisy opened this issue 4 years ago • 4 comments

Hello, I think I found a bug,

add g to the text cursor in this picture and the app will crash image

the log: www.math3d.org-1642475359497.log

nedisy avatar Jan 18 '22 03:01 nedisy

After I read the code related, I think the problem is the getDescendants function called before cyclic dependencies get erased in childMap, so there will be cyclic calls in getDescendants, thus the stack error. This specifically happens if the value of constant "onlyTheseAndChildren" is not null, the only time getDescendants is called.

Math3d_ Online 3d Graphing Calculator Error Log.pdf Math3d_ Online 3d Graphing Calculator Error Log_page-0001

nedisy avatar Jan 18 '22 13:01 nedisy

What were you trying to do? Some sort of recursive definition?

o-b-o avatar Jan 24 '22 23:01 o-b-o

Trying to test if it will throw an error

nedisy avatar Jan 25 '22 05:01 nedisy

Trying to do this in python will throw an error too. You need to define one function first, you can then define another as the original function.

o-b-o avatar Jan 26 '22 22:01 o-b-o