Mapsui: Xamarin.Forms application crash on Android device

Created on 17 Mar 2021  路  4Comments  路  Source: Mapsui/Mapsui

This one pretty hard to catch. Happens rarely and even without changing anything simple restart runs clearly. I don't really know what causes this issue, maybe someone knows a way around this? When I start an app there are around 20-30 features that are being drawn on a map (loaded from database) and scrolling and moving just when the map loads threw me this error. Restart works like a charm...

Error:

Native Crash Reporting
Got a SEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
No native Android stacktrace (see debuggerd output).

=================================================================
Basic Fault Address Reporting
Memory around native instruction pointer (0x75dc03aa78):0x75dc03aa68 f5 0f 1d f8 f4 4f 01 a9 fd 7b 02 a9 f3 03 00 aa .....O...{......
0x75dc03aa78 68 32 51 b9 3f 04 00 71 29 c4 9f 1a fd 83 00 91 h2Q.?..q).......
0x75dc03aa88 14 01 09 4b 9f 06 00 71 cb 03 00 54 f5 03 1f 2a ...K...q...T...*
0x75dc03aa98 68 22 40 f9 09 59 40 b9 29 05 00 71 cb 00 00 54 h"@..Y@.)..q...T

===================================================
03-17 09:19:24.268 W/.xamarinprojec(30749): 0xebadde09 skipped times: 0

Managed Stacktrace:

at <0xffffffff>
at SkiaSharp.SkiaApi:sk_canvas_restore_to_count <0x00007>
at SkiaSharp.SKCanvas:RestoreToCount <0x00087>
at SkiaSharp.SKAutoCanvasRestore:Restore <0x000ab>
at SkiaSharp.SKAutoCanvasRestore:Dispose <0x00053>
at SkiaSharp.Views.Android.SKGLTextureViewRenderer:OnDrawFrame <0x008ef>
at GLThread:GuardedRun <0x018c7>
at GLThread:Run <0x00123>
at System.Threading.ThreadHelper:ThreadStart_Context <0x00143>
at System.Threading.ExecutionContext:RunInternal <0x003af>
at System.Threading.ExecutionContext:Run <0x0006b>
at System.Threading.ExecutionContext:Run <0x0011f>
at System.Threading.ThreadHelper:ThreadStart <0x0009b>
at System.Object:runtime_invoke_void__this__ <0x00173>

possible bug

Most helpful comment

Which version is this?

After numerous days I've found out that new version of Mapsui (currently 3.0.0 alpha) works like charm. Seems like there were bugs on earlier versions, not only this one. I've faced similar issues but with different stacktraces. I've been using Mapsui 2.0.0 beta, so maybe this problem was earlier. Anyways I can't reproduce it right now

All 4 comments

Kind of figured what the problem is but I'm not completely sure. It seems like crazy actions with map like furious dragging/zooming when there are a lot of features are throwing errors at SkiaSharp and that crashes an app. Maybe UI thread is overloaded? Can anyone give their thoughts about it?

Which version is this?

https://github.com/mono/SkiaSharp/issues/1465 As i pointed out in another issue, the drawing is actually not done on the UI thread on android (as we can see in the stack trace there is a "GLThread" created by the skiasharp.views.android code) which means that if the mapsui UI data is updated on the main thread while the drawing thread is currently doing its job, you could run into race conditions and undefined behaviors

Which version is this?

After numerous days I've found out that new version of Mapsui (currently 3.0.0 alpha) works like charm. Seems like there were bugs on earlier versions, not only this one. I've faced similar issues but with different stacktraces. I've been using Mapsui 2.0.0 beta, so maybe this problem was earlier. Anyways I can't reproduce it right now

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lukaszpitulski picture lukaszpitulski  路  3Comments

JesrigPineda picture JesrigPineda  路  4Comments

willy40 picture willy40  路  6Comments

JesrigPineda picture JesrigPineda  路  5Comments

pauldendulk picture pauldendulk  路  7Comments