Problem Note 54246: The error "sas.exe has stopped working" occurs when you are working in an interactive SAS® session
When working in an interactive SAS session, you might receive the following error message:
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.
- Right-click My Computer or Computer and select Properties.
- Click Advanced system settings to open the System Properties dialog box.
- On the Advanced tab, click Environment Variables....
- 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." )
- In the Variable name field, enter SAS_USE_THREAD_SAFE_MEMORY, and in the Variable value field, enter 1.
- Click OK.
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
SAS System | Base SAS | Microsoft® Windows® for x64 | 9.3 | 9.4_M3 | 9.3 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 | | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 | | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.3 | | 9.3 TS1M0 | |
Microsoft Windows Server 2003 for x64 | 9.3 | | 9.3 TS1M0 | |
Microsoft Windows Server 2008 | 9.3 | 9.4_M3 | 9.3 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2008 R2 | 9.3 | 9.4_M3 | 9.3 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2008 for x64 | 9.3 | 9.4_M3 | 9.3 TS1M0 | 9.4 TS1M3 |
Microsoft Windows XP Professional | 9.3 | | 9.3 TS1M0 | |
Windows 7 Enterprise 32 bit | 9.3 | 9.4_M3 | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Enterprise x64 | 9.3 | 9.4_M3 | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Home Premium 32 bit | 9.3 | 9.4_M3 | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Home Premium x64 | 9.3 | 9.4_M3 | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Professional 32 bit | 9.3 | 9.4_M3 | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Professional x64 | 9.3 | 9.4_M3 | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Ultimate 32 bit | 9.3 | 9.4_M3 | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Ultimate x64 | 9.3 | 9.4_M3 | 9.3 TS1M0 | 9.4 TS1M3 |
Windows Vista | 9.3 | | 9.3 TS1M0 | |
Windows Vista for x64 | 9.3 | | 9.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.
Display Manager SAS shuts down at what appears to be random times, and a Windows pop-up message says "sas.exe has stopped working." This is caused by a memory corruption that occurs when two threads access the same resources as the same time.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2014-10-28 11:35:31 |
Date Created: | 2014-10-02 12:17:00 |