ThinkGeo.com    |     Documentation    |     Premium Support

Random SkiaSharp exception

I was trying to give you a workaround in the first place based on your current version but failed.

Based on the latest stable version v14.4.2, we can create a hotfix v14.4.3 with this fix.

Hi,

It would be great if you could create a hotfix with 14.4.3. We are plannig to update our ThinkGeo version after new year so with the hotfix we could get this included as well.

Br, Simo

Hi Simo,

You might want to upgrade to v14.4.2 first, and make sure it works fine with your project. Every issue in v14.4.2 will also exist in v14.4.3.

Thanks,
Ben

Hi,

Yes, naturally we need to make sure that all other changes between our current version and 14.4.3 are working fine on our application while doing the upgrade.

Br, Simo

OK. We will do it early next year. Let me know if you find any other issues and we’ll see if we can put them to 14.4.3 as well.

Hi Simo,

We just released v14.4.3, but we didn’t include this change. During testing, we found it could make the peak memory too high. We have an idea to fix both the memory and AccessViolationException, we’ll do it in the beta branch, run more testing, and then bring it into a future stable release once it’s ready. At latest you can have it in v14.5.

Your other request is included in v14.4.3: OgcApiFeatureLayer and LayerOverlay - ThinkGeo UI for Desktop / WPF - ThinkGeo Discussion Forums

Thanks,
Ben

Hi,

OK, thanks for the info.

Br, Simo

Hi,

What is the status of that new attempt to fix this one ? Just wondering that would it be possible to get it to coming v14.4.4 hotfix ?

Br, Simo

Hi,

Any updates on this ?

Br, Simo

Hi Simo,

Sorry for the late reply. Sure, we will add this one as well.

Thanks,
Ben

1 Like

Hi,

Great, Thanks !

Is the schedule “end of the month” still valid for v14.4.4 ?

Br, Simo

Yep, you will see it within this week.

1 Like

Hi Simo, v14.4.4 is out.

1 Like

Hi,

This kind of SkiaSharp exception was seen with v14.4.4:

System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
at SkiaSharp.SKImage.FromBitmap(SKBitmap bitmap)
at SkiaSharp.SKCanvas.DrawBitmap(SKBitmap bitmap SKRect dest SKPaint paint)
at 9hQ=.RRU=.WBU=(GeoImage image Single x Single y Single width Single height Single canvasWidth Single canvasHeight)
at 9hQ=.RRU=.WRU=(GeoImage image Int32 x Int32 y Single canvasWidth Single canvasHeight)
at ThinkGeo.Core.SkiaGeoCanvas.FlushCore()
at ThinkGeo.Core.SkiaGeoCanvas.EndDrawingCore()
at ThinkGeo.UI.Wpf.AdornmentOverlay.<DrawAsyncCore>d__8.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ThinkGeo.UI.Wpf.Overlay.<DrawAsync>d__65.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at ThinkGeo.UI.Wpf.Overlay.x0U=(Exception e String memberName)
at ThinkGeo.UI.Wpf.Overlay.<DrawAsync>d__65.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ThinkGeo.UI.Wpf.MapViewBase.<DrawOverlayAsync>d__357.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ThinkGeo.UI.Wpf.MapViewBase.<DrawOverlaysAsync>d__351.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ThinkGeo.UI.Wpf.MapViewBase.<ZoomToAsync2>d__288.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ThinkGeo.UI.Wpf.MapViewBase.<ZoomToAsync>d__312.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

So far this has happened only once and did not happen again when we tried to re-produce it.

Could you please check it ?

Br, Simo

We are digging in. Is this exception catchable? or it would crash the application?

Hi,

I think that this time it happened actually in place (when ZoomToAsync was called by our app) where we could catch it. But this was the first time this happened in this place so we did not have catch for it so app crashed.

Br, Simo

Hi Simo,

  1. This is a related but different issue. It occurs intermittently due to a race condition.
  2. We have identified and fixed it in the latest beta. The fix will also be included in the upcoming v14.4.5 hotfix.
  3. In the latest beta and the upcoming v14.5 release, AdornmentOverlay has been significantly improved. For a quick preview, please see: Recommended way of having static elements on pannable background

Thanks,
Ben

1 Like

Hi,

This kind of random SkiaSharp related crash was also seen on test automation:

Exception Info: System.AccessViolationException
at SkiaSharp.SKBitmap.CopyTo(SkiaSharp.SKBitmap, SkiaSharp.SKColorType)
at SkiaSharp.SKBitmap.Copy(SkiaSharp.SKColorType)
at Y0c=.EEc=.EUc=(ThinkGeo.Core.GeoImage)
at ThinkGeo.UI.Wpf.TileView.8UY=(ThinkGeo.Core.GeoCanvas)
at ThinkGeo.UI.Wpf.TileOverlay+d__109.MoveNext()
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run()
at System.Threading.ThreadPoolWorkQueue.Dispatch()

Please check this also.

Br, Simo

We didn’t aware SKBitmap.CopyTo was not thread-safe. Let us dig in and will keep you posted.

Hi,

Any updates to this latest SKBitmap.CopyTo exception ?

Br, Simo