4

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?

Andy
  • 99
  • 7

1 Answers1

3

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.

Andy
  • 99
  • 7
  • I'm currently fighting with the same issue... Thx for bringing up this solution! Do you know when Xamarin will release the fix? I figured out it ONLY happens with swiss german, all the other dialects are working :-) – Ursin Brunner Apr 05 '14 at 13:12
  • 1
    @u_b They said it's fixed with the next release but there is no concrete date. – Andy Apr 07 '14 at 10:48