I'm having an issue with some Gcode scripts I have setup which are calling each other but stopping execution for no apparent reason with no errors. I believe it can be reproduced with the following:
test_a.g
if true
echo "Yes"
else
echo "No"
test_b.g
if true
M98 P"test_a.g"
M98 P"test_a.g"
M98 P"test_a.g"
If I then run:
M98 P"test_b.g"
I get only a single "Yes" printed to the console. If I edit test_a.g to be:
if true
echo "Yes"
else
echo "No"
echo "Done"
I get then then expected three "Yes" strings output (and of course three "Done" strings as well). The above example is a cut down minimal reproduction case from a much more complex script.
Note that in test_b.g, if the M98
calls are not inside an if
clause then they do work as expected. So it appears to be something to do with the nesting of the if
statements across nested macro calls.
The absence or presents of a final newline has no effect on the issue. Note also the failure is silent, there are no errors it just stops executing code.
I'm on RRF3.4.1, not sure if this is definitely a bug and whether I should file it on Github or not so hoping for a sanity check here.