"Deep" Undo

I just ran into something while working on my latest project. I was working on a scene, and then had what I thought at the time was a great idea to make it better. I worked about twenty minutes on the changes and then proudly read back my newer, stronger, better scene. And I decided it was, … basically, a total crock.

I hadn’t taken a snapshot. So I started 'Undo’ing the changes. For a pretty good while, things worked fine. All the operations unwound as expected. Then, all of a sudden, things ground to a halt. I was typing Ctrl+Z to undo, but nothing was happening. What? What’s going on? So, I went to the Edit menu and selected the ‘Undo’ item manually. Operations began unwinding again as I pressed Ctrl+Z. But then they hung again and I had to go to the Edit->Undo menu item to get the edits to begin unwinding again. This happened more than once.

Everything worked out in the end. I got the scene back to its former self and continued on.

But it seems there is a bug in Undo having something to do with the length of the Undo list. I think after the Undo list gets so long, something in the undo logic gets confused if there have been a lot of undos.

And it may not be the number of items in the undo list; it might be the total amount of data to be undone. In other words, it might be possible to reproduce the bug by only trying to undo a few very large items. Just speculating, though.

In any case, the symptom of the bug is that Ctrl+Z is ignored, but the Undo menu item is still processed.

Sorry, I didn’t keep any specifics on queue length and such.

Just thought of something, so I checked. It might have had something to do with memory starvation. I have 6GB of memory, still, one never knows. But Task Manager put that idea to rest. Physical memory usage sits at about 46%.

Thanks for the report. Lee has made some fixes to the undo feature (so it no longer undoes only a character at a time, thus filling up the list much too quickly) which have probably corrected this, but I’ll make sure it’s on the list to double-check.