Highlighted
Absent Member.
Absent Member.
410 views

[archive] c$xml - memory access violation with larger xml files

[Migrated content. Thread originally posted on 01 August 2007]

When creating larger xml files with c$xml we become an memory access violation after the add child or add sibbling. When it appears, it appears (in our case) on the first statement after the c$xml call.

in our case :
- There is no specific record where it appears on
- It appears after approximately more than 8000 records depending on the 'record' length.

With 8000 records our xml file is approximately 2.2 mb.
When I split de xml's everything goes right, so it looks no problem with the data I send to the xml file.

Is there anyone who has similar problems, and perhaps someone found a solution for this problem.

Regards,

Ed
0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] c$xml - memory access violation with larger xml files

I would send this to technical support so they can get it fixed.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] c$xml - memory access violation with larger xml files

Looks like I'm experiencing this same problem now. Did you ever get a resolution?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] c$xml - memory access violation with larger xml files

When C$XML is used to create an xml file it builds a complete DOM (document object model) in memory, not simply the lines of the output file. Even though the resulting disk file may only be 2.2 MB it could use up all of the system's memory when building the DOM.

I've done some extensive testing on this and found that C$XML can produce a memory access violation when it has used up the RAM and the Virtual Memory is configured to be small. Increasing the disk's pagefile to the maximum successfully avoided the MAV for me (but it still ran very slowly).

If you are running on Windows you may be able to avoid the MAV by configuring Virtual Memory. The Internet has a lot of postings about how to optimize the Windows pagefile.

The bottom line is that if you must create large xml files you should use AcuXML (if it is simple record-based xml), or code your own routines to string the xml tags and data together then write to a line sequential file.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] c$xml - memory access violation with larger xml files

Thanks, Doug. I was going to chime in here, but you beat me to it.
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.