This is a migrated thread and some comments may be shown as answers.

Null reference exception in radchart with camera extension

1 Answer 46 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Hasan Khan
Top achievements
Rank 1
Hasan Khan asked on 18 Jan 2011, 07:43 PM
Hi I'm using the latest 2010 release.
On my window I have a radchart with Pyramid3DSeriesDefinition.
In my code I'm adding the the camera extension but it gives me a null reference exception on runtime.

at Telerik.Windows.Controls.Charting.CameraExtension.CalculatePointProjection(Point point)
at Telerik.Windows.Controls.Charting.CameraExtension.InitialTransformUpdate()
at Telerik.Windows.Controls.Charting.CameraExtension.ChartAreaUpdatedTimerElapsed(Object sender, EventArgs e)
at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
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.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
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.WrappedInvoke(Delegate callback, 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 MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run()


Above mentioned is the stack trace.
Below mentioned is the code that I'm using in the radChart_Loaded event.
var cameraExtension = new CameraExtension();
radChart.DefaultView.ChartArea.Extensions.Add(cameraExtension);







1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 21 Jan 2011, 08:58 AM
Hello Hasan,

Based on the supplied information, it is hard to determine what is causing this unwanted behavior. To properly address the issue, it will be best if you open a formal support ticket, and send us a small working project, demonstrating your logic, and showing the unwanted behavior. We will debug it locally, and advise you further.

Kind regards,
Yavor
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
Chart
Asked by
Hasan Khan
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or