Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

iOS Player (5.3.2p1) throw exception on System.Enum.toString()

Discussion in 'iOS and tvOS' started by duong-tranthai, Jan 29, 2016.

  1. duong-tranthai

    duong-tranthai

    Joined:
    Jan 5, 2016
    Posts:
    15
    My game throw exception whenever i call toString() from enum variable, only happen on arm 64 bit devices.
    You can reproduce this by build an run this empty project has only one object which call Enum.ToString() from Start() on ios arm64 device such as iPhone5s or iPhone6.

    Here is stacktrace:

    Failed to postprocess stacktrace
    ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds
    at System.Array.Copy (System.Array sourceArray, Int32 sourceIndex, System.Array destinationArray, Int32 destinationIndex, Int32 length) [0x00000] in <filename unknown>:0
    at System.Array.Copy (System.Array sourceArray, System.Array destinationArray, Int32 length) [0x00000] in <filename unknown>:0
    at System.Collections.ArrayList.CopyTo (System.Array array) [0x00000] in <filename unknown>:0
    at System.Collections.ArrayList.ToArray (System.Type type) [0x00000] in <filename unknown>:0
    at Mono.Globalization.Unicode.MSCompatUnicodeTable.BuildTailoringTables (System.Globalization.CultureInfo culture, Mono.Globalization.Unicode.TailoringInfo t, Mono.Globalization.Unicode.Contraction[]& contractions, Mono.Globalization.Unicode.Level2Map[]& diacriticals) [0x00000] in <filename unknown>:0
    at Mono.Globalization.Unicode.SimpleCollator..ctor (System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    at Mono.Globalization.Unicode.SimpleCollator..cctor () [0x00000] in <filename unknown>:0
    at System.Globalization.CompareInfo..ctor (System.Globalization.CultureInfo ci) [0x00000] in <filename unknown>:0
    at System.Globalization.CultureInfo.get_CompareInfo () [0x00000] in <filename unknown>:0
    at System.Collections.Comparer..ctor (System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    at System.Collections.Comparer..cctor () [0x00000] in <filename unknown>:0
    at System.Array.DoBinarySearch (System.Array array, Int32 index, Int32 length, System.Object value, IComparer comparer) [0x00000] in <filename unknown>:0
    at System.Array.BinarySearch (System.Array array, System.Object value) [0x00000] in <filename unknown>:0
    at System.Enum.FindPosition (System.Object value, System.Array values) [0x00000] in <filename unknown>:0
    at System.Enum.GetName (System.Type enumType, System.Object value) [0x00000] in <filename unknown>:0
    at System.Enum.Format (System.Type enumType, System.Object value, System.String format) [0x00000] in <filename unknown>:0
    at System.Enum.ToString (System.String format) [0x00000] in <filename unknown>:0
    at System.Enum.ToString () [0x00000] in <filename unknown>:0
    at testenum.Start () [0x00000] in <filename unknown>:0
    Rethrow as TypeInitializationException: The type initializer for 'Mono.Globalization.Unicode.SimpleCollator' threw an exception.
    at System.Globalization.CompareInfo..ctor (System.Globalization.CultureInfo ci) [0x00000] in <filename unknown>:0
    at System.Globalization.CultureInfo.get_CompareInfo () [0x00000] in <filename unknown>:0
    at System.Collections.Comparer..ctor (System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    at System.Collections.Comparer..cctor () [0x00000] in <filename unknown>:0
    at System.Array.DoBinarySearch (System.Array array, Int32 index, Int32 length, System.Object value, IComparer comparer) [0x00000] in <filename unknown>:0
    at System.Array.BinarySearch (System.Array array, System.Object value) [0x00000] in <filename unknown>:0
    at System.Enum.FindPosition (System.Object value, System.Array values) [0x00000] in <filename unknown>:0
    at System.Enum.GetName (System.Type enumType, System.Object value) [0x00000] in <filename unknown>:0
    at System.Enum.Format (System.Type enumType, System.Object value, System.String format) [0x00000] in <filename unknown>:0
    at System.Enum.ToString (System.String format) [0x00000] in <filename unknown>:0
    at System.Enum.ToString () [0x00000] in <filename unknown>:0
    at testenum.Start () [0x00000] in <filename unknown>:0
     

    Attached Files:

  2. Deleted User

    Deleted User

    Guest

  3. johnstableWB

    johnstableWB

    Joined:
    Sep 26, 2013
    Posts:
    1
    Also seeing this in 5.3.2p1
     
  4. duong-tranthai

    duong-tranthai

    Joined:
    Jan 5, 2016
    Posts:
    15
    Yes i also must revert back to 5.3.1p4 to build my game. But I really need the fixes relate to AssetBundles and Particles on 5.3.2p1, so i hope the problem have been fixed soon.
     
  5. JoJongGuk

    JoJongGuk

    Joined:
    Sep 19, 2013
    Posts:
    1
    same problem here!

    when using unity analytics, exactly same exception raised.

    please, patch this quickly
     
  6. xgiovio

    xgiovio

    Joined:
    Dec 13, 2015
    Posts:
    3
  7. maxthecat

    maxthecat

    Joined:
    May 26, 2014
    Posts:
    29
    Same problem.

    Reverting back to Unity 5.3.2f1 works for us.
     
  8. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    470
    :-( same here...
     
  9. hiceka

    hiceka

    Joined:
    Apr 25, 2015
    Posts:
    2
    :-( same here
     
  10. hansong

    hansong

    Joined:
    May 14, 2014
    Posts:
    1
    :-( same here
     
  11. AlexanderD

    AlexanderD

    Joined:
    Feb 7, 2014
    Posts:
    2
    Same problem. Any news about this?
     
  12. Gwl

    Gwl

    Joined:
    Feb 10, 2013
    Posts:
    13
  13. duong-tranthai

    duong-tranthai

    Joined:
    Jan 5, 2016
    Posts:
    15
  14. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775
    As @Gwl mentioned, this will be corrected in 5.3.2p2. Sorry for the inconvenience!
     
  15. duong-tranthai

    duong-tranthai

    Joined:
    Jan 5, 2016
    Posts:
    15
  16. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,775