Is that Steam version or standalone? Do you get the error whenever you try to save, or does that only happen after some specific actions? Error indicates that something went wrong when opening new ui and thus one of global variables is undefined.
If you're on Steam, try verifying cache integrity first. If it still doesn't work, you can try replacing your replay_save.lua (located in data/script/system/ folder) with
this version of it.