Bug 13509 - Stack overflow in CultureInfo crashes Xamarin Studio on launch
Summary: Stack overflow in CultureInfo crashes Xamarin Studio on launch
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib (show other bugs)
Version: master
Hardware: PC Mac OS
: Highest critical
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
: 13570 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-26 11:07 UTC by Mikayla Hutchinson [MSFT]
Modified: 2013-08-26 03:13 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Crash log (237.09 KB, application/octet-stream)
2013-07-26 11:07 UTC, Mikayla Hutchinson [MSFT]
Details

Description Mikayla Hutchinson [MSFT] 2013-07-26 11:07:32 UTC
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 UTC
Fixed in master and 3-2 branch
Comment 3 Mikayla Hutchinson [MSFT] 2013-07-29 13:38:19 UTC
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 https://github.com/mono/mono/commit/fc4074b399431e9c24d91419281fe9fcec7c285c

Bug was introduced in https://github.com/mono/mono/commit/2002e457787e92c444badb1b20ac6a141deee39a, 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 Mikayla Hutchinson [MSFT] 2013-07-29 13:38:26 UTC
*** Bug 13570 has been marked as a duplicate of this bug. ***
Comment 5 Mikayla Hutchinson [MSFT] 2013-07-29 14:47:02 UTC
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 [MSFT] 2013-07-29 14:53:52 UTC
This patch is triple-rainbow safe.
Comment 7 Jonathan Pryor 2013-07-29 15:09:56 UTC
monodroid/a93d13b7 includes this fix. The fix will be in Xamarin.Android 4.8.2.
Comment 8 Mikayla Hutchinson [MSFT] 2013-07-29 15:20:55 UTC
It would be nice to have some unit tests so we don't break this badly again.
Comment 9 Rolf Bjarne Kvinge [MSFT] 2013-07-29 17:34:44 UTC
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 UTC
Added unit test for the fix
Comment 12 narayanp 2013-08-26 03:13:38 UTC
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
X.iOS 6.4.4.11

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.


Create a new report for Bug 13509 on Developer Community or GitHub if you have new information to add and do not yet see a matching report.

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments


Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Related Links: