[IronPython] TypeLoadExceptions
Curt Hagenlocher
curt at hagenlocher.org
Tue Jul 8 23:26:59 CEST 2008
Actually, the repro inside IronPython is pretty straightforward. The
following bit of code will do it:
import array
class Array2(array.array):
__slots__ = ['offset']
def __init__(self, typecode, data):
self.offset = 0
a = Array2('b', [3, 6, 7, 11])
I was hoping to repro it from a much smaller C# program though :).
On Tue, Jul 8, 2008 at 11:32 AM, Jeff Hardy <jdhardy at gmail.com> wrote:
> Hopefully there's a workaround of some kind, because it makes
> debugging pretty painful. Good luck finding the root cause. I've only
> been able to hit it in large applications - Django and CherryPy, and
> haven't been able to find a minimal reproduction.
>
> On Mon, Jul 7, 2008 at 5:57 PM, Curt Hagenlocher <curt at hagenlocher.org>
> wrote:
> > On Mon, Jul 7, 2008 at 4:46 PM, Jeff Hardy <jdhardy at gmail.com> wrote:
> >>
> >> On Sun, Jul 6, 2008 at 6:36 AM, Curt Hagenlocher <curt at hagenlocher.org>
> >> wrote:
> >> > Have you gotten this while not running in the debugger?
> >>
> >> Hi Curt,
> >> I've had a chance to try it without the debugger, and I didn't get a
> >> TypeLoadException. I still get some errors, mind you, but they seem to
> >> be known issues (namely #15399, which is supposed to be fixed in
> >> 2.0b4).
> >>
> >> Any idea what this means?
> >
> >
> > It strongly suggests that there's a bug in the managed debugger. It
> seems
> > to be triggered by the use of __slots__. We generate a backing CLR class
> > that's templated for Python classes that contain __slots__, and some of
> > the methods on the class are themselves templated but with a different
> > template argument. You can still debug the code with an unmanaged
> debugger
> > (ie windbg) but it's a significantly less friendly experience.
> >
> > I haven't yet gotten around to reporting this to the managed debug folks,
> or
> > creating a smaller test case.
> >
> > --
> > Curt Hagenlocher
> > curt at hagenlocher.org
> > _______________________________________________
> > Users mailing list
> > Users at lists.ironpython.com
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> >
> >
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080708/6f903506/attachment.html>
More information about the Ironpython-users
mailing list