You are trying to close a custom undo context while you do not have one opened. User actions may implicitly close the undo ...