Hi I'd love to log this as a bug but I can't track down why. This is the code for a ResultFilter with IronRuby MVC
class LightspeedFilter < ResultFilter def on_result_executing(context) # put before result filtering code here end def on_result_executed(context) context.controller.uow_scope.dispose end end I can see that it has a uow_scope instance but as soon as I call dispose on it it fails which didn't use to happen. I can't reproduce the scenario in the console which makes it harder to figure out what is going wrong. I've also tried putting Dispose, dispose(true), Dispose(true) but none of them work. I'm going to pull that code out and replace it with another OR/M. [NullReferenceException: Object reference not set to an instance of an object.] Microsoft.Scripting.Actions.Calls.OverloadResolver.MakeBindingTarget(CandidateSet targetSet) +580 Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) +359 IronRuby.Runtime.Calls.RubyMethodGroupBase.ResolveOverload(MetaObjectBuilder metaBuilder, CallArguments args, String name, IList`1 overloads, SelfCallConvention callConvention, Boolean implicitProtocolConversions, RubyOverloadResolver& resolver) +118 IronRuby.Runtime.Calls.RubyMethodGroupBase.BuildCallNoFlow(MetaObjectBuilder metaBuilder, CallArguments args, String name, IList`1 overloads, SelfCallConvention callConvention, Boolean implicitProtocolConversions) +68 IronRuby.Runtime.Calls.RubyMethodGroupInfo.BuildCallNoFlow(MetaObjectBuilder metaBuilder, CallArguments args, String name) +279 IronRuby.Runtime.Calls.RubyMemberInfo.BuildCall(MetaObjectBuilder metaBuilder, CallArguments args, String name) +42 IronRuby.Runtime.Calls.RubyCallAction.BuildCall(MetaObjectBuilder metaBuilder, String methodName, CallArguments args, Boolean defaultFallback, Boolean callClrMethods) +301 IronRuby.Runtime.Calls.RubyCallAction.Build(MetaObjectBuilder metaBuilder, CallArguments args, Boolean defaultFallback) +56 IronRuby.Runtime.Calls.RubyMetaBinder.Bind(DynamicMetaObject scopeOrContextOrTarget, DynamicMetaObject[] args) +216 System.Dynamic.DynamicMetaObjectBinder.Bind(Object[] args, ReadOnlyCollection`1 parameters, LabelTarget returnLabel) +730 IronRuby.Runtime.Calls.RubyMetaBinder.BindDelegate(CallSite`1 site, Object[] args) +606 IronRuby.Runtime.Calls.RubyCallAction.BindDelegate(CallSite`1 site, Object[] args) +1434 System.Runtime.CompilerServices.CallSiteBinder.BindCore(CallSite`1 site, Object[] args) +130 System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +1195 ℑℜ;on_result_executed;lightspeed_filter.rb;7;71$56.ℑℜ;on_result_executed;lightspeed_filter.rb;7;71(Object #self, Proc #block, Object context) in C:\dev\ironruby_book\Samples\MockChat\MockChat\Filters/lightspeed_filter.rb:9 Microsoft.Scripting.Utils.InvokeHelper`4.Invoke(Object arg0, Object arg1, Object arg2) +374 Microsoft.Scripting.Utils.ReflectedCaller.Invoke(Object[] args) +239 Microsoft.Scripting.Interpreter.CallInstruction.Run(InterpretedFrame frame) +140 Microsoft.Scripting.Interpreter.Interpreter.RunInstructions(InterpretedFrame frame) +90 Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) +104 Microsoft.Scripting.Interpreter.LightLambda.Run4(T0 arg0, T1 arg1, T2 arg2, T3 arg3) +393 IronRuby.Runtime.Calls.InterpretedFuncDispatcher`4.Invoke(CallSite callSite, T0 arg0, T1 arg1, T2 arg2) +580 System.Dynamic.UpdateDelegates.UpdateAndExecute3(CallSite site, T0 arg0, T1 arg1, T2 arg2) +1277 IronRuby.Classes.RubyResultFilter$1.OnResultExecuted(ResultExecutedContext ) +86 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +273 System.Web.Mvc.<>c__DisplayClass13.<InvokeActionResultWithFilters>b__10() +19 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +178 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +399 System.Web.Mvc.Controller.ExecuteCore() +126 IronRuby.Classes.RubyController$2.ExecuteCore() +111 System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +27 System.Web.Mvc.IronRuby.Controllers.RubyController.Execute(RequestContext requestContext) in C:\dev\ironrubymvc\IronRubyMvc\Controllers\RubyController.cs:76 IronRuby.Classes.RubyController$2.Execute(RequestContext ) +120 System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +7 System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +151 System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +57 System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +7 System.Web.Mvc.MvcHttpHandler.VerifyAndProcessRequest(IHttpHandler httpHandler, HttpContextBase httpContext) +61 System.Web.Routing.UrlRoutingHandler.ProcessRequest(HttpContextBase httpContext) +111 System.Web.Routing.UrlRoutingHandler.ProcessRequest(HttpContext httpContext) +40 System.Web.Routing.UrlRoutingHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) +7 ASP.default_aspx.Page_Load(Object sender, EventArgs e) in c:\dev\ironruby_book\Samples\MockChat\MockChat\Default.aspx:13 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero)
_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core