-
Notifications
You must be signed in to change notification settings - Fork 591
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
LiveCharts Navigation Exception on iOS and .NET 9 #1703
Comments
i'm experiencing the same issue with 2.0.0-rc2, any workarounds for this? |
The same for me. Exceptionis on all platforms, Win, iOS, Android. On Android there is 'Unable to cast to ContentViewGroup' exception. This happened only after upgrading Microsoft.Maui.Controls to version 9.0.10 from 8 on net9. So i'm not sure if this is addresed to MS or LiveCharts. Also tried latest rc 4.5 of LiveCharts, but behavior is the same. After spending a couple of endless nigths, i have still no workaround. |
Looks like this is due to changes in .NET 9 in the way custom control using handlers are cleaned up: Handler disconnection. Adding
|
Well, you are right, i can confirm on all plaforms everything works fine. Thank you. |
This happens on Maui 8 on Windows as well when calling Maui 8.0.21
Project to replicate the issue: https://github.com/jo-ruch/LiveCharts2MauiMemoryLeakDemo/tree/disconnect_handler_exception |
This might be a problem with the implementation of LiveCharts.
|
The correct approach should be to use Handler (ConnectHandler/DisconnectHandler) I'll try to modify this process when I have some free time. |
I tested and I was able to reproduce on the master branch (v rc-4.5) The good news is that this was fixed with #1704 by @albyrock87, now the chart uses the ChartViewHandler to connect and disconnect handlers, this is now merged to I think this could also fix #1725 |
Describe the bug
When navigating away from a page containing a LiveChart graph using the back button, the application throws the following casting exception:
To Reproduce
Steps to reproduce the behavior:
Environment:
Additional context
While I haven't thoroughly investigated the Android platform, preliminary observations suggest this issue is also present there.
The text was updated successfully, but these errors were encountered: