[3.4.0b4] Expression nesting too deep
gloomyandy last edited by
When running with 3.4.0b4 in SBC mode using a macro that contains the following:
if abs(move.calibration.initial.deviation - move.calibration.final.deviation) < 0.0005 echo "Calibration complete" break
Produces the following error:
Error: Failed to read code from macro test macro: Failed to evaluate "abs(move.calibration.initial.deviation - move.calibration.final.deviation) < 0.0005": Expression nesting too deep
Originally detected with the STM32F4 port but confirmed with a Duet setup by @jay_s_uk
On the STM32F4 I tracked this down to a stack check exception being thrown in ObjectExplorationContext::CheckStack. If I increase the SBC/Linux stack size to 1000 words (arbitrary size chosen!), then the code works, but this may not be the best solution.
jay_s_uk last edited by
Confirmed on a duet 3 mini + SBC running 3.4b4
@gloomyandy thanks for reporting this. I have reduce the stack usage of ExpressionParser::ParseIdentifierExpression, which had grown in beta4, and increased the SBC task stack size from 820 to 1000 words.