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

In SBC mode the supported nesting of function calls is too low #1012

Closed
dc42 opened this issue May 24, 2024 · 2 comments
Closed

In SBC mode the supported nesting of function calls is too low #1012

dc42 opened this issue May 24, 2024 · 2 comments
Assignees
Milestone

Comments

@dc42
Copy link
Collaborator

dc42 commented May 24, 2024

Reported at https://forum.duet3d.com/topic/35769/error-meta-command-too-many-indices/.

@dc42
Copy link
Collaborator Author

dc42 commented May 24, 2024

Reproduced using a macro file containing the following:

var x0=1
var x1=max(max(max(var.x0,2),3),4)
var x2=max(max(max(max(var.x0,2),3),4),5)
var x3=max(max(max(max(max(var.x0,2),3),4),5),6)
var x4=max(max(max(max(max(max(var.x0,2),3),4),5),6),7)
var x5=max(max(max(max(max(max(max(var.x0,2),3),4),5),6),7),8)
var x6=max(max(max(max(max(max(max(max(var.x0,2),3),4),5),6),7),8),9)
echo var.x6

In standalone mode the "Expression nesting too deep" error occurs on the "var x6=" line. In SBC mode it occurs on the "var x2=" line.

The difference is probably because in SBC mode the expression is executed by the SBC task instead of the Main task. Increasing the SBC task stack size should resolve it. Each additional nested function call needs about 288 bytes of stack space in RRF 3.5.1.

@dc42 dc42 added this to the 3.5.2 milestone May 24, 2024
@dc42
Copy link
Collaborator Author

dc42 commented May 28, 2024

Fixed by chrishamm.

@dc42 dc42 closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants