Re: [xml] libxml2 : xmlFreeTextReader crashes



On Tue, Feb 22, 2011 at 01:50:55PM +0530, Suneel Mekala wrote:
Dear all,

I am using libxml2 (libxml2-2.7.6-1.fc10.x86_64 )
I get crash when I call xmlFreeTextReader after the XMl file is processed.
*Following is the sample code that I am using:*

xmlTextPointer = xmlReaderForMemory(buffer, strlen(buffer), "somthing.xml",
NULL, 0);
while(errorCode == 1)
  {
    printf("Name : %s\n",xmlTextReaderConstName(xmlTextPointer));
    errorCode = xmlTextReaderRead(xmlTextPointer);
  }
xmlFreeTextReader(xmlTextPointer);


The buffer contains valid XML data, as it parses complete buffer and prints
all the names (nodes)
and when xmlFreeTextReader is called it crashes

  Please provide a fully complete self contained example if you want me to
try to reproduce this. There is so many thing outside of those 6 lines which
are needed to make the program complete that trying to debug based on this
makes it an guessing exercise, not a debugging exercise. Provide a .c
which when compiled and linked shows the crash !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]