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.
Created attachment 9733 [details]
In custom renderer OldElement with null value consistently is called in iOS (which is correct),
but never gets called in Android.
In the attached test project. When we run it just press Go and Back buttons.
In iOS you will see messages "OldElement is NOT null" in Output window but in Android you will not.
I have checked this issue after following the steps mentioned in bug description and getting the same issue OldElement is NOT null" in Output window is not appears when we run Android project, however we are getting this if we run iOS application.
Hence marking this as Confirmed.
Application output for Android: https://gist.github.com/Mohit-Kheterpal/244319d6ec8abb006d27
Application output for iOS: https://gist.github.com/Mohit-Kheterpal/6ce4b51fa65496dffd45
ide logs: https://gist.github.com/Mohit-Kheterpal/9e322195cf88e59c6226
Environment info:=== Xamarin Studio ===
Version 5.7.1 (build 17)
Installation UUID: 3dbf10c4-ed30-4e55-8a8b-1704777c7b5f
Mono 3.12.0 ((detached/de2f33f)
GTK+ 2.24.23 (Raleigh theme)
Package version: 312000076
=== Xamarin.Android ===
Version: 188.8.131.52 (Trial Edition)
Android SDK: /Users/apprpject/Desktop/android-sdk-macosx
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
4.4.87 (API level 20)
5.0 (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
=== Apple Developer Tools ===
Xcode 5.1.1 (5085)
=== Xamarin.iOS ===
Version: 184.108.40.206 (Trial Edition)
Build date: 2015-01-31 13:50:55-0500
=== Xamarin.Mac ===
Version: 220.127.116.11 (Trial Edition)
=== Build Information ===
Release ID: 507010017
Git revision: 0bc7d3550b6b088ac25b08dcf7bbe73bcc8658b3
Build date: 2015-02-03 19:43:29-05
Xamarin addins: f7b7d34419c9ec24501bfa7c658e80a6305613e0
=== Operating System ===
Mac OS X 10.8.5
Darwin localhost 12.5.0 Darwin Kernel Version 12.5.0
Sun Sep 29 13:33:47 PDT 2013
Screencast for above issue: http://www.screencast.com/t/APwR1QH8IvwA
Several bits of feedback here:
1) Use VisualElementRenderer<T> not ViewRenderer if you are not calling SetNativeControl. This will prevent crashing AND save some performance.
2) It is known that Element is not assigned back to null on android before dispose. While we would very much like to do this, we view this as an ABI break now and feel it is too risky of a change to make. Too many existing renderers out there would break due to this change. On all platforms you must override dispose and handle disposing properly. In a 2.0 where we can do a full ABI break we will likely change this.