Bug 10232 - SRE: rx crashes with MethodAccessException
Summary: SRE: rx crashes with MethodAccessException
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 4.6.x
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2013-02-12 04:54 UTC by Atsushi Eno
Modified: 2013-03-26 14:15 UTC (History)
2 users (show)

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

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 Atsushi Eno 2013-02-12 04:54:45 UTC
This is looking similar to bug #9976 and even mentioned on that bug but still exists.

Microsoft rx tests uncovers compile time issue on the rx unit tests and/or any underlying later:

steps to run:

open repro, go to Rx/NET/Source/Rx_Xamarin folder and open Rx_Xamarin_android.sln. It is exactly the same one that can be also opened from mono/external/rx/Rx/... if you have ever built mono from recent mono master that contains rx.

Build and debug, then tap "Run everything".

Actual result:

It crashes.

System.MethodAccessException: Method `System.Reactive.TailRecursiveSink`1<int>:Dispose ()' is inaccessible from method `System.Reactive.Linq.Observαble.Concat`1/_<int>:OnError (System.Exception)'

  at System.Reactive.Linq.Observαble.Throw`1+_[System.Int32].Invoke () [0x00000] in /svn/mono/external/rx/Rx/NET/Source/System.Reactive.Linq/Reactive/Linq/Observable/Throw.cs:44
  at System.Reactive.Concurrency.Scheduler.Invoke (IScheduler scheduler, System.Action action) [0x00000] in /svn/mono/external/rx/Rx/NET/Source/System.Reactive.Core/Reactive/Concurrency/Scheduler.Simple.cs:82
  at System.Reactive.Concurrency.ThreadPoolScheduler+<Schedule>c__AnonStorey8`1[System.Action].<>m__D (System.Object _) [0x00010] in /svn/mono/external/rx/Rx/NET/Source/System.Reactive.PlatformServices/Reactive/Concurrency/ThreadPoolScheduler.cs:51

Expected result:

no crash.

This does NOT reproduce if you are on Windows i.e. without smcs.

The same last known good revision on bug #9976 may also apply (i.e. then regression).
Comment 1 Miguel de Icaza [MSFT] 2013-02-18 10:33:31 UTC
This looks like a compiler bug.

Atsushi, does this happen with regular "mcs" using the 3.0-based MonoDroid.
Comment 2 Marek Safar 2013-02-20 16:46:58 UTC
There is no info on any environment which can reproduce the issue. Does same error happen with master mono rx ?
Comment 3 Atsushi Eno 2013-02-21 03:56:46 UTC
It is *obvious* that it is on Mono for Android. Have a look at the product category.
Comment 4 Atsushi Eno 2013-02-21 03:57:13 UTC
I'll try 3.0 once it is fixed to build without any problem.
Comment 5 Atsushi Eno 2013-03-26 14:15:10 UTC
This specific issue is gone with 3.0 compiler (not a big surprise because Rx assemblies built with master mono worked and rejected further testing only for "it was not supported compiler" excuse).