Re: [xml] New problems after register memory management routines



On Thu, Oct 18, 2001 at 02:01:36PM +0200, Henke, Markus wrote:
  xmlInitParser();
  xmlMemSetup(freeFunc, mallocFunc, reallocFunc, strdupFunc);

[...]

  xmlFreeParserCtxt(ctxt);
  xmlCleanupParser();   <- Assertion failed: pbi != NULL
  ...

I've debbuged it to a point where
  xmlCleanupCharEncodingHandlers()
calls
  xmlFree(handlers[nbCharEncodingHandler]->name),
which causes the assertion to fail.
handlers[nbCharEncodingHandler]->name is "HTML" at this point (WTHDTM...).
So, i'm stuck again...

  And you find this surprizing ????

xmlInitParser() is allocating memory of course !
And you're trying to free it with a different routine.

  If you remap the memory routine this must be done before any other
libxml or libxslt call of course. This is common sense, no ?

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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