error when creating x-document

Oleg Kasatkin

New Member
View attachment create.pView attachment protrace.21924.txtView attachment create.txtVersion: OpenEdge Release 10.1C04
All operation execute by root.


Executable file: "create"
==================================================
#!/bin/bash

cd /opt/catalog

export PROPATH="."
export TERM="AT386"

/usr/dlc/bin/_progres -b -p create.p

==================================================


ABL file: "create.p"
==================================================

DEFINE VARIABLE x-my-doc AS HANDLE.
DEFINE VARIABLE x-my-node AS HANDLE.

CREATE X-DOCUMENT x-my-doc.
CREATE X-NODEREF x-my-node.

x-my-doc:ENCODING = "UTF-8".
x-my-doc:CREATE-NODE(x-my-node, "node", "ELEMENT").
x-my-doc:APPEND-CHILD(x-my-node).
x-my-doc:SAVE("FILE", "./doc.xml").


==================================================


if run ./create from terminal then will be created file doc.xml ok
But
if run from cron will be error:
Protrace file: "protrace.21924"
==================================================
SYSTEM ERROR: Memory violation. (49)
** Save file named core for analysis by Progress Software Corporation. (439)
/opt/catalog/create: line 8: 21924 Quit /usr/dlc/bin/_progres -b -p create.p

==================================================

crontab -e
15 15 * * * /opt/catalog/create



Why?
 
'Memory Violation' (along with 'Bus Error') can mean practically anything including bugs in the runtime and mishandling of routine problems.

Suggestion #1: add 'MESSAGE PROVERSION' or similar to verify that the runtime cron is using is the same as the terminal session.

Suggestion #2: change the output to /tmp or somewhere else guaranteed to be writeable by anyone.
 
Back
Top