Highlighted
Trusted Contributor.
Trusted Contributor.
328 views

memory access violation on printing a file

Jump to solution

Hi all,

we have occasionally a "memory access violation" message in a client's computer when sending a file for printing. File is a retail shop invoice sent to a small thermal printer.

code is the following:


SELECT PRINT-FILE ASSIGN TO WS-PRN-NAME
FILE STATUS IS STATUS-PRINT.

...

FD PRINT-FILE
LABEL RECORD IS OMITTED.
01 PRINT-REC PIC X(132).

We call the win$printer routine, set the printer name and move "-P SPOOLER-DIRECT" to WS-PRN-NAME

 

Then:

OPEN OUTPUT PRINT-FILE

WRITE PRINT-REC FROM DATA-ITEMS AFTER ADVANCING 1

WRITE PRINT-REC FROM DATA-ITEMS AFTER ADVANCING 1

...

CLOSE PRINT-FILE

 

We are getting the "memory access violation" message on the close print-file command.

This happens once or twice a day, but not every day.

Exact message is : "Memory access violation on 001FA5"

With the help of debugger:

001F9C    CONTINUE
001F9F    CLOSE PRINT-FILE
001FAA    CONTINUE

Version is 10.1.1

 

Thanks in advance.

 

 

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: memory access violation on printing a file

Jump to solution

I believe there is a fix for this

SUBJECT: Random crash on CLOSE of a DIRECT-SPOOLER print file
Change Number: ECN-4504

 

Contact Customer Care and see if you can get that fix patched into your version.

View solution in original post

0 Likes
1 Reply
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: memory access violation on printing a file

Jump to solution

I believe there is a fix for this

SUBJECT: Random crash on CLOSE of a DIRECT-SPOOLER print file
Change Number: ECN-4504

 

Contact Customer Care and see if you can get that fix patched into your version.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.