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
- Component Glyphs value is truncated and Ligature Table glyph fields become inaccessible when increasing the Component Glyphs count
- There is no “Overwrite Preset?” popup when saving a Customizable Toolbar preset with a name that already exists
- Customizable Toolbar preset does not switch to the Unity Default Preset when Reverting All Saved Presets or deleting the active Preset
- [Usability] Selected node gets unselected when undoing changes in the Graph Inspector Node Settings tab
- Search Default option for Column Format does not reset the column's format
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.