Skip to Main Content

DevOps, CI/CD and Automation

XmlSaveDom fails with XMLERR_SAVE_OVERFLOW

smagalSep 29 2015 — edited Oct 1 2015


This issue is still reproducible using Oracle database version 
The OCI application is linked with OCI, XML client libraries distributed with

Oracle Client is installed on the Client machine and the connection is to an Oracle instance.

Calls to XmlSaveDom() with a valid destination buffer - randomly fail with XMLERR_SAVE_OVERFLOW.

The connection is using Unicode mode. Not using Unicode mode is not an option.

There are references to Unix, Big-endian platforms in Doc ID 1331104.1, BUG:10388142

However, the issue is reproducible using Windows, Little-endian platforms as well.

Following is the workflow that fails:

1) XmlSaveDom() is first called with a NULL destination buffer - to   obtain the document size.

2) Based on the doc_size returned in the 1st call, an output buffer is allocated

3) XmlSaveDom() is called again to serialize the xmlnode to the destination buffer, specifying the buffer allocated in Step 2

The 2nd call to XMLSaveDom then fails with XMLERR_SAVE_OVERFLOW (20),   returning an empty output buffer and doc_size = 0 bytes.

This failure occurs randomly, i.e. the workflow enumerated above works several times before failing as described.

Post Details
Locked on Oct 27 2015
Added on Sep 29 2015