Recovery Mode

As a visualization author who has accidentally written code with an infinite loop in it, I want to be able to recover my work and correct the error.

As it stands, user code with an infinite loop causes the browser tab to hang, and the interface is unresponsive.

The only way to get the work is to manually enter the export URL. For example, if the viz is at https://beta.vizhub.com/curran/b688e9593fb04338a059ace579e3a055, the export URL would be https://beta.vizhub.com/api/visualization/export/b688e9593fb04338a059ace579e3a055

Fresh request for this from YouTube comments. Pasting the discussion here:

I accidentally created a nested loop that results in infinite looping, and the page just crashed, and there is no way I could correct it because the page will automatically run, freeze and crash. I wish there is a “pause” feature so I can correct serious problem like this.

Yes, thank you for this report. This is a known serious issue of VizHub. It does happen that if your code has an infinite loop in it, the page crashes and the work is not recoverable (yet). Several people have run into this issue. There is a new “pause auto-run” feature, but this doesn’t solve the issue because the program still runs and crashes the page when the page is initially loaded. I’m sorry to hear you are experiencing this. I hope to find a solution for this case, something like “recovery mode”.

Maybe I could add a feature like, you could put #recover at the end of the URL or something like that, which could let you edit the code without running the program…

This is done! You can add #recover to the end of the URL for your broken viz to enter “recovery mode”. For example:

https://vizhub.com/curran/90f961ce0f824558a4cc053bd38ae5f3#recover

To get this URL:

  • Right click the preview of your broken viz.
  • Click “Copy link address”
  • Open a new tab
  • Paste the URL (but don’t hit enter!)
  • Type #recover at the end of the URL
  • Hit enter to load the page in recovery mode.

In recovery mode, the code will not run. You can make code changes to fix your infinite loop, then click “Exit recovery mode” when you’re done.