What is a Segmentation Fault exception?

What is a Segmentation Fault exception, how to understand the actual cause for it? I’m working on a Tizen.NET project. The Segmentation Fault exception happens here and there when I make absolutely harmless changes. For example there is a class. That class is instantiated in another one. I just added a field initializer to the instantiated class, literally added “= null” to “private Agent;” Right after that I started getting that exception on “var instance = new ThatClass();”. I saw that exception in other as harmless cases as this one. How can initializing of a field lead to this exception?

Update: That exception seems to be tightly related to the Samsung.Sap NuGet. The classes that I mentioned before: Agent and Peer are from that package. Did anybody successfully used Samsung.Sap? Are there any caveats?

Hello @kuc1597989013,

Segmentation fault can occur due to a wide range of reasons. It seems like one of the variables that you are trying to access might be null. I would like to recommend you to check out the Tizen .NET companion app development guide from here.

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

I still didn’t find how to beat this error while debugging but strangely enough if I run that code, don’t go step by step, there is no Segmentation Fault exception. That makes me believe that there is a problem in the Tizen.NET integration with the VS debugger. That definitely needs to be researched further and fixed.

In my experience the reason are mostly uninitialized instances or null.
And Tizen .NET is very unhappy with missing XAML bindings.

Debugger works only on native projects. If you use sap in a shared app, try to initialize it in the wearable app directly, so the debugger stops there.

Sometimes its a good idea too, to log some steps und wrap it into try-statements.

Maybe this help you. Good luck.

i am facing same issue, please tell more about this, explain more about this!