SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 54246: The error "sas.exe has stopped working" occurs when you are working in an interactive SAS® session

DetailsHotfixAboutRate It

When working in an interactive SAS session, you might receive the following error message:


image label

A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.

You might also see this error:

A required Resource was not available.

The problem occurs intermittently and only during an interactive SAS session. It does not happen in batch mode.

The issue can occur when you do any of the following:

  • Resize a window to make it larger
  • Run with a session encoding of UTF-8
  • Keep Interactive SAS (Display Manager SAS) open for multiple days
  • Use SAS Explorer to view a directory with a large number of files
  • Click many different folders in SAS Explorer
  • Click the Favorite Folders in SAS Explorer
  • Switch between the Enhanced Editor window and the VIEWTABLE window

Resolving the Issue

To resolve this issue, follow the steps below to apply the hot fix and then set the Windows environment variable SAS_USE_THREAD_SAFE_MEMORY to 1.

Step 1: Apply a SAS hot fix.

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

Step 2: Set the system environment variable SAS_USE_THREAD_SAFE_MEMORY=1.

  1. Right-click My Computer or Computer and select Properties.


  2. Click Advanced system settings to open the System Properties dialog box.


  3. On the Advanced tab, click Environment Variables....


  4. In the System variables pane (not the user variable pane), click New. The New System Variable command box appears. (Important: Make sure that you are not adding a new user variable. The top of the command box should say, "New System Variable," not "New User Variable." )


  5. In the Variable name field, enter SAS_USE_THREAD_SAFE_MEMORY, and in the Variable value field, enter 1.


  6. Click OK.
screenshot of System variables pane

The hot fix adds serialization so that when you are in interactive SAS, only one thread can access the resource at a time. This serialization might cause a slight decrease in performance. This should not be noticeable. If the serialization causes a problem, you can turn it off by setting SAS_USE_THREAD_SAFE_MEMORY=0.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemBase SASMicrosoft® Windows® for x649.39.4_M39.3 TS1M09.4 TS1M3
Microsoft Windows Server 2003 Datacenter Edition9.39.3 TS1M0
Microsoft Windows Server 2003 Enterprise Edition9.39.3 TS1M0
Microsoft Windows Server 2003 Standard Edition9.39.3 TS1M0
Microsoft Windows Server 2003 for x649.39.3 TS1M0
Microsoft Windows Server 20089.39.4_M39.3 TS1M09.4 TS1M3
Microsoft Windows Server 2008 R29.39.4_M39.3 TS1M09.4 TS1M3
Microsoft Windows Server 2008 for x649.39.4_M39.3 TS1M09.4 TS1M3
Microsoft Windows XP Professional9.39.3 TS1M0
Windows 7 Enterprise 32 bit9.39.4_M39.3 TS1M09.4 TS1M3
Windows 7 Enterprise x649.39.4_M39.3 TS1M09.4 TS1M3
Windows 7 Home Premium 32 bit9.39.4_M39.3 TS1M09.4 TS1M3
Windows 7 Home Premium x649.39.4_M39.3 TS1M09.4 TS1M3
Windows 7 Professional 32 bit9.39.4_M39.3 TS1M09.4 TS1M3
Windows 7 Professional x649.39.4_M39.3 TS1M09.4 TS1M3
Windows 7 Ultimate 32 bit9.39.4_M39.3 TS1M09.4 TS1M3
Windows 7 Ultimate x649.39.4_M39.3 TS1M09.4 TS1M3
Windows Vista9.39.3 TS1M0
Windows Vista for x649.39.3 TS1M0
* 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.