Skip to content
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

Bug: time elapsed is not a function #6

Open
henricattoire opened this issue Nov 29, 2023 · 1 comment
Open

Bug: time elapsed is not a function #6

henricattoire opened this issue Nov 29, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@henricattoire
Copy link
Contributor

Problem:

Run vuurwerk in debug mode and go back in time to a point where a firework is gliding in the air. Then remove the future and try to continue running the program. Scratch will give the following error:

Uncaught TypeError TypeError: util.stackFrame.timer.timeElapsed is not a function
    at glide (/Users/.../C002309-thesis/ugent-Scratch/blink/scratch-vm/src/blocks/scratch3_motion.js:146:1)
    at execute (/Users/.../C002309-thesis/ugent-Scratch/blink/scratch-vm/src/engine/execute.js:518:1)
    at stepThread (/Users/.../C002309-thesis/ugent-Scratch/blink/scratch-vm/src/engine/sequencer.js:245:1)
    at stepThreads (/Users/.../C002309-thesis/ugent-Scratch/blink/scratch-vm/src/engine/sequencer.js:134:1)
    at _step (/Users/.../C002309-thesis/ugent-Scratch/blink/scratch-vm/src/engine/runtime.js:2149:1)
    at vm.runtime._step (/Users/.../C002309-thesis/ugent-Scratch/blink/itch/packages/core/src/context.ts:135:25)
    at <anonymous> (/Users/.../C002309-thesis/ugent-Scratch/blink/scratch-vm/src/engine/runtime.js:2753:1)

It seems like the logger is not properly logging the stackframe timer.

@henricattoire henricattoire added the bug Something isn't working label Nov 29, 2023
@henricattoire henricattoire self-assigned this Nov 29, 2023
@henricattoire
Copy link
Contributor Author

Logger was logging the stackframe correctly, timer object just need to be recreated when threads get deserialized in order for the error to go away.

How Blink should handle blocks that use timer object and js promises is a difficult question. For now, working this out will be postponed until the new execution model is completely finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant