Re: [xml] strange transformCtxt free-ing problem

On Mon, Jan 15, 2007 at 01:31:55PM +0000, Nic James Ferrier wrote:
Daniel Veillard <veillard redhat com> writes:

Nic said:
 *** glibc detected *** double free or corruption (!prev): 0x081b6300 ***

  But did you update libxslt too and make install for it too ? Please do
he fixed the problems in libxslt not in libxml2,


Yes. It stopped segfaulting. I can't get it to parse the HTML... but
it has stopped segfaulting.

  okay. that's the important point.

shows this for every document I get back that parses:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "";>

Here's the relevant bit of the loader again:

      # The parserContext and resulting document
      parserContext = libxml2.parserCtxt(_obj=pctx)

 what is pctx ??? i find suspicious the fact you could provide a C parser
context here.

      doc = None
      if url == "/one":
          doc = parserContext.htmlCtxtReadFile("file2.html", "UTF8", 1)
          doc = parserContext.ctxtReadDoc("""<document>

  just use htmlReadFile and forget about trying to address directly the
parser context. With python overhead you won't gain anything to create
a separately accessible object. The less you touch things though Python
the better it will be, really. That said HTML parsing works for me when
using htmlReadFile.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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