SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

0
0

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).

  • You must to post comments
0
0

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

  • Bill.Johnson
    Color my face red. Missed 3 lines of xaml that defined the YAxis. Added that in and the null pointer exception went away. Thanks.
  • Andrew
    That’s fine! I’m glad it’s not a problem and you are up and running :)
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.