If a condition is checked out of synch it can miss it and get stuck.
A good example is how while loops get stuck if you don't add a wait at the end of it and if you warp time the wait may not be enough.
Having a conditional block at the end of a loop can cause multiple executions of the condition at once.

Bug Done Found in 0.8.400.0 Fixed in 0.8.402.0
Sandbox View

10 Comments

  • Log in to leave a comment
  • Profile image
    Dev Pedro

    @AndrewGarrison I was about to share you the craft and that was my guess after testing it today (sorry, yesterday I forgot to make it). I'm glad that's fixed :)

    5.0 years ago
  • Profile image

    I'm fairly certain I've found what's causing this issue. It appears to happen when an if, else if, or else is the last instruction in a repeat or while block. The fix will be in the next update. Thanks again, @pedro16797!

    5.0 years ago
  • Profile image

    @Nethereal Can you upload a bug report with the craft demonstrating the issue?

    5.0 years ago
  • Profile image
    7,237 Nethereal

    I've noticed some weird behaviour as well. Seems to correlate with tick rate / part count.
    I've had tick rates work @ 1ms, but output of of some variables shows 0 in display, eventhough the display node is AFTER the variable value set...

    5.0 years ago
  • Profile image
    Dev Pedro

    @AndrewGarrison I'll make one later today, it's really easy to replicate

    5.0 years ago
  • Profile image

    @pedro16797 That's interesting. The next time you see that happen, can you upload a bug report so I can take a look at the sandbox and examine the craft in flight while its in this state?

    5.0 years ago
  • Profile image
    Dev Pedro

    @AndrewGarrison I think I've tried all, even "while true". If the skipped tick happens to be right when the loop goes from the end to the start the protram freezes there

    5.0 years ago
  • Profile image

    Thanks for the additional info. Stage activation cannot happen during time warp. I will change the Activate Stage instruction to force the time mode to Normal before executing.

    What breaks with loops exactly? What condition are you checking for that doesn't work?

    5.0 years ago
  • Profile image
    Dev Pedro

    @AndrewGarrison a lot of programs break, even with wait 1 they break under time warp. I'm now using kind of a trick slowing time before executing important things like loops or stage activations (those can activate all stages at once it you stage during a skipped tick)

    5.0 years ago
  • Profile image

    Which part of your program is having this problem? I do recommend having at least a Wait 0 seconds at the end of a while loop.

    5.0 years ago

7 Upvotes

Log in in to upvote this post.