Skip to main content

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.

 

 

 

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.

 

 

 

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.