Hi Daniel,

Thanks for looking into it. Yes I'm calling the xmlInitParser(); 
module, and I have the same problem with threads=native or threads=no. I have the same bug with/without it.
(NOTE: I have the same crash when I use the xmlBufferEmpty(buf) call.

For the xmlElemDump( filePtr, doc, cur ); // ***** BOMBS ********** call, the file handle looks good, the doc looks good and the cur looks good. I'm lost. Any ideas?
Here is some program source, diagnostic out, and the a list of the MSVC debugger output:
************** source  code *************
         // walk the tree
         // point to the next node
         while ( cur )
         {
            cur = cur->next; // get next record
            fpvTraceprintfT(dTraceBackup,(dvChar *)"writeXMLTestHistoryRecord: walking tree cur VALUE: 0x%X", cur);
            if ( cur != NULL )
            {

               fpvTraceprintfT(dTraceBackup,(dvChar *)"writeXMLTestHistoryRecord: current buf (before node content): 0x%X", buf);

               charPtr = xmlNodeGetContent( cur );
               fpvTraceprintfT(dTraceBackup,(dvChar *)"writeXMLTestHistoryRecord: walking tree char value: %s", charPtr);
               fprintf(filePtr, "NODE NAME:%s   NODE VALUE:%s\n", cur->name, charPtr);
               xmlFree( charPtr );

               fpvTraceprintfT(dTraceBackup,(dvChar *)"writeXMLTestHistoryRecord: current buf (before node dump): 0x%X", buf);

               xmlNodeDump(buf, doc, cur, 0, 0); // note xmlNodeDump returns the number of bytes!
               (const char *)charPtr = xmlBufferContent( buf );   
               fprintf( filePtr, "buf contents: %s\n", charPtr );
               xmlFree( charPtr );
               xmlElemDump( filePtr, doc, cur ); // *** BOMBS **

               fpvTraceprintfT(dTraceBackup,(dvChar *)"writeXMLTestHistoryRecord: current buf (after elem dump): 0x%X", buf);
               //xmlBufferEmpty(buf); // clear buf after use BOMBS!!!!!! BAD BUILD???
            }
         }
**********  SOURCE CODE ENDS **************
**********  TEST FILE OUTPUT **************
(MY TRACE BUF OUTOUT)
08/08/03 14:34:44: writeXMLTestHistoryRecord: walking tree cur VALUE: 0x856920
08/08/03 14:34:44: writeXMLTestHistoryRecord: current buf (before node content): 0x856C68
08/08/03 14:34:44: writeXMLTestHistoryRecord: walking tree char value: 0
08/08/03 14:34:44: writeXMLTestHistoryRecord: current buf (before node dump): 0x856C68
(MY TRACE BUF ENDS)
(MY FILE OTHER DIAG FILEIO to filePtr)

WALK XML TREE OUTPUT HERE: 
NODE NAME:RECORDNUMBER   NODE VALUE:0
buf contents: <RECORDNUMBER>0</RECORDNUMBER>

(MY FILE OTHER DIAG FILEIO to filePtr ENDS)



******************* MSVC STACK TRACE *******************
NTDLL! 77f51baa()
NTDLL! 77f7561d()
xmlFileWrite(void * 0x00422d80, const char * 0x008570f0, int 0x0000001e) line 431 + 20 bytes
xmlOutputBufferFlush(_xmlOutputBuffer * 0x00856c98) line 2421 + 31 bytes
xmlOutputBufferClose(_xmlOutputBuffer * 0x00856c98) line 1676 + 9 bytes
xmlElemDump(_iobuf * 0x00422d80, _xmlDoc * 0x00855ca0, _xmlNode * 0x00856920) line 6840 + 9 bytes
SAR! 00407fbe()
******************* MSVC STACK TRACE ENDS *******************
****************** MSVC DEBUG DATA AREA *********************
(NOTE: SHOWS GOOD DATA IN MEMORY)
008570F0  3C 52 45 43 4F 52 44 4E 55 4D 42 45 52 3E 30 3C 2F 52 45 43 4F 52 44 4E 55 4D 42 45 52 3E  <RECORDNUMBER>0</RECORDNUMBER>
0085710E  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ..............................
****************** MSVC DATA AREA ENDS *************************

Any help would be greatly appreciated. If there is anything you would like me to try, please let me  know.
Thanks again, Rusty

