Page 1 of 1

Object reference not set to an instance of an object.

Posted: Tue Dec 27, 2011 11:59 am
by 6920463
Hi,

i get "Object reference not set to an instance of an object" exception in WPF Tee Chart.
The exception is thrown on the line "Application.Run()".
What can i do?

Here is the stack trace:

at Steema.TeeChart.WPF.Drawing.ChartBrush.SetDrawingBrush()
at Steema.TeeChart.WPF.Drawing.ChartBrush.get_DrawingBrush()
at Steema.TeeChart.WPF.Drawing.Graphics3DWPF.Rectangle(Rect r)
at Steema.TeeChart.WPF.Drawing.Graphics3D.Rectangle(Double left, Double top, Double right, Double bottom)
at Steema.TeeChart.WPF.Styles.SeriesPointer.Draw(Graphics3D g, Boolean is3D, Double px, Double py, Double tmpHoriz, Double tmpVert, Color colorValue, PointerStyles aStyle)
at Steema.TeeChart.WPF.Styles.SeriesPointer.Draw(Graphics3D g, Boolean is3D, Double px, Double py, Double tmpHoriz, Double tmpVert, Color colorValue, PointerStyles aStyle, BitmapEffectGroup aEffects)
at Steema.TeeChart.WPF.Styles.Gantt.DrawValue(Int32 valueIndex)
at Steema.TeeChart.WPF.Styles.Series.DoDrawIndex(Int32 Index, Boolean CanID)
at Steema.TeeChart.WPF.Styles.Series.Draw()
at Steema.TeeChart.WPF.Styles.Series.DrawSeries()
at Steema.TeeChart.WPF.Chart.DrawAllSeries(Graphics3D g)
at Steema.TeeChart.WPF.Chart.InternalDraw(DrawingContext g, Boolean noTools)
at Steema.TeeChart.WPF.Chart.InternalDraw(DrawingContext g)
at Steema.TeeChart.WPF.TChart.Draw(DrawingContext g)
at Steema.TeeChart.WPF.TChart.OnRender(DrawingContext drawingContext)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, 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, Boolean ignoreSyncCtx)
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, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run()

Re: Object reference not set to an instance of an object.

Posted: Tue Dec 27, 2011 3:07 pm
by 10050769
Hello MShefi,

Can you arrange a simple project for us, because we can reproduce your problem exactly here and try to solve your problem?

Thanks,