Skip to content

Infinite loop deletes autosave #3891

@robog-two

Description

@robog-two

p5.js version

1.11.11

What is your operating system?

None

Web browser and version

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:147.0) Gecko/20100101 Firefox/147.0

Actual Behavior

Hello. I am very sad. I have been working on a sketch for ~5 hours straight for my algorithms class. I accidentally created an infinite for loop. I have autosave enabled and I had named the sketch, so I know that it was saved and I was logged in. After killing the tab, the sketch is no longer in my sketches tab. Thank you for any help on this issue. I'm going to go take a walk.

Expected Behavior

Autosave/auto-refresh should have a protection against accidental infinite loops, or at the very least, when autosave is on it should save the sketch every minute or so (or before every auto-refresh?) so in the event that the tab crashes the sketch is recoverable.

Steps to reproduce

Steps:

  1. Create sketch
  2. Name sketch
  3. Make sure autosave is on
  4. Make sure auto-refresh is on
  5. Hit the play button
  6. Write an infinite loop, oops!
  7. Kill tab with the firefox task manager, then navigate back to the tab
  8. Observe that the editor has opened a blank sketch and the sketch is no longer saved to your account 🥲

Snippet:

// Paste your code here :)
for (let x = 0; x > -4; x++) {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting Maintainer ApprovalNeeds review from a maintainer before moving forwardBugError or unexpected behaviors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions