Escaping infinite loops and saving wiki

For some reason with changes since 5.3.x, whilst writing code there are an increased number of cases where you can disable your wiki by accidently causing infinite loops, this in itself needs addressing, I think the issue is default behaviours listing all tiddlers when a filter or function is “null”.

  • I have a wiki in this state now, I can scroll and click on buttons but they do nothing.
  • All I want to do is save and reopen with a tiddler that is not problematic, but I cant save. If I reload I may loose work.

Is there away to stop the infinite loop but still have the opportunity to save the wiki?

Agreed. For me the scenario is usually…

  1. Modifying a tiddler with global macros/procs and introducing a typo.
  2. Save the tiddler → TiddlyWiki saves to disk.
  3. Crickets.

Sometimes the “Saved wiki” notification appears and gets stuck – in which case, the wiki is usually fine. But if I don’t see it, or the “Starting…” notification gets stuck, it’s time to manually restore the edited tiddler from backup or dig into the json store.

For me it is after your step 1, I end up with the wiki freezing the UI no longer responding properly, so I can’t proceed to steps 2 or 3.

  • Similar level of frustration, I am sure.

Today after reloading the tab, the whole browser failed, your crickets perhaps?.

  • The most annoying this is if you are in a space, coding, juggling half a dozen variables or ideas or as you proceed from A to B and all that is lost by the time you get back to where you were a step before (if you are lucky) this happened.

Sometimes I do have a problem, with the editor “preview” function. If it’s active and there is a typo in the code it may “brick” the wiki for some time. Usually it comes back after a minute or so.

My workaround is: code-body: yes so the preview cannot cause the problem. It’s not optimal but it helps :confused:


There is a pending PR: Introduced preliminary idea for infinite recurse exception by flibbles · Pull Request #7882 · Jermolene/TiddlyWiki5 · GitHub that should help with the problem.

Does @pmario’s emergency save procedure work in this case?

Yep. Same here, especially when {{}} rose its head. My first solution was to disable the preview in the settings – I really don’t use if often anyway. Then I realized, it’s the only button I use on the toolbar… so I turned it all off.