Search Issue Tracker

By Design

Votes

0

Found in

2018.2.5f1

Issue ID

1091320

Regression

No

[IL2CPP] ArgumentOutOfRangeException is thrown when using the .NET methods for formatting dates and attempting to format dates

iOS

-

To reproduce:

1. Download attached project "ArabicCalendarMissing.zip" and open in Unity
2. Open "SampleScene" scene
3. Build for iOS
4. Deploy the Xcode project to the iOS device
5. Observe that the following exception is thrown:

"ArgumentOutOfRangeException: Not a valid calendar for the given culture.
Parameter name: value"

Notes:
- This issue appears on IL2CPP builds
- On Mono everything works fine

Tested with:
- iPhone 7s Plus iOS 12.0
- iPhone X iOS 12.1

Reproduced on Unity 2017.4.0f1, 2017.4.13f1, 2018.1.9f2, 2018.2.13f1, 2018.3.0b6 and 2019.1.0a6

  1. Response avatar

    Resolution Note:

    Managed code stripping is removing the System.Globalization.UmAlQuraCalendar type from mscorlib. Sent a link.xml workaround to the user to preserve the affected calendar.

Comments (4)

  1. 58900c174bd2516f6c33ed062bd9e324?d=mm

    masak

    May 19, 2020 05:26

    same issue.
    I tried to use a wildcard *, maybe this includes all Calendar.

    <linker>
    <assembly fullname="System.Globalization.*Calendar" preserve="all"/>
    </linker>

  2. 0f19a1b780bef6733773adf05cf776ff?d=mm

    wizard3d

    Apr 16, 2020 20:24

    We have the same problem, and the linker solutions did not work for us, ideas?

  3. E59a6d2a6312c2f8e0d7ad3e1422d7ab?d=mm

    livingtarget

    Mar 17, 2020 13:03

    creating a link.xml file like this might do the trick

    <linker>
    <assembly fullname="System.Globalization.Calendars" preserve="all"/>
    </linker>

  4. D97fc94651253edfbbe700b8b58308ab?d=mm

    NamdevKatkar

    Dec 03, 2019 12:35

    We are also facing this issue in Unity 2018.4.11f1. Can you please provide us the solution

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.