Author Topic: [Solved] Cant start up game - unhandled errors  (Read 1808 times)

Offline Lister

  • Newbie
  • *
  • Posts: 3
[Solved] Cant start up game - unhandled errors
« on: January 14, 2010, 08:52:26 am »
Downloaded it from steam - wouldnt run
downloaded it this web site into another location (program files) - still wont run
downloaded slim dx and .net sp 3.65 and re-executed them  - still doesnt run
same errors every time, here's the unhandled error file contents

Unusual to get this type of problem with a game  ???

 
4/01/2010 12:51:55 (3.0.0.0Trial)
-----------------------------------Application_ThreadException-----------------------------------System.TypeInitializationException: The type initializer for 'AIWar.Windows.GraphsDisplay' threw an exception. ---> System.ArgumentException: Font 'Arial' does not support style 'Regular'.
   at System.Drawing.Font.CreateNativeFont()
   at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
   at System.Drawing.Font.Initialize(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
   at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit)
   at ZedGraph.FontSpec.Remake(Single scaleFactor, Single size, Single& scaledSize, Font& font)
   at ZedGraph.FontSpec.Init(String family, Single size, Color color, Boolean isBold, Boolean isItalic, Boolean isUnderline, Color fillColor, Brush fillBrush, FillType fillType)
   at ZedGraph.Legend..ctor()
   at ZedGraph.PaneBase..ctor(String title, RectangleF paneRect)
   at ZedGraph.MasterPane..ctor(String title, RectangleF paneRect)
   at ZedGraph.ZedGraphControl..ctor()
   at AIWar.Windows.GraphsDisplay..ctor() in C:\vcprojs\AIWar\Windows\GraphsDisplay.cs:line 23
   at AIWar.Windows.GraphsDisplay..cctor() in C:\vcprojs\AIWar\Windows\GraphsDisplay.cs:line 15
   --- End of inner exception stack trace ---
   at AIWar.GameForm.HideAllWindows() in C:\vcprojs\AIWar\GameFormParts\GameLoop.cs:line 150
   at AIWar.GameForm.GameForm_Load(Object sender, EventArgs e) in C:\vcprojs\AIWar\GameFormParts\Startup.cs:line 110
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
14/01/2010 12:52:09 (3.0.0.0Trial)
-----------------------------------CurrentDomain_UnhandledException-----------------------------------System.TypeInitializationException: The type initializer for 'AIWar.Windows.GraphsDisplay' threw an exception. ---> System.ArgumentException: Font 'Arial' does not support style 'Regular'.
   at System.Drawing.Font.CreateNativeFont()
   at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
   at System.Drawing.Font.Initialize(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
   at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit)
   at ZedGraph.FontSpec.Remake(Single scaleFactor, Single size, Single& scaledSize, Font& font)
   at ZedGraph.FontSpec.Init(String family, Single size, Color color, Boolean isBold, Boolean isItalic, Boolean isUnderline, Color fillColor, Brush fillBrush, FillType fillType)
   at ZedGraph.Legend..ctor()
   at ZedGraph.PaneBase..ctor(String title, RectangleF paneRect)
   at ZedGraph.MasterPane..ctor(String title, RectangleF paneRect)
   at ZedGraph.ZedGraphControl..ctor()
   at AIWar.Windows.GraphsDisplay..ctor()
   at AIWar.Windows.GraphsDisplay..cctor()
   --- End of inner exception stack trace ---
   at AIWar.Windows.GraphsDisplay.Dispose(Boolean disposing)
   at System.ComponentModel.Component.Finalize()
14/01/2010 12:56:37 (3.0.0.0Trial)
-----------------------------------Application_ThreadException-----------------------------------System.TypeInitializationException: The type initializer for 'AIWar.Windows.GraphsDisplay' threw an exception. ---> System.ArgumentException: Font 'Arial' does not support style 'Regular'.
   at System.Drawing.Font.CreateNativeFont()
   at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
   at System.Drawing.Font.Initialize(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
   at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit)
   at ZedGraph.FontSpec.Remake(Single scaleFactor, Single size, Single& scaledSize, Font& font)
   at ZedGraph.FontSpec.Init(String family, Single size, Color color, Boolean isBold, Boolean isItalic, Boolean isUnderline, Color fillColor, Brush fillBrush, FillType fillType)
   at ZedGraph.Legend..ctor()
   at ZedGraph.PaneBase..ctor(String title, RectangleF paneRect)
   at ZedGraph.MasterPane..ctor(String title, RectangleF paneRect)
   at ZedGraph.ZedGraphControl..ctor()
   at AIWar.Windows.GraphsDisplay..ctor() in C:\vcprojs\AIWar\Windows\GraphsDisplay.cs:line 23
   at AIWar.Windows.GraphsDisplay..cctor() in C:\vcprojs\AIWar\Windows\GraphsDisplay.cs:line 15
   --- End of inner exception stack trace ---
   at AIWar.GameForm.HideAllWindows() in C:\vcprojs\AIWar\GameFormParts\GameLoop.cs:line 150
   at AIWar.GameForm.GameForm_Load(Object sender, EventArgs e) in C:\vcprojs\AIWar\GameFormParts\Startup.cs:line 110
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
14/01/2010 12:56:49 (3.0.0.0Trial)
-----------------------------------CurrentDomain_UnhandledException-----------------------------------System.TypeInitializationException: The type initializer for 'AIWar.Windows.GraphsDisplay' threw an exception. ---> System.ArgumentException: Font 'Arial' does not support style 'Regular'.
   at System.Drawing.Font.CreateNativeFont()
   at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
   at System.Drawing.Font.Initialize(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
   at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit)
   at ZedGraph.FontSpec.Remake(Single scaleFactor, Single size, Single& scaledSize, Font& font)
   at ZedGraph.FontSpec.Init(String family, Single size, Color color, Boolean isBold, Boolean isItalic, Boolean isUnderline, Color fillColor, Brush fillBrush, FillType fillType)
   at ZedGraph.Legend..ctor()
   at ZedGraph.PaneBase..ctor(String title, RectangleF paneRect)
   at ZedGraph.MasterPane..ctor(String title, RectangleF paneRect)
   at ZedGraph.ZedGraphControl..ctor()
   at AIWar.Windows.GraphsDisplay..ctor()
   at AIWar.Windows.GraphsDisplay..cctor()
   --- End of inner exception stack trace ---
   at AIWar.Windows.GraphsDisplay.Dispose(Boolean disposing)
   at System.ComponentModel.Component.Finalize()
14/01/2010 13:31:36 (3.0.0.0Trial)
-----------------------------------Application_ThreadException-----------------------------------System.TypeInitializationException: The type initializer for 'AIWar.Windows.GraphsDisplay' threw an exception. ---> System.ArgumentException: Font 'Arial' does not support style 'Regular'.
   at System.Drawing.Font.CreateNativeFont()
   at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
   at System.Drawing.Font.Initialize(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
   at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit)
   at ZedGraph.FontSpec.Remake(Single scaleFactor, Single size, Single& scaledSize, Font& font)
   at ZedGraph.FontSpec.Init(String family, Single size, Color color, Boolean isBold, Boolean isItalic, Boolean isUnderline, Color fillColor, Brush fillBrush, FillType fillType)
   at ZedGraph.Legend..ctor()
   at ZedGraph.PaneBase..ctor(String title, RectangleF paneRect)
   at ZedGraph.MasterPane..ctor(String title, RectangleF paneRect)
   at ZedGraph.ZedGraphControl..ctor()
   at AIWar.Windows.GraphsDisplay..ctor() in C:\vcprojs\AIWar\Windows\GraphsDisplay.cs:line 23
   at AIWar.Windows.GraphsDisplay..cctor() in C:\vcprojs\AIWar\Windows\GraphsDisplay.cs:line 15
   --- End of inner exception stack trace ---
   at AIWar.GameForm.HideAllWindows() in C:\vcprojs\AIWar\GameFormParts\GameLoop.cs:line 150
   at AIWar.GameForm.GameForm_Load(Object sender, EventArgs e) in C:\vcprojs\AIWar\GameFormParts\Startup.cs:line 110
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
14/01/2010 13:31:40 (3.0.0.0Trial)
-----------------------------------CurrentDomain_UnhandledException-----------------------------------System.TypeInitializationException: The type initializer for 'AIWar.Windows.GraphsDisplay' threw an exception. ---> System.ArgumentException: Font 'Arial' does not support style 'Regular'.
   at System.Drawing.Font.CreateNativeFont()
   at System.Drawing.Font.Initialize(FontFamily family, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
   at System.Drawing.Font.Initialize(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
   at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit)
   at ZedGraph.FontSpec.Remake(Single scaleFactor, Single size, Single& scaledSize, Font& font)
   at ZedGraph.FontSpec.Init(String family, Single size, Color color, Boolean isBold, Boolean isItalic, Boolean isUnderline, Color fillColor, Brush fillBrush, FillType fillType)
   at ZedGraph.Legend..ctor()
   at ZedGraph.PaneBase..ctor(String title, RectangleF paneRect)
   at ZedGraph.MasterPane..ctor(String title, RectangleF paneRect)
   at ZedGraph.ZedGraphControl..ctor()
   at AIWar.Windows.GraphsDisplay..ctor()
   at AIWar.Windows.GraphsDisplay..cctor()
   --- End of inner exception stack trace ---
   at AIWar.Windows.GraphsDisplay.Dispose(Boolean disposing)
   at System.ComponentModel.Component.Finalize()
« Last Edit: January 14, 2010, 10:09:07 am by x4000 »

Offline eRe4s3r

  • Core Member Mark II
  • *****
  • Posts: 2,825
Re: Cant start up game - unhandled errors
« Reply #1 on: January 14, 2010, 09:09:06 am »
I am not sure but this error message would indicate that your Arial font has become corrupted... What OS do you have? The error would indicate WinXP ;)

Go in your fonts directoy in Windows\Fonts and move the Arial font out in a different folder, and copy it back in, that should fix it. If not, i don't know where or how but theres ways to get the font from the windows cd.

Though if that doesn't help i don't know ;)
Proud member of the Initiative for Bigger Weapons EV. - Bringer of Additive Blended Doom - Vote for Lore, get free cookie

Offline Lister

  • Newbie
  • *
  • Posts: 3
Re: Cant start up game - unhandled errors
« Reply #2 on: January 14, 2010, 09:23:04 am »
 Figured it out - its missing the arial.ttf file from the fonts directory!
I added it in and everything is fine now
This is true for the steam version and the download from this site
How could this be? 

Offline Lister

  • Newbie
  • *
  • Posts: 3
Re: Cant start up game - unhandled errors
« Reply #3 on: January 14, 2010, 09:26:51 am »
Sorry missed your email eRe4s3r
I checked the windows fonts directory and it was there ok - i used it in notepad no problems
checked the size against another xp machine - 359k, the same
so I copied it from windows/font into the aiwars fonts directory and then it started straight up   

Offline eRe4s3r

  • Core Member Mark II
  • *****
  • Posts: 2,825
Re: Cant start up game - unhandled errors
« Reply #4 on: January 14, 2010, 09:30:27 am »
Yeah its a very very common thing that happens with fonts, the fonts in there need to be installed (which happens when you copy it in) but its possible for the fonts to break/corrupt while installed so then it thinks its installed but half of the file might not work.. not really sure what happens.. but re-adding them solves it.

Talk about weird windows bugs eh
Proud member of the Initiative for Bigger Weapons EV. - Bringer of Additive Blended Doom - Vote for Lore, get free cookie

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Cant start up game - unhandled errors
« Reply #5 on: January 14, 2010, 10:08:56 am »
Looks like this was already handled -- but yep, that's exactly what it was, the system copy of Arial being corrupt.  Putting it in the AI War folder will possibly also make it find that font, as you discovered, but best thing is to just make sure that the OS version gets fixed, as it sounds like you did.  Would likely cause problems in word processors, web pages, and a variety of other things that use arial (most likely making web pages fail over to verdana or MS Sans Serif or something of that sort).  Anyway, glad that was resolved!
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!