When you save projects in SAS® Enterprise Guide, the "Cannot access a disposed object" error message might appear


When you save projects in SAS Enterprise Guide, the following error message might appear:

Cannot access a disposed object. Object name: 'Favorite'. -------------------------- Technical Information Follows -------------------------- Exception Details: ---------------------------------------- Exception type: System.ObjectDisposedException Message: Cannot access a disposed object. Object name: 'Favorite'. Source: System.Windows.Forms Target Site: CreateHandle Stack Trace: at System.Windows.Forms.Control.CreateHandle() at System.Windows.Forms.Control.get_Handle() at SAS.Shared.FileSelectionDialogs.Controls.Favorite.GetLabelSize(Rectangle textRect) at SAS.Shared.FileSelectionDialogs.Controls.FavoritesBar.GetLabelSize(Int32 itemIndex) at SAS.Shared.FileSelectionDialogs.Controls.FavoritesBar.GetItemSize(Int32 itemIndex) at SAS.Shared.FileSelectionDialogs.Controls.FavoritesBar.GetItemRect(Int32 index, Boolean applyScroll) at SAS.Shared.FileSelectionDialogs.Controls.FavoritesBar.OnItemVisibleChanged(Object sender, EventArgs args) at System.Windows.Forms.Control.OnVisibleChanged(EventArgs e) at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

This issue might be caused by an inaccessible My Documents location, insufficient rights to the My Documents location, or a corrupted Windows profile.

To remedy this issue, do the following in the order shown:

  1. Via Windows Explorer, navigate to c:\users\your-user-ID\My Documents to ensure that you can access this location without access violation error messages appearing.
  2. Right-click on the c:\users\your-user-ID\My Documents folder, select Properties, and select Security to validate that you have sufficient access permissions.

Note: If access violation error messages appear or you have insufficient permissions, contact your IT department to re-create your Windows profile.