Closed Picao84 closed 3 weeks ago
I am not sure what the core issue is here, but i see something that may be causing an issue:
try
{
AllButPlayedCards = Cards?.Where(x => !PlayedCards.Contains(x)).ToList();
}
catch(Exception ex)
{
Crashes.TrackError(ex, null, ErrorAttachmentLog.AttachmentWithText("Cards is Null", string.Empty));
return;
}
for (int index = 0; index < AllButPlayedCards.Count; index++)
{
// ...
The Cards?.Where(
will probably not throw, but will assign null to the property. If you remove the ?
the "Cards is Null" error will then be logged.
Can you try SkiaSharp 3.0 previews? This should allow you to use the new GL things.
Can you please show the code you use to invalidate the SKGLView?
Hi, I found the issue is related to MAUI. It seems that sometimes when the app goes into the background and Android eventually kills the activity, the MAUI process is not fully stopped. When the user re-opens the app, the existing MAUI process is resumed but the activity is gone leading to issues like this. I have mitigated it somewhat by setting Launch Mode as Single Task. I think we can close this.
Description
I'm seeing crashes on Production when manually invalidating a SKGLView (HasRenderLoop is false) on a timer (every 16.7 ms) on an app that was ported from Xamarin.Forms to MAUI. I've never seen this crash once on Forms and did not make any code change on this control when porting to MAUI. I cannot reproduce the issue myself either.
The stack trace looks like this:
Code
Expected Behavior
There should not be a a null pointer exception.
Actual Behavior
0.05% of users are experiencing this crash.
Version of SkiaSharp
2.88.3 (Current)
Last Known Good Version of SkiaSharp
2.88.2 (Previous)
IDE / Editor
Visual Studio (Windows)
Platform / Operating System
Android
Platform / Operating System Version
Android 14 & Android 13
Devices
Samsung Galaxy A13, Samsung Galaxy A34 5G, Samsung Galaxy A54 5G, Samsung Galaxy S20 FE 5G
Relevant Screenshots
No response
Relevant Log Output
Code of Conduct