Problem Note 55842: An ODS PDF TEXT= statement might generate a "Read Access Violation" error
The following error messages might be generated if an ODS TEXT= or ODS PDF TEXT= statement is used to write a text string to the ODS PDF destination in which the BACKGROUNDIMAGE, POSTIMAGE, or PREIMAGE style attributes are used to insert one or more images:
ERROR: An exception has been encountered.
Please contact technical support and provide them with the following traceback information:
The SAS task name is [OBJECT_EXECUTIVE]
ERROR: Read Access Violation OBJECT_EXECUTIVE
Your SAS® session terminates abnormally when this occurs.
The problem occurs in one of the following scenarios:
- The ACTIVEX or ACTXIMG device driver is in effect.
The problem is more likely to occur in a SAS session that is started using SAS® Enterprise Guide®, where the ACTIVEX device driver is the default.
To circumvent the problem, use the SASPRTC device driver by inserting the following statement before the ODS PDF FILE= statement:
- The ORIENTATION= system option is used to change the orientation of a page inside the PDF file.
To circumvent the problem in SAS® 9.3, either remove the image or leave the orientation at its original setting.
To circumvent the problem in SAS® 9.4, change the ODS PDF TEXT= or ODS TEXT= code to use PROC ODSTEXT. Sample code to illustrate this is shown on the Full Code tab.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.3 TS1M0 | 9.4 TS1M3 |
Z64 | 9.3 TS1M0 | 9.4 TS1M3 |
Microsoft® Windows® for x64 | 9.3 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 | 9.3 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2008 R2 | 9.3 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M0 | 9.4 TS1M3 |
Microsoft Windows XP Professional | 9.3 TS1M0 | |
Windows 7 Enterprise 32 bit | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Enterprise x64 | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Home Premium 32 bit | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Home Premium x64 | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Professional 32 bit | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Professional x64 | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Ultimate 32 bit | 9.3 TS1M0 | 9.4 TS1M3 |
Windows 7 Ultimate x64 | 9.3 TS1M0 | 9.4 TS1M3 |
Windows Vista | 9.3 TS1M0 | |
Windows Vista for x64 | 9.3 TS1M0 | |
64-bit Enabled AIX | 9.3 TS1M0 | 9.4 TS1M3 |
64-bit Enabled HP-UX | 9.3 TS1M0 | 9.4 TS1M3 |
64-bit Enabled Solaris | 9.3 TS1M0 | 9.4 TS1M3 |
HP-UX IPF | 9.3 TS1M0 | 9.4 TS1M3 |
Linux | 9.3 TS1M0 | 9.4 TS1M3 |
Linux for x64 | 9.3 TS1M0 | 9.4 TS1M3 |
Solaris for x64 | 9.3 TS1M0 | 9.4 TS1M3 |
*
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.
An ODS TEXT= or ODS PDF TEXT= statement is used to write a text string to the ODS PDF destination in which the BACKGROUNDIMAGE, POSTIMAGE, or PREIMAGE style attributes are used to insert one or more images. When the ORIENTATION= system option is used to change the orientation of a page inside the PDF file, the following error message is produced:
ERROR: An exception has been encountered.
The workaround in this scenario in SAS® 9.4 is to change the syntax to use PROC ODSTEXT instead of ODS PDF TEXT= or ODS TEXT= statements.
/* Problem */
ods _all_ close;
options orientation=portrait nodate nonumber;
ods pdf file="problem.pdf" notoc;
ods escapechar='^';
title "^S={preimage='logo.jpg'}";
ods pdf text="First page with text and a title with an image";
ods pdf startpage=now;
options orientation=landscape;
title "^S={preimage='logo.jpg'}";
ods pdf text="Second page with text and an image ";
ods pdf text="Orientation has changed";
ods pdf close;
/* Workaround */
ods _all_ close;
options orientation=portrait nodate nonumber;
ods pdf file="workaround.pdf" notoc;
ods escapechar='^';
title "^S={preimage='logo.jpg'}";
proc odstext;
p "First page with text and a title with an image";
run;
ods pdf startpage=now;
options orientation=landscape;
title "^S={preimage='logo.jpg'}";
proc odstext ;
p "Second page with text and an image ";
p "Orientation has changed";
run;
ods pdf close;
Type: | Problem Note |
Priority: | high |
Date Modified: | 2015-06-02 15:48:06 |
Date Created: | 2015-05-20 10:40:19 |