While zooming in and out inside an instance of a GoView
derivate by pressing the Control key and turning the
mousewheel very rarely we get an exception like the
following.
It is hard to reproduce. What could be the reason?
It seems to be an access to a GoView instance from a
timer event.
We are instantiating several GoView derivations
called FunctionBlockEditorView in our graphical
editor implemented with the Northwoods Go library
one after another. That means the user sees only one
instance at the same time. When switching to another
View the complete FunctionBlockEditorView is newly
instantiated and the old instance is diposed each time.
Could be the reason that an internal delegate method is
not accessing the right FunctionBlockEditorView instance?
Or a timer controlled delegate of an old FunctionBlockEditorView
instance is still active after disposing the view?
Tobias.
13.01.2009 10:38:43 - called from [CurrentDomain.UnhandledException]
Type of Exception:
System.ObjectDisposedException
Message:
HRESULT = 0x80131622
LastWin32Error = 0x0
Auf das verworfene Objekt kann nicht zugegriffen werden. (Dismissed object cannot be accessed.)
Objektname: FunctionBlockEditorView.
Source:
System.Windows.Forms
Methode:
System.Object MarshaledInvoke(System.Windows.Forms.Control, System.Delegate, System.Object[], Boolean)
StackTrace (from exception):
bei System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
bei System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
bei System.Windows.Forms.Control.Invoke(Delegate method)
bei Northwoods.Go.GoView.hoverCallback(Object obj)
bei System.Threading._TimerCallback.TimerCallback_Context(Object state)
bei System.Threading.ExecutionContext.runTryCode(Object userData)
bei System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading._TimerCallback.PerformTimerCallback(Object state)
StackTrace (from System.Environment.StackTrace):
bei System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
bei System.Environment.get_StackTrace()
bei AutomationSuite.Application.Start.GetDetailExceptionInfo(Exception e, String caller)
bei AutomationSuite.Application.Start.CurrentDomain_UnhandledException(Object sender, UnhandledExceptionEventArgs e)
bei System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
bei System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
bei System.Windows.Forms.Control.Invoke(Delegate method)
bei Northwoods.Go.GoView.hoverCallback(Object obj)
bei System.Threading._TimerCallback.TimerCallback_Context(Object state)
bei System.Threading.ExecutionContext.runTryCode(Object userData)
bei System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading._TimerCallback.PerformTimerCallback(Object state)