Author Topic: Unhandled exception  (Read 2304 times)

Offline pierre dupon

  • Newbie Mark III
  • *
  • Posts: 49
Unhandled exception
« on: October 01, 2010, 11:35:06 am »
I'm getting this unhandled exception when I open the game. I'm running 3.120 on windows 7 and it was working fine until recently. What to do?

01/10/2010 16:27:08 (3.1.2.0)
-----------------------------------CurrentDomain_UnhandledException-----------------------------------System.TypeInitializationException: The type initializer for 'System.Globalization.TextInfo' threw an exception.
   at System.Globalization.TextInfo.GetNativeTextInfo(Int32 cultureID)
   at System.Globalization.TextInfo.get_InvariantNativeTextInfo()
   at System.Globalization.TextInfo.IndexOfStringOrdinalIgnoreCase(String source, String value, Int32 startIndex, Int32 count)
   at System.String.IndexOf(String value, Int32 startIndex, Int32 count, StringComparison comparisonType)
   at Microsoft.Win32.RegistryKey.ValidateKeyName(String name)
   at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
   at Microsoft.Win32.RegistryKey.OpenSubKey(String name)
   at Kjs.AppLife.Update.Controller.UpdateController.c()
   at Kjs.AppLife.Update.Controller.UpdateController.set_ApplicationId(Guid value)
   at AIWar.GameForm..ctor() in C:\vcprojs\AIWar\GameForm.cs:line 567
   at AIWar.Program.Main() in C:\vcprojs\AIWar\Program.cs:line 20

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Unhandled exception
« Reply #1 on: October 01, 2010, 11:44:35 am »
That's really odd -- looks like there is something messed up in your registry, this is not one I've ever seen before.  It's trying to find the name of the "text culture" on your machine (e.g., English US, English UK, German, Chinese, whatever), and when it looks in the registry it dies.  This is all part of the lower-level .NET class libraries, so it's a sign that something is well and truly hosed there; possibly a reinstall of .net would solve it, but given the error I honestly am not sure if that's something more global on windows.  A reinstall of the OS would definitely solve it, of course, but that's overkill -- but when I search on google, the only similar errors I find for this are on Linux in WINE, so it's not something that's been discussed more widely (and that's particularly odd).

That's not the answer you were looking for, I'm certain.  And, this is exactly the sort of "there's something mysterious wrong with my OS or .NET) issue that prompted our shift to Unity 3D for the upcoming AI War 4.0.  The bad news is that I'm really not sure what to tell you -- reinstalling .NET might help or might not, and it will take an hour of unattended computer time and a reboot to try it.  The good news is that we have the first beta of AI War 4.0 coming out today, and while it's not polished or 100% complete, it's at least functional and shouldn't have this issue because it doesn't use .NET.  So that would be one way to escape from an issue like this without going through the pain of trying to figure out what is up with .NET/windows, at least -- I wish AI War 4.0 were wholly done so I could just point you to that for sure, but bear in mind there's another 2-3 weeks of baking that needs before it will be at the same quality/stability as the prior version of AI War.
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 pierre dupon

  • Newbie Mark III
  • *
  • Posts: 49
Re: Unhandled exception
« Reply #2 on: October 01, 2010, 12:33:02 pm »
Ok... So are you saying there's something fundamental wrong with my computer, or my registry or something?
That's not good... If you can't suggest something I'll use 4.0 when it's out and hope the registry problem isn't serious.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Unhandled exception
« Reply #3 on: October 01, 2010, 12:42:05 pm »
Well, bear in mind that the registry is huge, sprawling, and shared by many applications.  I spent years as a sysadmin, and I feel confident in saying that there is something wrong with every computer's registry if it's been in normal use for more than a few months or even weeks.  It's one reason I'm so against the registry in the first place, it harks back to the "dll hell" days.

But I digress.  In your specific case, one of two things is wrong:
1. Either something is wrong with how windows talks about what language you're using in general (I have no idea how to fix this).
2. Or something is wrong with how windows talks about what language you're using in the context of the .net framework (a reinstall of the .net framework would fix this).

In either case, only applications that need to talk about what language you're using would have any trouble -- most don't.  In the case of AI War, the old updater checks for your system language to see what language the updater should be shown in (German, Russian, etc).  And that's why you see the Kjs.AppLife.Update.Controller.UpdateController line in the error stack trace there.

So I doubt your windows install is horribly messed up or anything -- the vagaries and inconsistencies of windows are a prime factor behind our shift to unity, which touches as little of that as possible. ;)
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 pierre dupon

  • Newbie Mark III
  • *
  • Posts: 49
Re: Unhandled exception
« Reply #4 on: October 01, 2010, 01:31:23 pm »
Ok, thanks for the help, nothing else is going obviously wrong so I'll just use 4.0 and addrress the problem if it comes up somewhere else.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Unhandled exception
« Reply #5 on: October 01, 2010, 02:30:11 pm »
My pleasure, and glad to help.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

 

SMF spam blocked by CleanTalk