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
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
Comments (6)
-
GameDevDavid
Sep 08, 2020 19:26
Fixed issue with this:
<linker>
<assembly fullname="mscorlib">
<namespace fullname="System.Globalization" preserve="all"/>
</assembly>
</linker>Probably this could be more aggressive and preserve only actual calendars. For my purpose it is fine.
Types with "Calendar" in name before fix:
- Calendar
- CalendarData
- CalendarId
- GregorianCalendar
- GregorianCalendarHelper
- GregorianCalendarTypes
- JapaneseCalendar
- TaiwanCalendarTypes with "Calendar" in name after fix:
- PersianCalendar
- Calendar
- CalendarAlgorithmType
- CalendarData
- CalendarWeekRule
- ChineseLunisolarCalendar
- CalendarId
- EastAsianLunisolarCalendar
- GregorianCalendar
- GregorianCalendarHelper
- GregorianCalendarTypes
- HebrewCalendar
- HijriCalendar
- JapaneseCalendar
- JapaneseLunisolarCalendar
- JulianCalendar
- KoreanCalendar
- KoreanLunisolarCalendar
- TaiwanCalendar
- TaiwanLunisolarCalendar
- ThaiBuddhistCalendar
- UmAlQuraCalendar -
planetfactory
Sep 08, 2020 12:53
We are also facing this issue in Unity 2018.4.26f1
-
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> -
wizard3d
Apr 16, 2020 20:24
We have the same problem, and the linker solutions did not work for us, ideas?
-
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> -
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
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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.