Crash with 1000+ gold in shopscreen

General discussion about Chasm.
Locked
Savior82
Supporter
Supporter
Posts: 2
Joined: Sun Apr 28, 2013 11:00 am

Crash with 1000+ gold in shopscreen

Post by Savior82 » Sun Apr 28, 2013 11:04 am

Having 1000+ gold and being/entering shop screen results in crash. Demo version 1.05.

Code: Select all

System.ArgumentException: The character ' ' (0x00a0) is not available in this SpriteFont. If applicable, adjust the font's start and end CharacterRegions to include this character.
Parameter name: character
   at Microsoft.Xna.Framework.Graphics.SpriteFont.GetIndexForCharacter(Char character)
   at Microsoft.Xna.Framework.Graphics.SpriteFont.InternalMeasure(StringProxy& text)
   at Microsoft.Xna.Framework.Graphics.SpriteFont.MeasureString(String text)
   at Chasm.Gameplay.NPCMenu.DrawShop(SpriteBatch sb)
   at Chasm.Gameplay.NPCMenu.Draw(SpriteBatch sb)
   at Chasm.Gameplay.World.Draw(SpriteBatch spriteBatch, GameTime gameTime)
   at Chasm.ChasmGame.Draw(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.DrawFrame()
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
   at Microsoft.Xna.Framework.GameHost.OnIdle()
   at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
   at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
   at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at Microsoft.Xna.Framework.WindowsGameHost.Run()
   at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
   at Microsoft.Xna.Framework.Game.Run()
   at Chasm.Program.Main(String[] args)

User avatar
James
Developer
Developer
Posts: 1612
Joined: Fri Feb 15, 2013 5:34 pm

Re: Crash with 1000+ gold in shopscreen

Post by James » Sun Apr 28, 2013 12:53 pm

Oops! Good find, I will try to reproduce and fix this.

Savior82
Supporter
Supporter
Posts: 2
Joined: Sun Apr 28, 2013 11:00 am

Re: Crash with 1000+ gold in shopscreen

Post by Savior82 » Sun Apr 28, 2013 3:24 pm

Workaround: Set digit grouping symbol to non-space character in Windows Locale settings. Hope it helps in bug squashing. :)

Locked