onSigabrt called or 'PAL_SEHException' in the Tizen .NET app

Hello, I have a .NET app (Xamarin.Forms) for Samsung Tizen watch. Sometimes it happens that the app completely crashes without any stacktrace. Maybe it happens only in the Tizen 5.5 Simulator, but it’s possible that it also happens on the device. It’s not every time when the app is started, only sometimes. It seems there is some threading issue / async await problem etc.

It always ends with these two lines in the log:

Stack overflow.
onSigabrt called

Once I received more info:

terminate called after throwing an instance of 'PAL_SEHException'
onSigabrt called
Thread added[0x8035cbd8, pid:5849 tid: 5849] to display:0x8035df68
Thread added[0x803672b8, pid:5849 tid: 5849] to display:0x80367e80

It may be the same error, or a different issue.

What is this problem? Why this can happen? I found some info about this issue on this link: https://github.com/dotnet/runtime/issues/13685 “The PAL_SEHException should never leak from a dotnet application, so it seems there is some corner case bug in the runtime.”

Do you have ideas how to debug this? How can I get more info? I have most of my code wrapped in the try/catch block, but this may be caused by any external library.

I am using these packages:

  • Newtonsoft.Json 12.0.3
  • SkiaSharp.Views.Forms 1.68.3
  • Tizen.NET 5.0.0.14629
  • Tizen.Wearable.CircularUI 1.4.0
  • Xamarin.Essentials 1.5.3.2
  • Xamarin.Forms 4.6.0.847

And I know the reason, at least for the second issue. It’s the SkiaSharp library. It includes both x86 and ARM packages in the .tpk file.

There is a problem on the Samsung Galaxy Store, it does not accept packages which mention both x86 and ARM. I had to update the main .csproj project with this line:

<PropertyGroup>
  <RuntimeIdentifier>tizen-armel</RuntimeIdentifier>
</PropertyGroup>

But this means that the app stops working in the simulator.

Hello @mai1588157995,

If your app does not work on the emulator and removing the PropertyGroup, you can try running your app on Samsung’s Remote Test Lab. It’s free and has multiple watches on which you can test out your app.

PS: If you think this answer solved your problem please mark the “like” button so that others can find it more easily.

1 Like

Thanks. I was not very successful with the Samsung’s remote test lab. It has only one watch with the Tizen 4.0 (that supports .NET) and the installation of the app always failed with the “com.samsung.rtl.app.InstallException: General error [-1] failed”.

Maybe the certificate was a problem, but I didn’t manage to make it work in the rented 30 minutes. @temp_variable