Author Topic: [Solved] Help System.Runtime.Serialization.SerializationException  (Read 4461 times)

Offline Bekas

  • Newbie
  • *
  • Posts: 2
Hello.

I'm getting one error wen i try to open the game.

24-10-2009 11:32:46 (2.0)
-----------------------------------CurrentDomain_UnhandledException-----------------------------------System.Runtime.Serialization.SerializationException: Binary stream '39' does not contain a valid BinaryHeader. Possible causes are invalid stream or object version change between serialization and deserialization.
   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at AIWar.Serializer.Deserialize(Byte[] Data) in C:\vcprojs\AIWar\Framework\Serializer.cs:line 31
   at AIWar.GameSettings.LoadFromDisk() in C:\vcprojs\AIWar\Framework\GameSettings.cs:line 660
   at AIWar.GameForm..ctor() in C:\vcprojs\AIWar\GameForm.cs:line 220
   at AIWar.Program.Main() in C:\vcprojs\AIWar\Program.cs:line 21


Yesterday i could play fine  :(
« Last Edit: November 12, 2009, 05:59:34 pm by Fiskbit »
(I'm not english sorry for my mistakes)

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Help System.Runtime.Serialization.SerializationException
« Reply #1 on: October 24, 2009, 09:46:08 am »
This is a first, but it appears that your settings.dat file has become corrupted. Most likely the cause is a bad sector on your hard drive (scandiak would be a good idea for protecting the rest of your computer), or some sort of malware on your system (virus and spyware scanning may also be a good idea).

Your settings.dat file will be in the same folder as the error message you got below. Simply delete the old one, and the game will create a new one for you. If you are playing a non-steam version you will need to re-enter your license key, and on any version you will needto reselect your settings and recreate your profile. Your savegames are stored elsewhere and should be easy to load to get your local highscores and local achievements back.

Not with ai war, but with other programs, I have seen both malware and bad disks cause this sort of thing, so it would be a good idea to take this as an early warning sign and scan for issues before something else is corrupted -- I've certainly been there!
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Bekas

  • Newbie
  • *
  • Posts: 2
Re: Help System.Runtime.Serialization.SerializationException
« Reply #2 on: October 24, 2009, 09:58:57 am »
it worked.

Thx  :)
(I'm not english sorry for my mistakes)

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Help System.Runtime.Serialization.SerializationException
« Reply #3 on: October 24, 2009, 10:03:03 am »
Sure thing!
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!