Undo works for a while then fails in Maya 2016

I am currently using Maya 2016 SP5 in a Linux Environment.
Was wondering if anyone have encountered if the running processes within Maya will cause Undo functionality to fail? I asked this because while having remove the Prefs folder, sometimes while the Undo is back working normally, it will soon pops back to not working, seems like an on/off thing.

Other than going to the Preferences Window where Undo is checked as On and Queue is On too… Are there any other places that I can do to resolve this?

Additionally, is it possible to get the list of actions/commands in Undo, something like the history log of what comes next if user hits on Undo command?

From my experience, this is most commonly caused by a script that disables undo functionality while it does a bunch of busy work that you don’t want to undo as multiple steps. If this script crashes while the script is running and doesn’t have exception handling that re-enables undo functionality, you will be left in this state.

When this happens, see if you can fix it by manually turning undo back on with the MEL command:

undoInfo -state on

[QUOTE=btribble;30976]From my experience, this is most commonly caused by a script that disables undo functionality while it does a bunch of busy work that you don’t want to undo as multiple steps. If this script crashes while the script is running and doesn’t have exception handling that re-enables undo functionality, you will be left in this state.

When this happens, see if you can fix it by manually turning undo back on with the MEL command:

undoInfo -state on

[/QUOTE]

Hi btribble, I will try giving it a go if I encounter the issue again…
Currently as soon as I hit this problem, instinctively I simply save my scene and restart maya so as to make my life easier…

Even so, are there any ways to check the said script that is causing this problem?

Are you running custom tools? The stuff that comes from Autodesk has historically been pretty bulletproof. You will have to watch for errors when executing custom tools and when/if you see one, that is probably the culprit. If you look in the script listener window, you can see what errors have occurred. It is also possible that one of your scripts is just doing a poor job of handling the undo state.

Well, I am indeed using some custom tools within my office, Thing is, I tried the same scene in my other colleagues’ machine or even while they are doing their own stuff, they do not seems to be getting this problem, except for me.

Funnily enough, this has not happened before until a week or 2 ago. Thus not sure what exactly is going on as I have tried deleting my prefs, restart maya etc but still not everything have been rectified…

Set aside all your custom tools and see if the problem goes away, then look to see what you’re running that others aren’t.

search your custom tools for undoInfo -st or cmds.undoInfo(st= and see what comes up…