The author of
undo-tree.el, Toby Cubitt, is presently too busy to fix this particular bug. If he has time in the future, he may look into the issue further. The author has indicated that he has difficulty reproducing the error reliably, and was recently unable to reproduce it using the master branch. It only occurs when using undo/redo-in-region. The author suggests just turning off the undo/redo-in-region feature in the meantime.
I would strongly encourage anyone who is motivated to come up with a reliable way to reproduce the issue starting from
emacs -q using both the current stable release of Emacs (e.g., 25.2.1) and also with the most recent version of the master branch, and then submit those recipies to bug tracking number 16377 with carbon copies to the participants (Stefan, Toby, Barry, and Keith).
The main tracking number is 16377, and there is a related tracking number 16523:
Here is the workaround that turns off the
(setq undo-tree-enable-undo-in-region nil)