Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object reference not set to an instance of an object. #935

Closed
sigmarsson opened this issue Feb 15, 2023 · 8 comments
Closed

Object reference not set to an instance of an object. #935

sigmarsson opened this issue Feb 15, 2023 · 8 comments
Labels
not verified It is probably an issue, but we have not enough evidence to mark this as a bug. requires more research
Milestone

Comments

@sigmarsson
Copy link

Describe the bug
Several charts employed on a Pivot control and by changing among the pivots several times, this exception was thrown.

To Reproduce
Steps to reproduce the behavior:

    <Pivot>
        <Pivot.RightHeader>

        </Pivot.RightHeader>

        <PivotItem Header="Atmosphere">
            <view:chart/>
        </PivotItem>

        <PivotItem Header="Air Quality Index">
            <view:chart/>
        </PivotItem>

        <PivotItem Header="Total Precipitation">
            <view:chart/>
        </PivotItem>

        <PivotItem Header="Solar Radiation">
            <view:chart/>
        </PivotItem>

    </Pivot>

Screenshots
image

Desktop (please complete the following information):

  • OS: Microsoft Windows [Version 10.0.22621.1265]

Additional context
v 701.

@sigmarsson
Copy link
Author

The same occured again :

   at LiveChartsCore.Axis`3.InvalidateCrosshair(Chart`1 chart, LvcPoint pointerPosition)
   at LiveChartsCore.CartesianChart`1.InvokePointerMove(LvcPoint point)
   at LiveChartsCore.SkiaSharpView.WinUI.CartesianChart.OnPointerMoved(Object sender, PointerRoutedEventArgs e)
   at WinRT._EventSource_global__Microsoft_UI_Xaml_Input_PointerEventHandler.EventState.<GetEventInvoke>b__1_0(Object sender, PointerRoutedEventArgs e)
   at ABI.Microsoft.UI.Xaml.Input.PointerEventHandler.Do_Abi_Invoke(IntPtr thisPtr, IntPtr sender, IntPtr e)

@beto-rodriguez beto-rodriguez added winui priority 0 needs to be fixed asap. requires more research not verified It is probably an issue, but we have not enough evidence to mark this as a bug. and removed winui priority 0 needs to be fixed asap. labels Jun 7, 2023
@sigmarsson
Copy link
Author

image

Will/can you fix it for 2.0 ?

@beto-rodriguez
Copy link
Owner

I am not completely sure if I got this fixed with a previous commit, but I am not able to reproduce this in the dev branch.

rc2 will be published soon luckily the issue will be gone there.

pivot

@beto-rodriguez beto-rodriguez added this to the rc-2 milestone Nov 10, 2023
@beto-rodriguez
Copy link
Owner

I will close this for now since it seems fixed in rc2 version, feel free to reply or open a new issue if it persists.

@DamianSuess
Copy link

@beto-rodriguez out of curiosity, which version of .NET MAUI was this tested against without it throwing that error?

As a publisher myself, i'm sorry to report this as I don't like seeing this kind of comment pop up after the issue closed either.

  • .NET MAUI v7
  • Windows 10
  • LiveCharts2-rc2

image

If I can this weekend, I'll try to dig in further on your latest branch

@DamianSuess
Copy link

@beto-rodriguez, for the issue that I am running into, I'm not sure if it's the same as the other folks.

For mine, it was on closing the application, with the CartesianChart no longer receiving updates for a live update.
The app is using .NET MAUI v7.0 running in WinUI.

When attempting to reproduce with the latest master, the closest I can relate to is closing the app while running the "General / MultiThread2" sample. However, that is throwing a different error. Just wanted to let you know, i'm still digging around to try & help out.

Thank you again Mr. Rodriguez! I love this user control

@beto-rodriguez
Copy link
Owner

That seems like a different issue, issue raised.

@DamianSuess That issue seems to be at SkiaSharp/MAUI (not sure yet), I will try to find a workaround for it, notice it does not happen on the WinUI control, it only occurs on MAUI (in Windows).

@DamianSuess
Copy link

Good call on splitting this one off. I'm still digging into my scenario as well
I appreciate you taking the time to take a peek.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not verified It is probably an issue, but we have not enough evidence to mark this as a bug. requires more research
Projects
None yet
Development

No branches or pull requests

3 participants