Bug 5311 - LockRecursionException is defined in mscorlib and System.Core
Summary: LockRecursionException is defined in mscorlib and System.Core
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.3.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
Depends on:
Reported: 2012-05-24 18:17 UTC by Tom Philpot
Modified: 2012-05-25 08:03 UTC (History)
2 users (show)

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

AppDelegate.cs that produces a CS0433 compiler error. (1.01 KB, application/octet-stream)
2012-05-24 18:17 UTC, Tom Philpot

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.

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.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Tom Philpot 2012-05-24 18:17:31 UTC
Created attachment 1951 [details]
AppDelegate.cs that produces a CS0433 compiler error.

Any code which is compiled under MonoTouch fails with CS0433 when LockRecursionException is used.

The problem appears to be that System.Core/System.Threading/LockRecursionException.cs needs to have add an || MOBILE to the #if NET_4_0 to match the conditional in the corlib version.

Attached is an AppDelegate.cs generated by MonoDevelop which exhibits the behavior on the latest version of Mono touch.
Comment 1 Sebastien Pouliot 2012-05-24 22:04:02 UTC
You're right, it won't compile. Thanks for reporting.
Comment 2 Sebastien Pouliot 2012-05-24 22:22:52 UTC
master: adb738deccda428a1921bc4c43a6da4f15df2be8
5.2-series: 356b38e5a16d9ffd7f00b5a937aede70e1b085ea

QA: unit test added on master

That won't be available until 5.2.13 or 5.3.5 (5.3.4 is already tagged). If this is blocking you we can likely (if you use a recent MT version) provide you with an hot fix. Thanks again.
Comment 3 Tom Philpot 2012-05-25 00:50:04 UTC
I saw that Marek fixed a similar issue in #5192 yesterday (https://github.com/mono/mono/commit/1479cf60a01b8cc5ecf0bc5d93db88450071c610), so I'm surprised this was still affecting master today.
Comment 4 Sebastien Pouliot 2012-05-25 08:03:51 UTC
It likely did not affect *mono* master. But since was not backported to mono-2-10, nor in mobile-master (based on mono-2-10) then it was not part of MonoTouch's master (which is what I tested and fixed with the above revision numbers).