Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
# Steps to reproduce
I've created a dedicated repo with sample project to reproduce this bug here:
Application starts w/o problems with v188.8.131.52 and thorws an error with v184.108.40.206
I'm using RecyclerView with custom RecyclerView.Adapter, and during run-time when I try to attach handler to my custom action an exception is thrown.
During runtime this in this line:
viewHolder.OnItemClick += HandleItemClick;
This exception is thrown:
System.InvalidProgramException: Invalid IL code in
# Supplemental info (logs, images, videos)
04-07 17:48:09.515 D/OpenGLRenderer( 2146): Enabling debug mode 0
An unhandled exception occured.
04-07 17:48:12.591 D/Mono ( 2146): DllImport attempting to load: '/system/lib/liblog.so'.
04-07 17:48:12.591 D/Mono ( 2146): DllImport loaded library '/system/lib/liblog.so'.
04-07 17:48:12.591 D/Mono ( 2146): DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
04-07 17:48:12.591 D/Mono ( 2146): Searching for '__android_log_print'.
04-07 17:48:12.591 D/Mono ( 2146): Probing '__android_log_print'.
04-07 17:48:12.591 D/Mono ( 2146): Found as '__android_log_print'.
04-07 17:48:12.591 I/MonoDroid( 2146): UNHANDLED EXCEPTION:
04-07 17:48:12.591 I/MonoDroid( 2146): System.InvalidProgramException: Invalid IL code in Xamarin.Sample.AbstractRecyclerAdapter`2<TKey_REF, TValue_REF>:OnCreateViewHolder (Android.Views.ViewGroup,int): IL_0040: stloc.2
04-07 17:48:12.591 I/MonoDroid( 2146): at Android.Support.V7.Widget.RecyclerView+Adapter.n_OnCreateViewHolder_Landroid_view_ViewGroup_I (IntPtr jnienv, IntPtr native__this, IntPtr native_parent, Int32 viewType) [0x00011] in <filename unknown>:0
04-07 17:48:12.591 I/MonoDroid( 2146): at (wrapper dynamic-method) System.Object:5c6e383e-022f-41cc-91ee-b783d994f5f4 (intptr,intptr,intptr,int)
04-07 17:48:12.595 I/dalvikvm( 2146): Could not find method java.lang.Throwable.<init>, referenced from method md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable.<init>
04-07 17:48:12.595 W/dalvikvm( 2146): VFY: unable to resolve direct method 19226: Ljava/lang/Throwable;.<init> (Ljava/lang/String;Ljava/lang/Throwable;ZZ)V
04-07 17:48:12.595 D/dalvikvm( 2146): VFY: replacing opcode 0x70 at 0x0000
An unhandled exception occured.
# Test environment (full version information)
Visual Studio Enterprise 2015 Version 14.0.24720.00 Update 1
Windows 10 Enterprise
Any news on this bug? Is it XA specific or a runtime/compiler issue?
Piotr, could you please attach archive with content of the obj/ directory in your project?
Rodrigo, looks like runtime/compiler issue to me. The XA linker adds only Newobj and Throw opcodes so far, so if the broken IL is the "IL_0040: stloc.2" then it might be compiler.
It will be clearer once we have the actual assembly.
Ok, I'm CC'ing Marek on this one in case it's a mcs issue.
I cannot compile the project. Could you upload project with correct references or at least compiled bin/ folder output?
Hi, I've just updated the hint path of references.
I cannot reproduce it using the latest alphas
I verified this app with builds from C7 and I am not able to reproduce the issue.
Env info: https://gist.github.com/a5e233e2ab47e1348003007476f5163f