Rhino viewport freezes

While creating a new grasshopper plugin that saves a RhinoDoc to the hard disk (RhinoDoc.ActiveDoc.SaveAs) the viewports ui of Rhino freezes. The rest of the program will continue to work. This only happens if you link a geometry to grasshopper parameter and then move the geometry in the rhino ui, and immediately re-run the grasshopper document.
After days of testing I saw that it was not my grasshopper component that caused this problem.
The solution I found for this problem is to use RhinoDoc.ActiveDoc.WriteFile. In the FileWriteOptions I set the IncludePreviewImage to false, after that my component worked fine.
See a photo below:

My question is why does the rhino viewport ui hangs if the IncludePreviewImage property is true?

A few more examples of what the rhino viewport ui looks like and what happens when you minimize and maximize rhino ui: