Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formular Solver #1700

Open
olliklee opened this issue Jun 21, 2024 · 2 comments
Open

Formular Solver #1700

olliklee opened this issue Jun 21, 2024 · 2 comments
Assignees

Comments

@olliklee
Copy link
Contributor

Complete crashes the app, when a variable accidently calls itself a few times:

{"id":6,"name":"test","formulas":[{"id":1,"formula":"[A][B]"}],"values":[{"id":1,"key":"A","value":"len(aaaaaaaaaa)"},{"id":2,"key":"B","value":"cos(2.7)"}]}

This runs in an exponential raising output string, but only if more variables are added. If the B variable is deleted, the functions acts normal.

@t-m-z t-m-z added the bug Something isn't working label Jun 21, 2024
@S-Man42 S-Man42 self-assigned this Jul 4, 2024
@S-Man42 S-Man42 added this to the 3.2.0 milestone Jul 4, 2024
@S-Man42 S-Man42 reopened this Jul 23, 2024
@S-Man42
Copy link
Owner

S-Man42 commented Aug 16, 2024

No. It is exaclty working as defined. We just have to think about adjusting the logic to avoid this.

Only interesting thing is: Are you quite sure about the freeze? Well, even my emulator is well working. It's just a very long and hence maybelong building output.

grafik

@S-Man42 S-Man42 added enhancement and removed bug Something isn't working labels Aug 16, 2024
@S-Man42
Copy link
Owner

S-Man42 commented Aug 16, 2024

I don't really know how to solve it. One could check whether the variable contains itself. But where to end? It could be that A contains B and B contains C and C contains D and D contains A and even much more complicated. One has to think about a cyclic checker... Well, I personally believe: "Shit in shit out" is a good option here, as long it is no crash. And the nested depth is threshold by (number of variables)^2. So it could be a big number, but no endless loop.

@S-Man42 S-Man42 removed this from the 3.2.0 milestone Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants