-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Calendar view in maui causes crash on physical android device #67
Comments
TestingWhen ran from debug on a Huawei Mate 20 lite, start-up took on average18-19 seconds (Ran 4 times) and rendered this: However when not running with the debugger, start-up took on average 3-4 seconds (Ran 4 times) and crashed each time. When ran from debug on a Samsung A52s, start-up took on average 9-10 seconds (Ran 4 times) and rendered this: However when not running with the debugger, start-up took on average 2 seconds (Ran 4 times) and crashed each time. After some more testing, I found that the crash is caused by the
Either remove these lines or define the resources somewhere in a parent view, such as in the ContentPage:
Thanks for using the plugin! |
@ME-MarvinE thanks for your quick and thorough response! I tried removing those lines from the app and I'm still seeing the crash, do you have any further recommendations for debugging this? |
It looks like I reverted my changes to the XAML to the original code but not the ViewModel. Now it only works if you don't remove the lines and define the styles. If you suspect it is performance related, try to reduce the resources it uses to see if it still crashes. If the app doesn't crash, then I don't think I can do anything about performance as I've tried to refine the XAML plenty of times, and may be due to MAUI issues such as: dotnet/maui#6317 If the app still crashes, then it probably isn't performance related, though you could go further by binding the For debugging, what I do is:
|
@sfoslund I missed some style references in ViewHabitsView: Line 26: If you haven't already, try removing those lines along with the ones previously mentioned:
There were no crashes after I did that. |
I've tried defining the styles as well and that also doesn't make a difference for me.
Yes, I noticed those as well and removed them in my original testing. Thanks for those debugging tips! I will likely take a break from this project for a while and come back to it in a few weeks, but once I do I will update here if I find the issue. |
ME-MarvinE#67 Calendar view in maui causes crash on physical android device bug Something isn't workinggood first issue ME-MarvinE#64 upgrading from version 3 to 4 breaks the application awaiting-author Awaiting a respose from the authorquestion
Hi Guys, This PR might fix it. |
@sfoslund Have you looked into this recently, are you still experiencing the issue? |
I've found that it crashes if my .net maui app starts with a device in horizontal screen mode, but it does not crash in vertical screen mode. The issue can be reproduced on multiple Android devices, including physical and Emulators. |
It turns out that the above issue is not caused by XCalendar but might be a bug in .net MAUI.
|
Describe the bug
When including a CalendarView in a maui android app the app crashes, presumably because the calendar view is taking so long to load. My app is running fine (but noticeably slowly) on an android emulator but as soon as I install it on a physical device it crashes.
Expected behavior
Calendar view renders without crash
Steps to reproduce OR link to code
Repro project: https://github.com/sfoslund/DailyCheckinApp/blob/main/DailyCheckinApp/Views/CalendarView.xaml#L17
Xamarin Forms or .NET MAUI (If related to UI)
.NET MAUI
Device Info (Optional)
Device Model: Google Pixel 4A
Android Version: 12
IOS Version: N/a
Windows Version: N/a
The text was updated successfully, but these errors were encountered: