Mac Game Crashes on Start When Using Texture Packs

Discussion in 'PC Bug Reports' started by Grend, Aug 31, 2017.

  1. Grend

    Grend Terrarian

    OS Version: 10.12.5 (Sierra)

    Crash log:
    8/31/2017 10:48:01 AM
    System.TypeInitializationException: The type initializer for 'Ionic.Zip.ZipFile' threw an exception. ---> System.NotSupportedException: Encoding 437 data could not be found. Make sure you have correct international codeset assembly installed and enabled.
      at System.Text.Encoding.GetEncoding (System.Int32 codepage) [0x0025f] in <1170fb08300b4d0db71c1d1db8555768>:0
      at System.Text.Encoding.GetEncoding (System.String name) [0x00015] in <1170fb08300b4d0db71c1d1db8555768>:0
      at Ionic.Zip.ZipFile..cctor () [0x00000] in <3d63c7f29fa146c29caee29323a47c7a>:0
       --- End of inner exception stack trace ---
      at Terraria.TexturePackSupport.FindTexturePack () [0x00029] in <dbf8f2c5510e46d38b1131a5bdc5c30d>:0
      at Terraria.Main.LoadContent () [0x00099] in <dbf8f2c5510e46d38b1131a5bdc5c30d>:0
      at Microsoft.Xna.Framework.Game.Initialize () [0x00053] in <bc6b38abaaf04135afbd0534ec7f6b92>:0
      at Terraria.Main.ClientInitialize () [0x00082] in <dbf8f2c5510e46d38b1131a5bdc5c30d>:0
      at Terraria.Main.Initialize () [0x0640a] in <dbf8f2c5510e46d38b1131a5bdc5c30d>:0
      at Microsoft.Xna.Framework.Game.DoInitialize () [0x0000d] in <bc6b38abaaf04135afbd0534ec7f6b92>:0
      at Microsoft.Xna.Framework.Game.Run () [0x0000e] in <bc6b38abaaf04135afbd0534ec7f6b92>:0
      at Terraria.Program.LaunchGame (System.String[] args, System.Boolean monoArgs) [0x00092] in <dbf8f2c5510e46d38b1131a5bdc5c30d>:0 
    Steps to reproduce:
    Create any zip file called Texture (Note that mine was created on a Mac, which may affect the encoding used in the .zip file) and place it in the /Users/<username>/Library/Application Support/Terraria/ directory, then attempt to load the game. On Mac operating systems, this will result in the above crash.

    After a quick Google search, it is clear that this is a common issue when trying to support zip files when building a Mac app via Xamarin. A commonly-provided solution is visit iOS Build properties > Advanced > Internationalization > and ensure the west option is checked.
    Also, due to this Xamarin bug, these settings may occasionally be forgotten and need to be revisited. Comment 4 on that page suggests a very useful resolution to prevent this from happening again!
    Last edited: Aug 31, 2017