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.
    • gloomyandyundefined
      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_ukundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • jay_s_ukundefined
        jay_s_uk @gloomyandy
        last edited by

        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

        chrishammundefined 1 Reply Last reply Reply Quote 0
        • chrishammundefined
          chrishamm administrators @jay_s_uk
          last edited by

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

          Duet software engineer

          1 Reply Last reply Reply Quote 1
          • dc42undefined
            dc42 administrators @gloomyandy
            last edited by

            @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
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA