Search Issue Tracker

Fixed in 2019.3.X

Fixed in 2018.3.X, 2019.1.X

Votes

0

Found in

2018.1.9f1

2018.1.9f2

2018.4

2019.2.0a1

2019.3.0a1

Issue ID

1076679

Regression

Yes

When the registry value for "TimeZoneKeyName" is empty, null or invalid, "TimeZoneNotFoundException" exceptions are thrown

Windows

-

Reproduction steps:
1. Open "Regedit" -> "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation"
2. Change "TimeZoneKeyName" value data to gibberish
3. Create a New or Open an existing Project
4. In the Editor log find error: "TimeZoneNotFoundException: Exception of type 'System.TimeZoneNotFoundException' was thrown."

Expected Result: Unity handles invalid "TimeZoneKeyName" registry values
Actual Result: "TimeZoneNotFoundException" errors are thrown when the "TimeZoneKeyName" registry value is invalid and the Editor/Build is unusable

Reproduced with: 2019.3.0b5, 2019.3.0b1, 2019.3.0a1, 2019.2.9f1, 2019.2.0a4, 2019.2.0a1, 2019.1.14f1, 2018.4.11f1, 2018.3.14f1, 2018.1.9f2
Did not reproduce on: 2020.1.0a8, 2019.3.0b6, 2017.4.33f1

Comments (5)

  1. bindokudeng

    Jul 13, 2023 08:22

    Still happens on 2020.3.25f1

  2. MihkelT

    Apr 22, 2020 09:41

    Still happens in 2019.11.1 with .net set at 2.x

  3. Ladace

    Oct 10, 2019 19:09

    This bug still occur in 2018.4.10f1

    System.TimeZoneInfo.FindSystemTimeZoneById (System.String id) (at <7ba07f088431485bb722f3b3373e87ee>:0)
    System.TimeZoneInfo.CreateLocal () (at <7ba07f088431485bb722f3b3373e87ee>:0)
    System.TimeZoneInfo.get_Local () (at <7ba07f088431485bb722f3b3373e87ee>:0)
    System.TimeZoneInfo.GetDateTimeNowUtcOffsetFromUtc (System.DateTime time, System.Boolean& isAmbiguousLocalDst) (at <7ba07f088431485bb722f3b3373e87ee>:0)
    System.DateTime.get_Now () (at <7ba07f088431485bb722f3b3373e87ee>:0)
    UnityEngine.GUI..cctor () (at <512b71eca5984710bf8fd1111d3654a2>:0)
    Rethrow as TypeInitializationException: The type initializer for 'UnityEngine.GUI' threw an exception.
    Game.OnGUI () (at <1de034b8c89e49d18ee0edb1d1b76fa7>:0)

  4. SimDevs

    Sep 18, 2019 10:21

    Still happens on 2018.4.8f1

    System.TimeZoneInfo.FindSystemTimeZoneById (System.String id) (at <00000000000000000000000000000000>:0)
    System.TimeZoneInfo.CreateLocal () (at <00000000000000000000000000000000>:0)
    System.TimeZoneInfo.get_Local () (at <00000000000000000000000000000000>:0)
    System.TimeZoneInfo.GetDateTimeNowUtcOffsetFromUtc (System.DateTime time, System.Boolean& isAmbiguousLocalDst) (at <00000000000000000000000000000000>:0)
    System.DateTime.get_Now () (at <00000000000000000000000000000000>:0)

  5. chaixl

    Jun 25, 2019 01:51

    This bug still occur in 2018.4.2f1.

    System.TimeZoneInfo.FindSystemTimeZoneById (System.String id) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    System.TimeZoneInfo.CreateLocal () (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    System.TimeZoneInfo.get_Local () (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    System.TimeZoneInfo.GetDateTimeNowUtcOffsetFromUtc (System.DateTime time, System.Boolean& isAmbiguousLocalDst) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    System.DateTime.get_Now () (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    UnityEngine.GUI..cctor () (at <a0287f84f481422a879965ed0aa2afc0>:0)
    Rethrow as TypeInitializationException: The type initializer for 'UnityEngine.GUI' threw an exception.
    UnityEngine.GUIUtility.ResetGlobalState () (at <a0287f84f481422a879965ed0aa2afc0>:0)
    UnityEngine.GUIUtility.BeginGUI (System.Int32 skinMode, System.Int32 instanceID, System.Int32 useGUILayout) (at <a0287f84f481422a879965ed0aa2afc0>:0)

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.