Date formatting crash with Arabic regional settings on Windows 11

Summary

LaunchBox throws a date formatting error when Windows is using Arabic regional settings with the Um Al Qura calendar. The Um Al Qura calendar only supports dates between 30 April 1900 and 16 November 2077 Gregorian. When LaunchBox formats a date outside that supported range, the app errors and certain views crash.

Affected versions

Reported on 13.22, user also notes behavior change on Windows 11 compared to Windows 10.

Environment

Windows 11 with Arabic language and Arabic regional format, Um Al Qura calendar active.

Steps to reproduce

  1. Set Windows 11 display language or regional format to Arabic, which enables the Um Al Qura calendar

  2. Launch LaunchBox or Big Box

  3. Navigate to a game view that formats or displays dates, for example Game Details

  4. Observe the error dialog and crash

Observed behavior

Error appears frequently during normal operations. Example message

Specified time is not supported in this calendar. It should be between 04/30/1900 00:00:00 and 11/16/2077 23:59:59, inclusive. Actual value was 451541088000000000.

Stack shows System.Globalization.UmAlQuraCalendar.CheckTicksRange, called from DateTime.ToShortDateString, then GameDetailsViewModel.

Expected behavior

LaunchBox should format and display dates correctly regardless of Windows calendar choice. If a date falls outside the active calendar range, LaunchBox should clamp or fall back to Gregorian formatting rather than crashing.

Notes

User reports the issue disappears when switching Windows to English, which moves the system to a Gregorian calendar. This suggests LaunchBox is calling ToShortDateString under the current culture without guarding for calendars with smaller supported ranges.

Possible workaround for users

Temporarily set Windows Regional format to English United States or English United Kingdom to use the Gregorian calendar, then relaunch LaunchBox. This is not ideal for Arabic users and is shared only as a temporary mitigation.

Relevant log excerpt

System.ArgumentOutOfRangeException at System.Globalization.UmAlQuraCalendar.CheckTicksRange(Int64 ticks) at System.DateTimeFormat.Format(...) at System.DateTime.ToShortDateString() at Unbroken.LaunchBox.Windows.Desktop.ViewModels.GameDetailsViewModel.BuildResolver(...) ...

Proposed direction

• Audit all date formatting paths that rely on current culture

• For calendars with limited ranges such as Um Al Qura, either clamp out of range values to the calendar minimum or maximum, or force a culture with Gregorian calendar for formatting only, while keeping the user’s language for text

• Add defensive checks around date fields that may be null, default, or sentinel values outside 1900 to 2077 Gregorian


Affected Product
LaunchBox for Windows
OS Version
Windows 11
LaunchBox Version
13.22
Plugins
NA

Please authenticate to join the conversation.

Upvoters
Status

Planned

Board
🐛

Bug Report

Tags

Known Issue

Date

5 months ago

Author

AstroBob

Subscribe to post

Get notified by email when there are changes.