I have had a problem with undoing lately, which seems rather dangerous and has almost lost me work. At first I thought it was due to undo-tree, so I deactivated that. But it persists and now I suspect yasnippet. I just got the following when trying to redo. (Work would have been lost if I hadn't already saved.)
apply: Wrong number of arguments: #[(snippet) "ÂH > [snippet cl-struct-yas--snippet-tags 0 signal wrong-type-argument yas--snippet 2 yas--commit-snippet] 4 ("/home/toothrot/.emacs.d/elpa/yasnippet-20180111.1533/yasnippet.elc" . 175423)], 3
Sorry I haven't had time to investigate this very thoroughly, but perhaps someone has had the same problem.