It does seem like a bug. I found a way around it, and also confirmed that it still exists in the latest sources (Friday's)
I went ahead and opened a ticket: http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=18345 -Dan On Fri, Sep 5, 2008 at 7:44 PM, Dino Viehland <[EMAIL PROTECTED]> wrote: > I'm pretty sure this is a bug... Tomas stumbled across something like this > recently too. > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Eloff > Sent: Friday, September 05, 2008 4:59 PM > To: Discussion of IronPython > Subject: [IronPython] Possible regression in IronPython pre b5 to do with > delegates > > Could someone please check if this is indeed a regression in the > current IronPython sources? I'm using the sdlsdk version. > > TypeError: Value cannot be null. > Parameter name: context > > Caused by: > > req.BeginGetResponse(self.handle_response, (req, success, failure)) > > Simply changing this to: "lambda r: self.handle_response" is enough to > get past it (no idea yet it it runs fine, but it should.) > > Full traceback follows: > > at Microsoft.Scripting.Utils.ContractUtils.RequiresNotNull(Object > value, String paramName) > at Microsoft.Scripting.Runtime.BinderOps.GetDelegate(CodeContext > context, Object callableObject, Type delegateType) > at _stub_$921##366(Closure , CallSite , Method ) > at System.Scripting.Actions.MatchCaller.Call1[T0,TRet](Func`3 > target, CallSite site, Object[] args) > at System.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args) > at System.Scripting.Actions.UpdateDelegates.Update1[T,T0,TRet](CallSite > site, T0 arg0) > at _stub_$920##365(Closure , CallSite , CodeContext , Object , > Object , PythonTuple ) > at System.Scripting.Actions.MatchCaller.Call4[T0,T1,T2,T3,TRet](Func`6 > target, CallSite site, Object[] args) > at System.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args) > at > System.Scripting.Actions.UpdateDelegates.Update4[T,T0,T1,T2,T3,TRet](CallSite > site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) > at S$13.Request$377(Closure , Object self, Object uri, Object > success, Object failure, Object data) > at _stub_$866##311(Closure , CallSite , CodeContext , Object , > Object , String , Object ) > at System.Scripting.Actions.MatchCaller.Call5[T0,T1,T2,T3,T4,TRet](Func`7 > target, CallSite site, Object[] args) > at System.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args) > at > System.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_$865##310(Closure , CallSite , CodeContext , Object , > String , Object ) > at System.Scripting.Actions.MatchCaller.Call4[T0,T1,T2,T3,TRet](Func`6 > target, CallSite site, Object[] args) > at System.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args) > at > System.Scripting.Actions.UpdateDelegates.Update4[T,T0,T1,T2,T3,TRet](CallSite > site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) > at S$36.Load$848(Closure , Object self) > at _stub_$174##43(Closure , CallSite , CodeContext , Object , Object ) > at _stub_$173##42(Closure , CallSite , CodeContext , Object ) > at System.Scripting.Actions.MatchCaller.Call2[T0,T1,TRet](Func`4 > target, CallSite site, Object[] args) > at System.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args) > at System.Scripting.Actions.UpdateDelegates.Update2[T,T0,T1,TRet](CallSite > site, T0 arg0, T1 arg1) > at S$9.Initialize(Scope $scope, LanguageContext $language) > at > Microsoft.Scripting.Runtime.OptimizedScriptCode.InvokeTarget(LambdaExpression > code, Scope scope) > at Microsoft.Scripting.ScriptCode.Run(Scope scope) > at IronPython.Runtime.PythonContext.CreateModule(String fileName, > Scope scope, ScriptCode scriptCode, ModuleOptions options) > at IronPython.Runtime.PythonContext.CompileModule(String fileName, > String moduleName, SourceUnit sourceCode, ModuleOptions options, > ScriptCode& scriptCode) > at IronPython.Runtime.PythonContext.CompileModule(String fileName, > String moduleName, SourceUnit sourceCode, ModuleOptions options) > at IronPython.Runtime.Importer.LoadFromSourceUnit(CodeContext > context, SourceUnit sourceCode, String name, String path) > at IronPython.Runtime.Importer.LoadModuleFromSource(CodeContext > context, String name, String path) > at IronPython.Runtime.Importer.LoadPackageFromSource(CodeContext > context, String name, String path) > at IronPython.Runtime.Importer.ImportFromPath(CodeContext context, > String name, String fullName, List path) > at IronPython.Runtime.Importer.ImportTopAbsolute(CodeContext > context, String name) > at IronPython.Runtime.Importer.ImportModule(CodeContext context, > Object globals, String modName, Boolean bottom, Int32 level) > at IronPython.Runtime.Builtin.__import__(CodeContext context, > String name, Object globals, Object locals, Object fromlist, Int32 > level) > at IronPython.Runtime.Builtin.__import__(CodeContext context, > String name, Object globals, Object locals, Object fromlist) > at _stub_$12##2(Closure , CallSite , CodeContext , Object , String > , IAttributesCollection , IAttributesCollection , PythonTuple ) > at IronPython.Runtime.Importer.Import(CodeContext context, String > fullName, PythonTuple from, Int32 level) > at IronPython.Runtime.Operations.PythonOps.ImportTop(CodeContext > context, String fullName, Int32 level) > at S$1.startup$10() > at _stub_$297##139(Closure , CallSite , CodeContext , Object ) > at System.Scripting.Actions.MatchCaller.Call2[T0,T1,TRet](Func`4 > target, CallSite site, Object[] args) > at System.Scripting.Actions.CallSite`1.UpdateAndExecute(Object[] args) > at System.Scripting.Actions.UpdateDelegates.Update2[T,T0,T1,TRet](CallSite > site, T0 arg0, T1 arg1) > at S$1.Initialize(Scope $scope, LanguageContext $language) > at > Microsoft.Scripting.Runtime.OptimizedScriptCode.InvokeTarget(LambdaExpression > code, Scope scope) > at Microsoft.Scripting.ScriptCode.Run(Scope scope) > at Microsoft.Scripting.Hosting.CompiledCode.Execute() > at Microsoft.Scripting.Silverlight.DynamicApplication.StartMainProgram() > at > Microsoft.Scripting.Silverlight.DynamicApplication.DynamicApplication_Startup(Object > sender, StartupEventArgs e) > 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 > [email protected] > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > Users mailing list > [email protected] > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ Users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
