Memory error when copying XSL

Bug #572570 reported by Ben Liles
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Confirmed
Medium
scoder

Bug Description

I am receiving a memory error when attempting to copy xsl. The only change in my code recently is that I'm now using a custom parser that has an additional resolver for resolving package names in includes.

File "/opt/apps/python/2.6/lib/python2.6/copy.py", line 79, in copy
  return copier(x)
File "xslt.pxi", line 456, in lxml.etree.XSLT.__copy__ (src/lxml/lxml.etree.c:109241)
File "xslt.pxi", line 656, in lxml.etree._copyXSLT (src/lxml/lxml.etree.c:110876)

exceptions.MemoryError

Revision history for this message
scoder (scoder) wrote :

Could you provide example code that shows this error? Otherwise, it will be impossible to reproduce and track down.

Revision history for this message
Ben Liles (bliles) wrote :

An example is attached in a gzipped tar file. Unpack and run example/__init__.py with lxml in your system path in addition to the standard python libraries.

Revision history for this message
scoder (scoder) wrote :

It looks like this is hiding a different error that occurs in libxslt while processing a copy of the stylesheet. Sadly, the function that does this in libxslt only returns a single error value, so lxml.etree just guesses that this was due to insufficient memory - apparently an incorrect assumption in this case. I'll have to take a closer look to figure out why an error occurs here.

Changed in lxml:
assignee: nobody → Stefan Behnel (scoder)
importance: Undecided → Medium
milestone: none → 2.3
status: New → Confirmed
scoder (scoder)
Changed in lxml:
milestone: 2.3 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.