SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
Null pointer exception in one of your libraries.
DoubleRange dtest = new DoubleRange(0.2, 0.2);
//sciChartSurface.YAxis.GrowBy = new DoubleRange(0.2, 0.2);
sciChartSurface.YAxis.GrowBy = dtest;
Using simple line chart demo
Builds without errors.
dtest object is valid (checked at breakpoint
When growby functions called received null pointer exception
log below comes from output window VS2015
Help!
Hello World!
Instantiating SciChartSurface
SciChartSurface.IsSuspended=true. Ignoring InvalidateElement() call
SciChartSurface.IsSuspended=true. Ignoring InvalidateElement() call
SciChartSurface.IsSuspended=true. Ignoring InvalidateElement() call
‘SciChartDemo.vshost.exe’ (CLR v4.0.30319: SciChartDemo.vshost.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.Aero2\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.Aero2.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
SciChartSurface.IsSuspended=true. Ignoring InvalidateElement() call
SciChartSurface.IsSuspended=true. Ignoring InvalidateElement() call
SciChartSurface.IsSuspended=true. Ignoring InvalidateElement() call
SciChartSurface.IsSuspended=true. Ignoring InvalidateElement() call
SciChartSurface.IsSuspended=true. Ignoring InvalidateElement() call
OnApplyTemplate
SciChartSurface.IsSuspended=true. Ignoring InvalidateElement() call
SciChartSurface.IsSuspended=true. Ignoring InvalidateElement() call
‘SciChartDemo.vshost.exe’ (CLR v4.0.30319: SciChartDemo.vshost.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework-SystemXml\v4.0_4.0.0.0__b77a5c561934e089\PresentationFramework-SystemXml.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
SciChartSurface Resized: x=510.4 y=312.8
Publishing SciChartResizedMessage, Sender=SciChartSurface
SciChartSurface.IsSuspended=true. Ignoring InvalidateElement() call
Publishing RenderSurfaceResizedMessage, Sender=HighSpeedRenderSurface
SciChartSurface.IsSuspended=true. Ignoring InvalidateElement() call
Publishing RenderSurfaceResizedMessage, Sender=HighSpeedRenderSurface
‘SciChartDemo.vshost.exe’ (CLR v4.0.30319: SciChartDemo.vshost.exe): Loaded ‘C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CLIENTDIAGNOSTICS\XAMLDIAGNOSTICS\x64\WpfXamlDiagnosticsTap.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘SciChartDemo.vshost.exe’ (CLR v4.0.30319: SciChartDemo.vshost.exe): Loaded ‘C:\WINDOWS\assembly\GAC\Microsoft.VisualStudio.OLE.Interop\7.1.40304.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.OLE.Interop.dll’. Module was built without symbols.
‘SciChartDemo.vshost.exe’ (CLR v4.0.30319: SciChartDemo.vshost.exe): Loaded ‘C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\UIAutomationTypes\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationTypes.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
The program ‘[13008] SciChartDemo.vshost.exe’ has exited with code -1 (0xffffffff).
Hi there,
Which object is null? Do you have a stack trace?
From the code you’ve shared, the only candidates are SciChartSurface, or YAxis being null. If it’s YAxis, please ensure you create a new YAxis e.g. SciChartSurface.YAxis = new NumericAxis().
Best regards,
Andrew
Please login first to submit.