This project is read-only.

System.ArgumentException Message="Assertion failed." Source="DynamicDataDisplay"

Jan 10, 2010 at 8:28 PM

Hi - any thoughts on how I can trace the cause of the following exception?  Not sure why this is happening... 

 

 

System.Reflection.TargetInvocationException was unhandled
  Message="Exception has been thrown by the target of an invocation."
  Source="mscorlib"
  StackTrace:
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Delegate.DynamicInvokeImpl(Object[] args)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at RunStatsApp.App.Main() in C:\dev\wrkspc\software\dotnet\PacBio\WPF\Charting\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.ArgumentException
       Message="Assertion failed."
       Source="DynamicDataDisplay"
       StackTrace:
            at Microsoft.Research.DynamicDataDisplay.Common.Auxiliary.DebugVerify.Is(Boolean condition)
            at Microsoft.Research.DynamicDataDisplay.Charts.NumericTicksProvider.CreateTicks(Double start, Double finish, Double step)
            at Microsoft.Research.DynamicDataDisplay.Charts.NumericTicksProvider.GetTicks(Range`1 range, Int32 ticksCount)
            at Microsoft.Research.DynamicDataDisplay.Charts.AxisControl`1.CreateTicks()
            at Microsoft.Research.DynamicDataDisplay.Charts.AxisControl`1.UpdateUI()
            at Microsoft.Research.DynamicDataDisplay.Charts.AxisControl`1.UpdateRegionHolder`1.Dispose()
            at Microsoft.Research.DynamicDataDisplay.Charts.AxisBase`1.OnViewportPropertyChanged(Object sender, ExtendedPropertyChangedEventArgs e)
            at Microsoft.Research.DynamicDataDisplay.Charts.AxisBase`1.b__1()
       InnerException: 

 

 

Jan 10, 2010 at 10:16 PM

Hi,

There are two DebugVerify.Is assertions in NumericTicksProvider.CreateTicks: either your step is zero, or there are more than 2000 ticks to create. You may start with investigation of your start/finish/step values for the axis.

Best regards!

BB

Jan 12, 2010 at 12:15 AM

It was a zero.  Caused by a race condition occurring in certain case where I was building my chart in a background thread and doing stuff I shouldn't before the chart was ready.

Thanks for the pointer!