SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 65616: Exporting data as a step in the project to CSV, TAB, or TXT files fails with System.NullReferenceException in SAS® Enterprise Guide®

DetailsHotfixAboutRate It

SAS Enterprise Guide enables you to export data by selecting Share Export or Share Export as step in project.

If you use Export as step in project to export to CSV, TAB, or TXT files, then the following exception might occur:

System.NullReferenceException: Object reference not set to an instance of an object.
   at SAS.EG.ProjectElements.ExternalTextFile.get_Decoder()
   at SAS.EG.ProjectElements.ExternalFile.EnsureInitialized()

In addition, the following pop-up message might be displayed:

 

Typically, the error occurs the second or third time that you attempt to execute Export as step in project or the process flow that contains the Export as step in project task. It might also occur when you execute the task after you have saved the project, closed SAS Enterprise Guide, and opened it one more time.

In addition, after that this error occurs, you might not be able to save your project. The following message error might occur when saving: Cannot close application

 

2020-02-26 18:44:34,520 [4] ERROR SAS.EG.ProjectElements.ElementManager [(null)] - Error saving project
System.NullReferenceException: Object reference not set to an instance of an object.
   at SAS.EG.ProjectElements.ExternalTextFile.get_Decoder()
   at SAS.EG.ProjectElements.ExternalFile.WriteSerializationString(XmlTextWriter xWriter)
   at SAS.EG.ProjectElements.ExternalFileList.WriteSerializationString(XmlTextWriter xWriter)
   at SAS.EG.ProjectElements.ElementManager.SaveInternal(Boolean resetModified)
2020-02-26 18:44:34,523 [1] ERROR SAS.EG.Framework.Main.MainWindow [(null)] - Cannot prompt and save on closing

As a workaround, you might use the Export task instead of Export as step in project.

Click the Hot Fix tab in this note to access the hot fix for this issue.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS Enterprise GuideMicrosoft® Windows® for x648.28.39.4 TS1M69.4 TS1M7
Microsoft Windows 8 Enterprise 32-bit8.28.39.4 TS1M69.4 TS1M7
Microsoft Windows 8 Enterprise x648.28.39.4 TS1M69.4 TS1M7
Microsoft Windows 8 Pro 32-bit8.28.39.4 TS1M69.4 TS1M7
Microsoft Windows 8 Pro x648.28.39.4 TS1M69.4 TS1M7
Microsoft Windows 8.1 Enterprise 32-bit8.28.39.4 TS1M69.4 TS1M7
Microsoft Windows 8.1 Enterprise x648.28.39.4 TS1M69.4 TS1M7
Microsoft Windows 8.1 Pro 32-bit8.28.39.4 TS1M69.4 TS1M7
Microsoft Windows 8.1 Pro x648.28.39.4 TS1M69.4 TS1M7
Microsoft Windows 108.28.39.4 TS1M69.4 TS1M7
Microsoft Windows Server 2012 Datacenter8.28.39.4 TS1M69.4 TS1M7
Microsoft Windows Server 2012 R2 Datacenter8.28.39.4 TS1M69.4 TS1M7
Microsoft Windows Server 2012 R2 Std8.28.39.4 TS1M69.4 TS1M7
Microsoft Windows Server 2012 Std8.28.39.4 TS1M69.4 TS1M7
Microsoft Windows Server 20168.28.39.4 TS1M69.4 TS1M7
Microsoft Windows Server 20198.28.39.4 TS1M69.4 TS1M7
Windows 7 Enterprise 32 bit8.28.39.4 TS1M69.4 TS1M7
Windows 7 Enterprise x648.28.39.4 TS1M69.4 TS1M7
Windows 7 Home Premium 32 bit8.28.39.4 TS1M69.4 TS1M7
Windows 7 Home Premium x648.28.39.4 TS1M69.4 TS1M7
Windows 7 Professional 32 bit8.28.39.4 TS1M69.4 TS1M7
Windows 7 Professional x648.28.39.4 TS1M69.4 TS1M7
Windows 7 Ultimate 32 bit8.28.39.4 TS1M69.4 TS1M7
Windows 7 Ultimate x648.28.39.4 TS1M69.4 TS1M7
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.