Undo-tree error reading history

What happened?

When I open my todo.org file it freezes for a bit. When it unfreezes the following error is printed in the echo area:

Error reading undo-tree history from "/home/user/.emacs.d/.local/cache/undo-tree-hist/.1d09356baaf2974f727a0889c0d6e5e3dab48f6d.~undo-tree~"

What did you expect to happen?

The file should open as normal with no error.

System information


Loading data dump...

The cache file is corrupted. Just delete it and you should be good to go.

I deleted it. A couple hours later (and after reloading Emacs), the same error happened, with the same file name, i.e. I deleted that cache file and it seems to have been rewritten to.

I have already disabled undo-tree-enable-undo-in-region which I hear is buggy.

I have added (toggle-debug-on-error) to my config, but I get no backtrace before/after the error message appears. Any suggestions on how to find the source of this error?