Accountmanager gives segmentation fault

Hi I tried out the AccountManager Sample in my app:

            var account = Account.CreateAccount();
            string userName = "Marcus";
            string displayName = "Marcus_display";
            string domainName = "Marcus_domain";
            string emailId = "marcus@example.com";
            string iconPath = "image_path";

            account.UserName = userName;
            account.DisplayName = displayName;
            account.DomainName = domainName;
            account.EmailId = emailId;
            account.IconPath = iconPath;
            AccountService.AddAccount(account);

The last line gives a segmentation fault.

Hi,

you can try to type cast the account variable into Account

Account account = Account.CreateAccount()

You can find more here [edit: broken auto-link to https://docs.tizen.org/application/dotnet/guides/personal/account has been removed. Try Account Management | Tizen Docs]

Still crashes the app.

Hi,
Share the error message. I think that will help to realize the problem.

In my expierence, segmentation fault is mostly throw if there are missing libs or NullReferenceException. Are the dependent dll’s all in the tpk-root folder?

Try, to surround the problematic code with a try-statement and log the exception message to the console. Sometimes it helps to get closer to the problem.

It is always a good idea, to surround the start of the app with a try-statement.