Custom code that uses the Application.RefreshView() call in .NET code or Python, may cause a screen redraw error, due to code changes starting in Workbook 2021 SP1 HF4 and Workbook 2022 HF2.
The error is displayed as a “Red X” accompanied by the following type of error:
"System.NullReferenceException: Object reference not set to an instance of an object
at TD.SandDock.DocumentLayoutSystem."
The recommendation is to use section.View.Refresh() or section.Refresh() to refresh the section when needed instead of forcing a full redraw of the Application (i.e. the experiment editor).
If the user encounters the error, switching the layout (Eg. Continuous to Section), may cause the error message to temporarily go away, and allow the user to continue working.
BIOVIA logged this issue as NBK-34359.