[IronPython] Silverlight wierdness with __slots__

Jimmy Schementi Jimmy.Schementi at microsoft.com
Wed Jul 9 07:09:01 CEST 2008


Yes you are :) I'll give this a try at repoing, and let you know what I find.

~js
________________________________________
From: users-bounces at lists.ironpython.com [users-bounces at lists.ironpython.com] On Behalf Of Dan Eloff [dan.eloff at gmail.com]
Sent: Tuesday, July 08, 2008 9:34 PM
To: Discussion of IronPython
Subject: [IronPython] Silverlight wierdness with __slots__

Looks like I've been making work for you folks tonight :(

I seem to have encountered some trouble with slots, but the very
strange thing is, it only seems to happen in silverlight. I run over
this code a lot in my test suite, and it passes (running with wpf.) If
I comment out the __slots__ = ('blocks',) it works. Any idea if I'm
doing something wrong or if it's a problem in IronPython?

I thought perhaps I'm mixing assemblies by mistake, but I copied all
IronPython 2.0b3 .dlls from the silverlight folder, right into my .xap

Here's the traceback. Code for the offending class hierarchy is
available if it will be helpful.

I'm trying to figure out why I'm having so many issues I never see
outside of silverlight.

-Dan

SystemError: Ambiguous match found.
beskar\tags.py
Line 97:
Line 98:     def __init__(self):
Line 99:         self.blocks = [] # stack
Line 100:
Line 101:     def data(self, compiler, code):

SystemError
at __init__ in beskar\tags.py, line 99
at StartElementHandler in beskar\parser.py, line 53
at _StartElementHandler in beskar\xml.py, line 51
at Parse in beskar\xml.py, line 38
at parse in beskar\parser.py, line 37
at load in beskar\parser.py, line 27
at load in beskar\loader.py, line 18
at load in game\templates\__init__.py, line 8
at load_xaml in game\templates\__init__.py, line 11
at bug in game\__init__.py, line 27
at global_hotkeys in game\hotkeys.py, line 19
CLR Stack Trace:
   at System.RuntimeType.GetPropertyImpl(String name, BindingFlags
bindingAttr, Binder binder, Type returnType, Type[] types,
ParameterModifier[] modifiers)
   at System.Type.GetProperty(String name)
   at IronPython.Runtime.Types.ReflectedSlotProperty.CreateSetter()
   at IronPython.Runtime.Types.ReflectedSlotProperty.EnsureSetter(SlotValue
value)
   at IronPython.Runtime.Types.ReflectedSlotProperty.get_SetterMethod()
   at IronPython.Runtime.Operations.UserTypeOps.MakeSlotsSetTarget[T](CodeContext
context, RuleBuilder`1 rule, ReflectedSlotProperty rsp, Expression
value)
   at IronPython.Runtime.Operations.UserTypeOps.MakeSlotsSetTarget[T](CodeContext
context, RuleBuilder`1 rule, ReflectedSlotProperty rsp)
   at IronPython.Runtime.Operations.UserTypeOps.MakeSetMemberRule[T](CodeContext
context, SetMemberAction action, Object[] args)
   at IronPython.Runtime.Operations.UserTypeOps.GetRuleHelper[T](DynamicAction
action, CodeContext context, Object[] args)
   at IronPython.NewTypes.System.Object_6$6.GetRule[T](DynamicAction ,
CodeContext , Object[] )
   at IronPython.Runtime.Calls.PythonBinder.MakeRule[T](DynamicAction
action, Object[] args)
   at Microsoft.Scripting.Actions.ActionBinder.Bind[T](DynamicAction
action, Object[] args)
   at Microsoft.Scripting.Actions.MemberAction.Bind[T](Object[] args)
   at Microsoft.Scripting.Actions.CallSite`1.CreateNewRule(Rule`1
originalMonomorphicRule, Object[] args)
   at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
   at Microsoft.Scripting.Actions.UpdateDelegates.Update3[T,T0,T1,T2,TRet](CallSite
site, T0 arg0, T1 arg1, T2 arg2)
   at S$41.__init__$1355(Closure , Object self)
   at _stub_$3420##2008(Closure , CallSite , CodeContext , Object , Object )
   at _stub_$749##498(Closure , CallSite , CodeContext , Object )
   at _stub_MatchCaller(Object , CallSite , Object[] )
   at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
   at Microsoft.Scripting.Actions.UpdateDelegates.Update2[T,T0,T1,TRet](CallSite
site, T0 arg0, T1 arg1)
   at _stub_$3820##2408(Closure , CallSite , CodeContext , Object )
   at _stub_MatchCaller(Object , CallSite , Object[] )
   at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
   at Microsoft.Scripting.Actions.UpdateDelegates.Update2[T,T0,T1,TRet](CallSite
site, T0 arg0, T1 arg1)
   at S$40.StartElementHandler$1324(Closure , Object self, Object
name, Object attrs)
   at _stub_$3784##2372(Closure , CallSite , CodeContext , Object ,
Object , Object , Object )
   at _stub_$3783##2371(Closure , CallSite , CodeContext , Object ,
Object , Object )
   at S$35._StartElementHandler$1200(Closure , Object self, Object r)
   at _stub_$3764##2352(Closure , CallSite , CodeContext , Object ,
Object , Object )
   at _stub_$3763##2351(Closure , CallSite , CodeContext , Object , Object )
   at S$35.Parse$1199(Closure , Object self, Object data)
   at _stub_$3025##1616(Closure , CallSite , CodeContext , Object ,
Object , Object )
   at _stub_$650##430(Closure , CallSite , CodeContext , Object , Object )
   at _stub_MatchCaller(Object , CallSite , Object[] )
   at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
   at Microsoft.Scripting.Actions.UpdateDelegates.Update3[T,T0,T1,T2,TRet](CallSite
site, T0 arg0, T1 arg1, T2 arg2)
   at S$40.parse$1322(Closure , Object self, Object data, Object name)
   at _stub_$3731##2319(Closure , CallSite , CodeContext , Object ,
Object , Object , Object )
   at _stub_MatchCaller(Object , CallSite , Object[] )
   at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
   at Microsoft.Scripting.Actions.UpdateDelegates.Update5[T,T0,T1,T2,T3,T4,TRet](CallSite
site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
   at _stub_$3730##2318(Closure , CallSite , CodeContext , Object ,
Object , Object )
   at _stub_MatchCaller(Object , CallSite , Object[] )
   at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
   at Microsoft.Scripting.Actions.UpdateDelegates.Update4[T,T0,T1,T2,T3,TRet](CallSite
site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
   at S$40.load$1320(Closure , Object self, Object path, Object context)
   at _stub_$3706##2294(Closure , CallSite , CodeContext , Object ,
Object , Object , Object )
   at _stub_MatchCaller(Object , CallSite , Object[] )
   at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
   at Microsoft.Scripting.Actions.UpdateDelegates.Update5[T,T0,T1,T2,T3,T4,TRet](CallSite
site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
   at _stub_$3705##2293(Closure , CallSite , CodeContext , Object ,
Object , Object )
   at _stub_MatchCaller(Object , CallSite , Object[] )
   at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
   at Microsoft.Scripting.Actions.UpdateDelegates.Update4[T,T0,T1,T2,T3,TRet](CallSite
site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
   at S$42.load$1488(Closure , Object path, Object namespaces)
   at S$42.load$1488(Closure , Object[] )
   at _stub_$3667##2255(Closure , CallSite , CodeContext , Object , Object )
   at _stub_MatchCaller(Object , CallSite , Object[] )
   at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
   at Microsoft.Scripting.Actions.UpdateDelegates.Update3[T,T0,T1,T2,TRet](CallSite
site, T0 arg0, T1 arg1, T2 arg2)
   at S$26.load$909(Closure , Object template)
   at _stub_$1047##540(Closure , CallSite , CodeContext , Object , Object )
   at _stub_MatchCaller(Object , CallSite , Object[] )
   at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
   at Microsoft.Scripting.Actions.UpdateDelegates.Update3[T,T0,T1,T2,TRet](CallSite
site, T0 arg0, T1 arg1, T2 arg2)
   at S$26.load_xaml$910(Closure , Object template, Object namespaces)
   at S$26.load_xaml$910(Closure , Object[] )
   at _stub_$3663##2251(Closure , CallSite , CodeContext , Object ,
String , Object )
   at _stub_MatchCaller(Object , CallSite , Object[] )
   at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
   at Microsoft.Scripting.Actions.UpdateDelegates.Update4[T,T0,T1,T2,T3,TRet](CallSite
site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
   at S$4.bug$384(Closure )
   at _stub_$375##345(Closure , CallSite , CodeContext , Object )
   at _stub_MatchCaller(Object , CallSite , Object[] )
   at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
   at Microsoft.Scripting.Actions.UpdateDelegates.Update2[T,T0,T1,TRet](CallSite
site, T0 arg0, T1 arg1)
   at S$80.global_hotkeys$3314(Closure , Object sender, Object e)
   at _stub_$3653##2241(Closure , CallSite , CodeContext , Object ,
Object , Object )
   at _stub_MatchCaller(Object , CallSite , Object[] )
   at Microsoft.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args)
   at Microsoft.Scripting.Actions.UpdateDelegates.Update4[T,T0,T1,T2,T3,TRet](CallSite
site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
   at System.Void(Object, KeyEventArgs)(Object[] , Object , KeyEventArgs )
   at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32
typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr
unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




More information about the Ironpython-users mailing list