Question

I made a very simple Xamarin.iOS app but my app crashes immediately when i launched it on the device: iPhone 4 and iPhone 5. In the simulator and on the iPhone 5s device it works correctly.

Whenever I use a DateTime object my app crash.

I use following versions of Xamarin.iOS:

Xamarin Studio Version 4.2.3 (build 59) Runtime: Mono 3.2.6 ((no/9b58377) Package version: 302060000

Xamarin.iOS Version: 7.0.7.2 (Business Edition) Build date: 2014-17-02 17:43:23-0500

The relevant code (I started with a utility template from xamarin):

    public override void ViewDidLoad ()
    {
        base.ViewDidLoad ();


        var testDateTime = DateTime.Now;

        Console.WriteLine (testDateTime.ToString ());
    }

In XCode i become this error: Exception Type: EXC_BAD_ACCESS (SIGSEGV)

Does anyone know a soloution for this type of error?

Was it helpful?

Solution

This issue is caused by using a DateTime object with Xamarin when the region settings were Swiss German. The bug is fixed by Xamarin and will be released later.

In the meantime there is a workaround:

CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("de-DE");

Thank you for the great Support Rolf & Xamarin.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top