• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

[3.4.0b4] Expression nesting too deep

Scheduled Pinned Locked Moved
Beta Firmware
4
4
274
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    gloomyandy
    last edited by 28 Sept 2021, 10:26

    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.

    undefined undefined 2 Replies Last reply 28 Sept 2021, 10:27 Reply Quote 0
    • undefined
      jay_s_uk @gloomyandy
      last edited by 28 Sept 2021, 10:27

      Confirmed on a duet 3 mini + SBC running 3.4b4

      Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

      undefined 1 Reply Last reply 28 Sept 2021, 10:28 Reply Quote 0
      • undefined
        chrishamm administrators @jay_s_uk
        last edited by 28 Sept 2021, 10:28

        @gloomyandy @jay_s_uk Thanks, I'll have a look.

        Duet software engineer

        1 Reply Last reply Reply Quote 1
        • undefined
          dc42 administrators @gloomyandy
          last edited by 4 Oct 2021, 17:38

          @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.

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          1 Reply Last reply Reply Quote 1
          3 out of 4
          • First post
            3/4
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA