MMCCPaulEden Posted May 23, 2008 Report Share Posted May 23, 2008 Hi Using DLLs versioned as above, project fails to compile after setting the Chart.ItemsSource property with the follwoing exception: System.NullReferenceException was unhandled Message="Object reference not set to an instance of an object." Source="ChartFX.WPF" StackTrace: at ChartFX.WPF.DataValues.a(ColumnGetter[] A_0, Object A_1, Boolean A_2, Int32 A_3, Boolean A_4, IList`1 A_5, ColumnGetter& A_6, ColumnGetter& A_7, ColumnGetter& A_8) at ChartFX.WPF.DataValues.a(IList`1 A_0, IEnumerable A_1, Int32 A_2, Boolean A_3) at ChartFX.WPF.DataValues.a(b1 A_0, Boolean A_1) at ChartFX.WPF.Chart.ax() at ChartFX.WPF.Chart.a(Object A_0, RoutedEventArgs A_1) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e) at MS.Internal.FrameworkObject.OnLoaded(RoutedEventArgs args) at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent) at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root) at MS.Internal.LoadedOrUnloadedOperation.DoWork() at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks() 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.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget) at System.Windows.Interop.HwndTarget.OnResize() at System.Windows.Interop.HwndTarget.HandleMessage(Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(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.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.ShowWindow(HandleRef hWnd, Int32 nCmdShow) at System.Windows.Window.ShowHelper(Object booleanBox) 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.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.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.RunInternal(Window window) at System.Windows.Application.Run(Window window) at System.Windows.Application.Run() at ChartFxTest.App.Main() in C:\Users\Neutrino_1\Documents\Expression\Expression Blend Projects\ChartFxTest\ChartFxTest\obj\Debug\App.g.vb:line 61 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: Project attached for reference - can anyone confirm / duplicate this?. Many thanks Paul Quote Link to comment Share on other sites More sharing options...
JuanC Posted May 23, 2008 Report Share Posted May 23, 2008 We were able to duplicate and fix the NullReferenceException but note that in the sample you are providing an array of strings so there is nothing to be plotted. Regards, JuanC Quote Link to comment Share on other sites More sharing options...
MMCCPaulEden Posted May 23, 2008 Author Report Share Posted May 23, 2008 hi Thanks for the very quick feedback. One thing to note though, in the previous version I had when such a list was passed to the chart, it would plot (in my case a bar) based on the lengths of the strings. Many thanks Paul Quote Link to comment Share on other sites More sharing options...
JuanC Posted May 23, 2008 Report Share Posted May 23, 2008 We did change some of the code we use to detect the properties to be plotted. Have you tried passing a collection of numbers or a collection of CLR objects? Regards, JuanC Quote Link to comment Share on other sites More sharing options...
MMCCPaulEden Posted May 23, 2008 Author Report Share Posted May 23, 2008 I will have a go, though at present the actual data on the chart is not important. When will the latest buld be available? I don't want to contact the wpf email address and end up getting the same version again. Thanks Paul Quote Link to comment Share on other sites More sharing options...
JuanC Posted May 23, 2008 Report Share Posted May 23, 2008 >> though at present the actual data on the chart is not important If the actual data is not important then I would recommend instead of assigning ItemsSource you use Chart.Data.Series and Chart.Data.Points to force a particular shape of random data. Regards, JuanC Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.