[lxml-dev] *** glibc detected *** free(): invalid pointer: 0x086449e7 ***
Doug Winter
doug at isotoma.com
Tue Mar 6 10:19:10 CET 2007
Doug Winter wrote:
> Stefan Behnel wrote:
>> Could you check if the problem goes away if you replace the respective copy-of
>> that creates the result set fragment in 'stuff' by something like for-each (or
>> whatever)?
>
> I shall try that now.
Same thing happens with a for-each, again in xmlFreeNodeList :/
However, something that just occurred to me. If I change my class a bit
so that the xsl stylesheet is no longer instantiated as a class-level
attribute, but instead the stylesheet is created within the method call:
def html(self):
xsl = etree.XSLT(etree.parse(open(os.path.join(util.datadir(),
'xsl', 'weather.xsl'))))
doc = etree.fromstring(self.document)
html = xsl(doc)
return unicode(html)
It works ok.
Previously it was like:
xsl = etree.XSLT(etree.parse(open(os.path.join(util.datadir(),
'xsl', 'weather.xsl'))))
def html(self):
doc = etree.fromstring(self.document)
html = self.xsl(doc)
return unicode(html)
I think this must be a multi-threading issue. Does this help?
Cheers,
Doug.
--
Isotoma, Open Source Software Consulting - http://www.isotoma.com
Tel: 01904 567349, Mobile: 07879 423002, Fax: 020 79006980
Postal Address: Tower House, Fishergate, York, YO10 4UA, UK
Registered in England. Company No 5171172. VAT GB843570325.
Registered Office: 19a Goodge Street, London, W1T 2PH
More information about the lxml-dev
mailing list