[stop all] does not ensure all other scripts stop before executing next block

Report bugs. Post bug workarounds or fixes

Moderator: MSandro

Post Reply
MrSteve
Posts: 61
Joined: Jun 16th, '16, 01:22

[stop all] does not ensure all other scripts stop before executing next block

Post by MrSteve » Jul 8th, '16, 05:11

To re-create:

1) open project:
loopTiming.v2.gpp
(6.76 KiB) Downloaded 286 times
2) press g key

You will see the 'say' statement with the time taken blinks on the screen at 0,0, but the morph moves back to large X value. Thus indicating that the 'go to x 0 y 0' occurs executed before all scripts 'stopped'

The two key scripts are in the top row of MyClass.
Screen Shot 2016-07-08 at 12.51.39 AM.png
I tried moving the 'move 10' block into the different loops and the only one that gave what I would consider to be expected behavior was when I put it in the forever loop (which makes sense based on John's previous explanation).


Now if I move the move block after the while loop I get the expected behavior.
Screen Shot 2016-07-08 at 12.56.09 AM.png
So it seems the while loop continued after stop all (perhaps because it used it 50ms time allotment and ran one extra time, hey I'm guessing, so never mind, look at the code)

I also wrote some stopAll tests see project:
loopTiming.v2.gpp
(6.76 KiB) Downloaded 286 times
to try and come up with a simpler example of the issue, but was not able to re-create the problem.
Attachments
stopAll Tests.gpp
(5.42 KiB) Downloaded 298 times

Post Reply