[Solved] "add_file_and_line failed at lua_getstack"

Home Forums General Programming [Solved] "add_file_and_line failed at lua_getstack"

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #681
    msepsis
    Participant
      • Topics: 219
      • Replies: 732
      • Total: 951
      • ★★★

      I’ve got a script attached to a button that runs a timer.. here’s the jist of the script:

      [code:1yikgulj]
      mymethod = function(modulator, newValue)

      timer:setCallback (31, maxminCallback)
      timer:startTimer(31,500)

      function maxminCallback (timerId)
      — do a bunch of setModulatorValues

      timer:stopTimer(31)
      end
      — do a bunch of other setModulatorValues

      end
      [/code:1yikgulj]

      I’m getting a "Lua runtime error, Callback disabled" message, strangely though after closing the message the script works on the button and does what it should indefinitely after closing the message until the panel is loaded again, then the error appears again once hitting this button with the above script attached.

      After hitting this button and getting the above error, the Lua console says:
      "add_file_and_line failed at lua_getstack, unknown error occured"..

      I’m not sure if I’ve encountered a bug or am using the timer improperly?

      note- occurred is spelled wrong in the console message <img decoding=” title=”Smile” />

      [b:1yikgulj]Follow-up:[/b:1yikgulj]
      Ok I illiminated the error by putting the callback in its own method… so

      [code:1yikgulj] function maxminCallback (timerId)
      — do a bunch of setModulatorValues

      timer:stopTimer(31)
      end[/code:1yikgulj]

      is its own method now, named "maxminCallback"… all working now. strange, i thought you could define and put the callback method anywhere… ?

      Monstrum Media | Music, Sound & Software Design, Chicago / San Francisco listen

    Viewing 1 post (of 1 total)
    • The forum ‘Programming’ is closed to new topics and replies.
    There is currently 0 users and 51 guests online
    No users are currently active
    Forum Statistics
    Threads: 2,495, Posts: 17,374, Members: 77,605
    Most users ever online was 12 on January 22, 2019 3:47 pm
    Ctrlr