This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 13509 - Stack overflow in CultureInfo crashes Xamarin Studio on launch
: Stack overflow in CultureInfo crashes Xamarin Studio on launch
Product: Class Libraries
Classification: Mono
Component: CORLIB
: Trunk
: PC Mac OS
: Highest critical
: ---
Assigned To: Marek Safar
  Show dependency treegraph
Reported: 2013-07-26 11:07 EDT by Michael Hutchinson
Modified: 2013-08-26 03:13 EDT (History)
7 users (show)

See Also:
Test Case URL:
External Submit: ---

Crash log (237.09 KB, application/octet-stream)
2013-07-26 11:07 EDT, Michael Hutchinson

Description Michael Hutchinson 2013-07-26 11:07:32 EDT
Created attachment 4453 [details]
Crash log

A stack overflow in CultureInfo crashes Xamarin Studio on launch.
Comment 2 Marek Safar 2013-07-26 13:57:08 EDT
Fixed in master and 3-2 branch
Comment 3 Michael Hutchinson 2013-07-29 13:38:19 EDT
This completely breaks the runtime when MacOS Region (no Language) is set to
Taiwan. In addition, it has been reported against XA (see bug 13490).

Fix is

Bug was introduced in,
the issue is that CultureInfo initialization for zh_TW depends on ordinal
String.EndsWith, but ordinal String.EndsWith unnecessarily depends on
CultureInfo.CurrentCulture, so if the CurrentCulture is zh_TW then there is a
stack overflow.

Patch looks safe to hotfix.

We should also get it into XA and XI.
Comment 4 Michael Hutchinson 2013-07-29 13:38:26 EDT
*** Bug 13570 has been marked as a duplicate of this bug. ***
Comment 5 Michael Hutchinson 2013-07-29 14:47:02 EDT
This has been backported onto the Mono 3.2.1 branch and a hotfix release will
be made shortly. 

Rolf, Jon, can we get this fix into XA and XI?
Comment 6 Miguel de Icaza 2013-07-29 14:53:52 EDT
This patch is triple-rainbow safe.
Comment 7 Jonathan Pryor 2013-07-29 15:09:56 EDT
monodroid/a93d13b7 includes this fix. The fix will be in Xamarin.Android 4.8.2.
Comment 8 Michael Hutchinson 2013-07-29 15:20:55 EDT
It would be nice to have some unit tests so we don't break this badly again.
Comment 9 Rolf Bjarne Kvinge 2013-07-29 17:34:44 EDT
monotouch/monotouch-6.4-series: 8edb80749727b763ad4026087e679a621c937d89 has
the fix.

Not sure if it'll get into 6.4.1 or 6.4.2 though.
Comment 10 Marek Safar 2013-07-30 03:54:22 EDT
Added unit test for the fix
Comment 12 narayanp 2013-08-26 03:13:38 EDT
Today we have checked this issue with following builds

Mac Maverick 10.9
Lion 10.7.4
X.S 4.1.9(build 6)
Mono 3.2.2
X.Android 4.8.2-54

After changing the region language to Chinese(Taiwan) we are successfully able
to create android and iOS application in X.S.

Note You need to log in before you can comment on or make changes to this bug.