Bug Report T294552
Visible to All Users

Crosshair - Unhandled error when displaying the crosshair panel in certain situations

created 9 years ago

Version 1.7 created an issue for me with the charts.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at DevExpress.XtraCharts.Native.CrosshairDrawInfo.CreateCrosshairLabelElement(CrosshairSeriesTextEx crosshairText, TextAnnotationAppearance appearence, CrosshairOptions crosshairOptions, CrosshairSeriesPointEx crosshairPoint)
   at DevExpress.XtraCharts.Native.CrosshairDrawInfo.FillPointDrawInfos(CrosshairPaneInfoEx crosshairInfo, CrosshairOptions crosshairOptions, TextAnnotationAppearance appearence)
   at DevExpress.XtraCharts.Native.CrosshairDrawInfo…ctor(CrosshairPaneInfoEx crosshairInfo, CrosshairOptions crosshairOptions, TextAnnotationAppearance appearence)
   at DevExpress.XtraCharts.Native.CrosshairPaneViewData…ctor(CrosshairPaneInfoEx crosshairPaneInfo, CrosshairSeriesLabel crosshairSeriesLabel, TextMeasurer textMeasurer, CrosshairOptions crosshairOptions, List`1 highlightedPointsInfo)
   at DevExpress.XtraCharts.Native.CrosshairPaneViewDataFactory.ProcessCrosshairInfoEx(CrosshairInfoEx crosshairInfos, List`1 highlightedPointsInfo, Boolean useCommonSeriesLabel)
   at DevExpress.XtraCharts.XYDiagram2D.CalculateCrosshairViewData(IList`1 series)
   at DevExpress.XtraCharts.Native.Chart.DrawCachedContent2D(INativeGraphics gr, Rectangle bounds)
   at DevExpress.XtraCharts.Native.Chart.DrawContent2D(INativeGraphics gr, Rectangle bounds, Boolean useImageCache)
   at DevExpress.XtraCharts.Native.Chart.DrawContent(Graphics graphics, INativeGraphics gr, Rectangle bounds, Boolean lockDrawingHelper, Boolean useImageCache)
   at DevExpress.XtraCharts.Native.Chart.DrawContent(Graphics gr, Rectangle bounds, Boolean useImageCache)
   at DevExpress.XtraCharts.ChartControl.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at DevExpress.XtraCharts.ChartControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I am getting this exception when I hover over the chart.

Thanks in advance.

Show previous comments (1)
CH CH
Christopher Herrington 9 years ago

    I did not get this on version 1.6 it started on 1.7.  It only happens on some computers not all.  It has to do when the legend is drawn as you move the mouse over a bar graph.  I am afraid you won't be able to reproduce it easily.  I have several machines it works on and a handful that it doesn't work on.

    CH CH
    Christopher Herrington 9 years ago

      I am able to reproduce it.  I have to be able to set some of the bar items to 0.  It will not allow me to do that. Here is a sample

      DevExpress Support Team 9 years ago

        Special thanks for posting your sample project. We will examine this behavior in greater detail and check for a suitable solution. Your patience is appreciated.

        Answers approved by DevExpress Support

        created 9 years ago

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.