1

Closed

Autofac Resolve bug in 1.0.1.28353

description

Hi, if I add and remove curves on the fly, I get the following exception:

System.ObjectDisposedException: Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it has already been disposed.
bei Autofac.Core.Lifetime.LifetimeScope.CheckNotDisposed()
bei Autofac.Core.Lifetime.LifetimeScope.BeginLifetimeScope(Object tag, Action1 configurationAction)
bei Autofac.Core.Lifetime.LifetimeScope.BeginLifetimeScope(Action
1 configurationAction)
bei TechNewLogic.GraphIT.Hv.TimeDoubleCurveFactory.CreateCurve(String uom, Double lowerBound, Double upperBound, Color color, RedrawTime redrawTime, CurveDrawingMode curveDrawingMode, IValueFormater valueFormater, IValueFetchStrategy valueFetchStrategy, AxisFormat axisFormat, Int32 maxNumOfEntries)
bei TechNewLogic.GraphIT.Hv.TimeDoublePlottingSystem.AddCurve(String uom, Double lowerBound, Double upperBound, Color color, RedrawTime redrawTime, AxisMatchingMode autoGroupBehavior, CurveDrawingMode curveDrawingMode, IValueFormater valueFormater, IValueFetchStrategy valueFetchStrategy, AxisFormat axisFormat, Int32 maxNumOfEntries)
bei DP.Raptor.RichClient.ViewModels.FligtTelemetryViewModel.AddCurve(IList`1 entries) in c:\DEV\DP\Raptor\Windows\ViewModels\FligtTelemetryViewModel.cs:Zeile 228.
bei DP.Raptor.RichClient.ViewModels.FligtTelemetryViewModel.AddOrRemoveSensorToChart(SensorViewModel sensor) in c:\DEV\DP\Raptor\Windows\ViewModels\FligtTelemetryViewModel.cs:Zeile 146.
bei DP.Raptor.RichClient.Commands.SetTelemetrySlotChartVisibilityCommand.Execute(Object parameter) in c:\DEV\DP\Raptor\Windows\Commands\SetTelemetrySlotChartVisibilityCommand.cs:Zeile 30.
bei MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
bei System.Windows.Controls.Primitives.ButtonBase.OnClick()
bei System.Windows.Controls.Primitives.ToggleButton.OnClick()
bei System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
bei System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
bei System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
bei System.Windows.Input.InputManager.ProcessStagingArea()
bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
bei System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
bei System.Windows.Threading.Dispatcher.Run()
bei System.Windows.Application.RunDispatcher(Object ignore)
bei System.Windows.Application.RunInternal(Window window)
bei System.Windows.Application.Run(Window window)
bei System.Windows.Application.Run()
bei DP.Raptor.RichClient.App.Main() in c:\DEV\DP\Raptor\Windows\obj\Debug\App.g.cs:Zeile 0.
bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
bei System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
bei System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
bei System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
bei System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
bei System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
bei System.Activator.CreateInstance(ActivationContext activationContext)
bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()
Closed Dec 5, 2013 at 6:49 AM by RonaldSchlenker
was not an issue

comments

uTILLIty wrote Dec 4, 2013 at 3:18 PM

seems to be a bug when switching between windows. not sure on which side (mine, WPF or Curve). Will investigate and let you know.

uTILLIty wrote Dec 4, 2013 at 3:22 PM

found the bug. had a static command, which "cached" the first model and view. not a bug on your side, sorry. Please close ticket.

RonaldSchlenker wrote Dec 5, 2013 at 6:48 AM

Ok. Thanks anyway for reporting and thanks for the review! I try to check on some of your feature requests these days...

wrote Dec 5, 2013 at 6:49 AM