Skip to content

Don't emit PROJECT_RUN_START for edge activation check thread #2419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

apple502j
Copy link
Contributor

Resolves

Resolves #1948

Proposed Changes

  • Counts number of threads that are edge-activated
  • Exclude the threads from PROJECT_RUN_START checks

Reason for Changes

All edge-activated hats will be executed once per tick at _step, triggering PROJECT_RUN_START, which makes the green flag GUI "stuck" at active state. This is also compatibility issue; Scratch 2.0 didn't have this problem.

Test Coverage

tested in vivo(aka in my browser)

@ericrosenbaum ericrosenbaum added this to the Schedule Review milestone Jun 25, 2020
@chrisgarrity chrisgarrity removed this from the Schedule Review milestone Jun 25, 2020
@Wowfunhappy
Copy link

Wowfunhappy commented Mar 8, 2023

@apple502j One issue I noticed—while this pull request fixes #1948 in the general case, the problem remains if the program was stopped via a stop all block.

Screen Shot 2023-03-08 at 12 41 23 PM

Test project attached:
Pull 2419 Issue.sb3.zip

@adroitwhiz
Copy link
Contributor

I think this also just doesn't count any scripts started by edge-activated hat blocks as "running".

@Wowfunhappy
Copy link

I think this also just doesn't count any scripts started by edge-activated hat blocks as "running".

No, that part seems to work for me, at least in terms of the active state of the green flag. When an edge-activated hat is triggered, the green flag becomes active until the script finishes, at which point the flag becomes inactive. It's just stop all that seems to screw things up.

@apple502j
Copy link
Contributor Author

Well, updating 2.5 years old PR definitely sounds like a good idea... I'll try

@Wowfunhappy
Copy link

@apple502j Before you do, note that @adroitwhiz just made a separate fix: #3912

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Edge-triggered(?) hat blocks make the green flag always look active
5 participants