Bug 4594 - API Demo exception thrown on Graphics->Alpha Bitmap on Release configuration
Summary: API Demo exception thrown on Graphics->Alpha Bitmap on Release configuration
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.1.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-04-23 11:37 UTC by PJ
Modified: 2012-04-24 14:26 UTC (History)
3 users (show)

Tags:
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:
Status:
RESOLVED FIXED

Description PJ 2012-04-23 11:37:25 UTC
Objective: Getting exception 'System.ArgumentException' after clicking Graphics->Alpha Bitmap.

Steps to reproduce:
1. Open Application.
2. Go to Graphics->Alpha Bitmap.

Actual result:
Application throwing exception after clicking 'Graphics->Alpha Bitmap'.

Expected result:
Application should work properly.

Supplemental information:

Error trace:
Unhandled Exception: System.ArgumentException: Couldn't bind to method 'GetReadHandler'.
E/mono ( 8723): at System.Delegate.GetCandidateMethod (System.Type type, System.Type target, System.String method, BindingFlags bflags, Boolean ignoreCase, Boolean throwOnBindFailure) [0x00000] in <filename unknown>:0
E/mono ( 8723): at System.Delegate.CreateDelegate (System.Type type, System.Type target, System.String method, Boolean ignoreCase, Boolean throwOnBindFailure) [0x00000] in <filename unknown>:0
E/mono ( 8723): at System.Delegate.CreateDelegate (System.Type type, System.Type target, System.String method) [0x00000] in <filename unknown>:0
E/mono ( 8723): at Android.Runtime.JNIEnv.RegisterJniNatives (IntPtr typeName_ptr, Int32 typeName_len, IntPtr jniClass, IntPtr methods_ptr, Int32 methods_len) [0x00000] in <filename unknown>:0
E/mono ( 8723): at (wrapper delegate-invoke) <Module>:invoke_intptr__this___intptr_intptr_string_string (intptr,intptr,string,string)
E/mono ( 8723): at Android.Runtime.JNIEnv.GetMethodID (IntPtr kls, System.String name, System.String signature) [0x00000] in <file

Environment:
mono-android-4.1.1.188999709
MonoDevelop-2.9.5 13c2b8900bc489291f789c8a41b44b04020a4a65
Mac 10.7.3
Device (LG P500)
Target Framework: 2.2 Froyo
Comment 1 PJ 2012-04-23 11:40:13 UTC
On Debug:


Error trace:
System.MissingMethodException: Method not found: 'Android.Graphics.Canvas.DrawColor'.
at Android.Views.View.n_OnDraw_Landroid_graphics_Canvas_ (intptr,intptr,intptr) [0x00010] in /Users/builder/data/lanes/monodroid-mac-master/41c055cd/source/monodroid/src/Mono.Android/platforms/android-8/src/generated/Android.Views.View.cs:6891
at (wrapper dynamic-method) object.1c758bd1-3a71-4ea9-963a-d34932371000 (intptr,intptr,intptr) <IL 0x00012, 0x00033>
Comment 2 Jonathan Pryor 2012-04-23 22:34:31 UTC
Are you sure that the on-device Mono.Android.Platform package is correct. For intermediate versions, the version numer is unchanged (e.g. 4.1.1) even when they've had ABI changes. You need to ensure that you remove all Mono packages from the device when you install a new Mono for Android install, so that the device has the matching packages.

To confirm, remove the Mono packages from the device and re-install the app on the device.
Comment 3 PJ 2012-04-24 11:35:25 UTC
Verified the fix personally as per 4592.
Comment 4 PJ 2012-04-24 12:41:42 UTC
Nischal says that he can repo the issue even after fully cleaning the device, so I will check on more than one device and report back.
Comment 5 PJ 2012-04-24 14:05:29 UTC
Ok - so after a bit of testing myself I found that the issue manifests only on Release configuration, and the device doesn't seem to matter. (Repro'd on the device I originally saw the correct behavior on in comment 3)

Re-opening.
Comment 6 Jonathan Pobst 2012-04-24 14:26:09 UTC
The Release issue is fixed in 6755388de0f4b6b0d88fca157c4633e1b1a4f3cc.