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 = "";
            string iconPath = "image_path";

            account.UserName = userName;
            account.DisplayName = displayName;
            account.DomainName = domainName;
            account.EmailId = emailId;
            account.IconPath = iconPath;

The last line gives a segmentation fault.


you can try to type cast the account variable into Account

Account account = Account.CreateAccount()

You can find more here

Still crashes the app.

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.