Xamarin.Forms 2.3.2-stable

BryanHunterXamBryanHunterXam USXamarin Team Xamurai
edited December 2016 in Xamarin.Forms Releases

Important notes

  • Xamarin.Forms 2.3.2 depends on a Xamarin installation of Cycle 7. Users upgrading from Xamarin.Forms 2.3.0 (or earlier) will experience numerous compile errors if they attempt to build without first upgrading their Xamarin installation.
  • When upgrading Xamarin.Forms take care not to simply "update all" as that will update the Xamarin.Android.Support packages to an incompatible version. More info here.

2.3.2-stable

Nuget package here.

Bug Fixes

  • 44018 - "Back button not working on root page in app with FormsAppCompatActivity"
  • 43161 - "Setting Accessory in ViewCellRenderer breakes layout" (PR)

2.3.2-pre2

Bug Fixes

  • 33561 - "33561 – Listview Pull-to-Refresh ActivityIndicator animation stuck when navigating away and then back again [pre-AppCompat]" (PR)
  • 41205 - "Override ListView.CreateDefault returns Parent ViewModel when used with null ItemTemplate" (PR)
  • 42680 - "UWP - Entry: changing the background color will only take effect after the entry gained focus."
  • 43214 - "Setting Listview.IsRefreshing to false does not work on second "pull"" (PR)
  • 43282 - "43282 – [UWP] Entry text disappears when entry loses focus"

2.3.2-pre1

Bug Fixes

  • 32033 - "WebView on Windows does not display local HTML files" (PR)
  • 40858 - " SearchBar LongClick Crashes on ListView Header" (PR)
  • 41205 - " Override ListView.CreateDefault, parameter is always string" (PR)
  • 41717 - " Picker allows multiple dialogs to be open causing the app to crash" (PR)
  • 42069 - "42069 - Garbage Collector can not collect pages that use ImageSource as a StaticResource"
  • 42075 - " IllegalStateException - Fragment does not have a view"
  • 42188 - " ViewCell with focus does not recognise being tapped using keyboard on UWP" (PR)
  • 42254 - "42254 - Getting error in Forms Previewer when user open the "HomePage.Xaml" of EffectDemo Sample" (PR)
  • 42326 - " Setting ActvityIndicator.Color Does Not Work Below Lollipop" (PR)
  • 42329 - " ListView in Frame and FormsAppCompatActivity Memory Leak"
  • 42557 - " [Android/AppCompat] Back button is not hidden/show when using NavigationPage.SetHasBackButton after navigation" (PR)
  • 42580 - " Forms.ListView crashes when ItemSource has item removed and another inserted" (PR)
  • 42687 - " Picker IsFocused property and Focused events broken on Android" (PR)
  • 42812 - " [Android] Color.Accent is hardcoded" (PR)

Other Fixes

  • Known issues with BarTextColor on Windows (PR)
  • Windows image loader error handling (PR)
«13

Posts

  • AdrianKnightAdrianKnight USMember ✭✭✭✭

    NavigationPage.SetHasNavigationBar(this, false); does not work properly. If I want to hide the navigation bar for the entire app, I have to call this method for each ContentPage. If memory serves me right, this used to work in a different way such that you'd need to call it once to hide the navigation bar. Can this be fixed in this release?

  • TonyDTonyD USMember ✭✭✭

    @BryanHunterXam - can we get a fix for 42335 and related XF Android Perf bugs in?

  • MichaelRumplerMichaelRumpler ATMember ✭✭✭✭

    Yes, I also have problems with the performance in my Android app like @TonyD mentioned in bug 42335.

    It seems like you started addressing the Android memory leaks with 42329 and 42069. That's good!

    33185 is assigned to @rmarinho with status: Confirmed and importance: High critical, but the last activity was 9 months ago. Are you really working on that one?

  • EZHartEZHart USXamarin Team Xamurai

    @MichaelRumpler I think 33185 was actually fixed a while ago as a side effect of some other Android fixes and just didn't get marked as Resolved. I just tested it on 2.3.1.114 with the attached test project and the issue was no longer occurring.

  • torshidtorshid USMember

    The issue 40824 seems not to be fixed (https://bugzilla.xamarin.com/show_bug.cgi?id=40824).

  • BradChase.2654BradChase.2654 USMember ✭✭✭

    I am experiencing the exact same slow downs. I have been trying to widdle them down and am having a tuff time without the use of a profiler. Our app runs smooth as butter on iOS but Android now is bogged down so much so that itll take up to 10 seconds for a button to perform its ui work. That same button on the other systems is instantaneous... What would be really helpful? If we had a profiler that didnt crash every couple seconds. Or a work around to be able and find the slow downs on android vs ios for ourselves to report.

  • RaymondKellyRaymondKelly USMember ✭✭✭
    edited August 2016

    I updated and now getting this error for iOS:

    Severity Code Description Project File Line Suppression State
    Error Can not resolve reference: C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Xamarin.iOS/v1.0/Facades/System.IO.FileSystem.Watcher.dll

    Ideas?

    Update:
    Found the answer here:
    https://forums.xamarin.com/discussion/72533/build-failures-after-visual-studio-update-3

    Basically different versions of Xamarin between my dev and build box.

  • BryanHunterXamBryanHunterXam USXamarin Team Xamurai

    @TonyD said:
    can we get a fix for 42335 and related XF Android Perf bugs in?

    @MichaelRumpler said:
    Yes, I also have problems with the performance in my Android app like @TonyD mentioned in bug 42335.

    @BradChase.2654 said:
    I am experiencing the exact same slow downs.

    Hi. The team has been discussing the Android perf comments, looking at 42335, and trying to figure what's up.

    Android has been (will be) much slower than its iOS counterpart. One big reason is that we're forced to do inflation without axml (much slower than inflating with axml).

    Question: does anyone have reproductions of an Android app that was previously fast that now runs slowly? We're trying to determine if some recent change has caused an Android slowdown, or if the comments are solely about the perf disparity between iOS and Android.

    Thanks!

  • DH_HA1DH_HA1 USMember ✭✭✭

    @BryanHunterXam "One big reason is that we're forced to do inflation without axml (much slower than inflating with axml)." how much slower are we talking about? Will you ever be able to close that gap?

  • TonyDTonyD USMember ✭✭✭

    @BryanHunterXam I don't think it's a new issue (reproes since at least 2.0 in our case) but it makes XF for Android unusable for slightly more complicated apps.

    There are a couple of bugs other than 42335 with repro steps where the delta between XF Android and Xamarin Android native is between 5x and 10x.

    This is one I had noticed before that is related but also still in NEW even though it has a reliable repro:
    https://bugzilla.xamarin.com/show_bug.cgi?id=40523

  • PaulDiPietroPaulDiPietro USXamarin Team Xamurai

    Hi @torshid: I saw your comment on 40824. It sounds like what you're describing is different from the original issue. Could you possibly file a new bug and attach a reproduction?

  • BradChase.2654BradChase.2654 USMember ✭✭✭

    @BryanHunterXam I agree with TonyD. It has been around for quite awhile now at least since 2.0. Our app is MASSIVE. That said we have one view that has the issues and it is about 10x slower than iOS. I can try to make a smaller package but it will definitely take quite a bit of time to make up dummy data and strip out the millions of lines of code that we have throughout the entire app.

  • MichaelRumplerMichaelRumpler ATMember ✭✭✭✭
    edited August 2016

    Thanks for coming back to us, @BrianHunterXam.

    I also did not see big differences between specific versions. I just recently updated from 2.1.0.6108 to 2.3.1 and now 2.3.2. Many things got better, but navigation from one page to the next still sometimes takes 2secs or even more. And my pages are really simple. Just ListViews/TableViews with up to 30 Cells. Each cell only shows 0-2 small icons (with images in all drawable folders) and two TextViews. That shouldn't be a problem at all.

    I have many GC messages in my output window. So I guess there are many objects allocated/released. Unfortunately the last time I tried to install the Profiler, it broke my machine completely so I didn't check with the Profiler yet. I'll give it another try.

  • EmanueleSabettaEmanueleSabetta ITBeta ✭✭✭

    @MichaelRumpler

    Unfortunately the last time I tried to install the Profiler, it broke my machine completely so I didn't check with the Profiler yet.

    Developing with Xamarin is quite an adventurous endeavour! :smiley:

  • DavidDunscombeDavidDunscombe GBMember ✭✭
    edited August 2016

    Not noticed any reduction of performance in Android from recent XF builds, but its still not good.

    Generally the way I get improved performance on Android is to either generate aggregate custom renderers to avoid the "viewgroup->view" double view creation that xamarin forms uses for each XF control - I assume to map XF layout to Android views. Or avoid the slow view creation interop entirely and use ngraphics or skiasharp to custom draw entire controls, but that is only really usable for things that don't require input.

    iOS XF on the other hand 'just works', getting Android barely acceptable is where 75% of my time is going.

    Maybe if SkiaSharp gets GPU support we will see a platform independent option (Xamarin.Forms.Android.Skia/Xamarin.Forms.iOS.Skia) (with native navigation/but non native rendered controls) in my experience most of the slowness in Android XF is due to the view creation interop...

  • rogiheerogihee NLMember ✭✭✭

    I also experience sloppy navigation for Android, which really detoriates app experience. iOS is fine. Forms is really shaping up nicely, but that big performance gap is really making me hesitate to use it for more important apps. I tend to not use axml for normal apps, so I'm okay with a little bit of performance degradation.

    Is it perhaps an idea to open up the Performance class and add some more statistics (cold start layout, update layout, navigation timing) etc so we can toy around with various options ourselves and get some more information where the painpoints are?

  • NMackayNMackay GBInsider, University ✭✭✭✭✭

    Agree with the Android performance comments, in the end I ended up disabling the animation when pushing a page, the page in question has 6 tabs and 5 RadListviews to be fair but I had to disable the animation and switch to FFImageLoading to get better app performance. I also have stuck with FormsApplicationActivity for now as AppCompat definitely has issues with Listviews within tabbed pages. I told a few people on the forum who were having issue to test with FormsApplicationActivity and generally the issues went away so maybe AppCompat needs more optimization and some of the performance issues people are experiencing might be reduced.

  • AnthonyRamirezAnthonyRamirez USUniversity ✭✭✭

    +1 Poor Android Performance :disappointed:

    I just upgraded from 1.5 to 2.3 and feel that Android is slower when navigating to a page. I do not have any statistics. Perhaps there are additional layout calculations that are taking place.

    iOS performance is great.

    I hope a solution is found soon :smile:

  • BradChase.2654BradChase.2654 USMember ✭✭✭

    I think what could REALLY help is putting some work in on the Profiler so we can use it to find slower parts. Issue for us right now is the Profiler just bombs constantly. Otherwise maybe if we had better ways to report where the slowdowns are?

  • BevanDiproseBevanDiprose NZMember

    Is there any possibility of resolving this issue for Windows Phone? https://bugzilla.xamarin.com/show_bug.cgi?id=36097
    I've had my app ready to publish for months now, but can't do so with this bug and each Xamarin update comes and goes I install it, test it and see that there is no resolution....

    Another description of the bug: https://forums.xamarin.com/discussion/65313/no-images-in-a-grid-inside-a-listview-on-windows-phone

  • NMackayNMackay GBInsider, University ✭✭✭✭✭

    @BevanDiprose

    Did you see my comment on FFImageLoading, might be worth a try if this a blocker to you releasing an app. I know it's not a fix as such.

  • BevanDiproseBevanDiprose NZMember

    @NMackay said:
    @BevanDiprose

    Did you see my comment on FFImageLoading, might be worth a try if this a blocker to you releasing an app. I know it's not a fix as such.

    @NMackay - Thank you for this suggestion it is much appreciated. In the next few days I'll convert things over to use FFImageLoading and hopefully that will allow me to publish. Will report back. Thanks.

  • RogerSchmidlinRogerSchmidlin CHUniversity ✭✭✭

    Disable a whole page from input or action: On iOS I can set the isEnabled of a page to false and all of the view controls, including all views in a listview are disabled. This doesn't work on Android. All views are still active and selectable.

  • @BryanHunterXam

    Android has been (will be) much slower than its iOS counterpart. One big reason is that we're forced to do inflation without axml (much slower than inflating with axml).

    I wonder though if there's a way to generate the required axml files during build time so that XF can avoid the runtime performance hit. I.e. I'm using compiled xaml files. That could possibly generate the axml files in the android layouts folder instead of at runtime?

  • rogiheerogihee NLMember ✭✭✭

    @CliffCawley.Skedulo I was thinking the exact same thing...Having such a tool will help also in checking what kind of Forms layout produces what kind of axml, and then we can perhaps find problematic scenarios quicker to see performance bottlenecks. Probably due to nesting a lot of different layout types too much (Relative/Lineair etc).

    Is there a way currently to see at compile or runtime what the android layout is of a Forms page?

    @BryanHunterXam: I also wonder where the main gap lies between manual inflating without axml in C# and Forms inflation.

  • DH_HA1DH_HA1 USMember ✭✭✭

    @DavidDunscombe "Generally the way I get improved performance on Android is to either generate aggregate custom renderers to avoid the "viewgroup->view" double view creation that xamarin forms uses for each XF control "

    how do you do this? do you have an example? how much better perf do you get?

  • BjornBBjornB USMember ✭✭✭

    @BryanHunterXam said:

    @TonyD said:
    can we get a fix for 42335 and related XF Android Perf bugs in?

    @MichaelRumpler said:
    Yes, I also have problems with the performance in my Android app like @TonyD mentioned in bug 42335.

    @BradChase.2654 said:
    I am experiencing the exact same slow downs.

    Hi. The team has been discussing the Android perf comments, looking at 42335, and trying to figure what's up.

    Android has been (will be) much slower than its iOS counterpart. One big reason is that we're forced to do inflation without axml (much slower than inflating with axml).

    Question: does anyone have reproductions of an Android app that was previously fast that now runs slowly? We're trying to determine if some recent change has caused an Android slowdown, or if the comments are solely about the perf disparity between iOS and Android.

    Thanks!

    I have a brilliant example (android) where performance is reduced so much that it forces me to not update, im staying on cycle 6 and XF 2.1.0.6529, the greatest performance decrease comes when i update Xamarin for VS to cycle 7. I cant really hand you the code since its a big project for a customer involved with security. But i can give you full acces to my environment and let you deep dive into anything you want.

  • DH_HA1DH_HA1 USMember ✭✭✭

    @BjornB I am noticing android perf issues with 2.2 and 2.3 as well. 2.1 is better. Trying to figure out what changed that caused the slowdown.

  • MichaelRumplerMichaelRumpler ATMember ✭✭✭✭

    @BjornB said:
    I have a brilliant example (android) where performance is reduced so much that it forces me to not update, im staying on cycle 6 and XF 2.1.0.6529, the greatest performance decrease comes when i update Xamarin for VS to cycle 7. I cant really hand you the code since its a big project for a customer involved with security. But i can give you full acces to my environment and let you deep dive into anything you want.

    I also couldn't run cycle7 at all in the beginning. My output window was full of GC and thread started/stopped messages and the app didn't react anymore. A series of bugs prevented me from updating to cycle7 and the newest Forms. It took half a year until all have been fixed and I could update. The GC messages do not come that often anymore, but the GC still seems to stop the app for a second during many navigation requests.

    I did not get anything useful out of the Xamarin Profiler, but I added debug output with timestamps and I see these messages which should only be milliseconds apart split by a second and a GC message.

  • MichaelRumplerMichaelRumpler ATMember ✭✭✭✭

    Here is a sample from my output window:

    [0:] 11:14:50.770: DocNavigationViewModel.NavigateProperties[197]: Navigated
    08-18 11:14:51.702 I/art ( 4427): Explicit concurrent mark sweep GC freed 5041(231KB) AllocSpace objects, 2(348KB) LOS objects, 40% free, 10MB/17MB, paused 448us total 18.938ms
    08-18 11:14:51.706 D/Mono ( 4427): GC_OLD_BRIDGE num-objects 295 num_hash_entries 47142 sccs size 25747 init 0.00ms df1 148.88ms sort 30.32ms dfs2 396.90ms setup-cb 3.47ms free-data 175.82ms links 181377/181377/2912009/115 dfs passes 228814/207124
    08-18 11:14:51.706 D/Mono ( 4427): GC_MINOR: (Nursery full) pause 155.65ms, total 155.80ms, bridge 0.00ms promoted 224K major 4816K los 783K
    [0:] 11:14:51.812: DocNavigationViewModel.OnItemTapped[188]: End of OnItemTapped. IsNavigating set to False

    The first and last lines are from my code. Between those I just return from a method and set a bool flag. The rest of those 1.042 seconds between those lines the GC blocked the app.

  • rogiheerogihee NLMember ✭✭✭

    @MichaelRumpler : interesting, I read in the Android docs that the GC checks ALL objects in the graph that are connected to an Activity.

    So if you have something like myActivity.MyViewModel.MyDocumentsList(1000) it means the GC will "see" the viewmodel and all 1000 objects that should be C# only but perhaps still needs to pass the Java GC bridge.

  • MichaelRumplerMichaelRumpler ATMember ✭✭✭✭

    Thanks Rogier, but I don't have any (additional) fields in my Activity.

  • JohnHardmanJohnHardman GBUniversity ✭✭✭✭✭
    edited August 2016

    @RogerSchmidlin

    Disable a whole page from input or action: On iOS I can set the isEnabled of a page to false and all of the view controls, including all views in a listview are disabled. This doesn't work on Android. All views are still active and selectable.

    I raised a bug for that over a year ago ( https://bugzilla.xamarin.com/show_bug.cgi?id=30384 ). Unfortunately, the response was "At this time there are no plans to implement any changes around this issue."

    I'm not sure what the point of IsEnabled on a page is without implementing this... (a bit like IsBusy on a page, which is currently ok on iOS but broken in various ways on Android, WinRT and UWP).

  • DanArdeleanDanArdelean ITInsider, Beta, University ✭✭

    Updated to this build in order to fix this crash:

    java.lang.IllegalStateException: Fragment does not have a view

    The problem is that on the new build
    protected override bool OnBackButtonPressed()

    does not fire anymore on a page derived from MasterDetailPage on Android. Is this a known bug? It was working with the previous version.

    Actually all the back navigation on Android, in my case, does not work anymore.

    Thanks,
    Dan

  • EmanueleSabettaEmanueleSabetta ITBeta ✭✭✭

    @BradChase.2654 said:
    Our app runs smooth as butter on iOS but Android now is bogged down so much so that itll take up to 10 seconds for a button to perform its ui work. That same button on the other systems is instantaneous...

    Not only the performances are not improving, but in my experience they are actually getting worse at each release. This is a fatal flaw for Xamarin.Forms on Android.

    I think we could honestly say that Xamarin.Forms is an excellent cross platform framework for iOS and Win, but Android is just not there yet. They have to rethink the droid platform architecture from the ground up, because the current one is clearly flawed.

  • WiktorKonckiWiktorKoncki USMember ✭✭

    Can we have some info from the team about what is happening with this release? It is almost a month since last version and you removed what was supposed to be the big new feature in it. What are you working on? Will this version be bug fixes only?

  • OddbjornBakkeOddbjornBakke NOMember ✭✭

    @EmanueleSabetta
    out of curiosity, are you using FormsApplicationActivity or FormsAppCompatActivity? Or is this with both?

  • BjornBBjornB USMember ✭✭✭

    i have an old android app built with XF 1.3.X It is sooo smooth compared to what i am building now (2.1.X). And I cant upgrade anymore, that would just slow it down to much. Im using FormsAppCompatActivity nowadays

  • jonojono USMember ✭✭

    Hands up for another person suffering Andriod pains. Are people describing slow downs here with the debugger connected to the app or on the device?

    I see massive speed differences with the debugger, and it slows my app to the point of 200ms SEG FAULT errors. Ive been struggling heaps with this, but for me it doesnt feel like is an XF issue entirely (although i totally understand it shouldnt be GC'ing that much), but a a debugger issue?

    So for instance, i came back to a project after 6 months that suffered terribly from pauses. But after upgrading to the latest everything (vs2013), the first few days of dev was really pleasant, no pauses, smooth navs. Then after i experienecd a debugger hang (crash out of debug session) on next session i started getting pauses. I backed out all my changes thinking i had introduced them, but the pauses remained? I reset the PC and deleted/installed the andriond player, (API22, nexus) and it came good again for a few hours. I repeated this "solution" for a few days whenever i got pauses, but yeh, now i pretty much cant debug anymore, because the GC pauses cause the 200ms timeouts to occour and i get dumped out of debugging. That said, if i run the solution without the debugger attached, i dont get any pauses or crashes?!

    Using appCompat activity.

    Keen to help in out in getting to the bottom of this. Its a deal breaker for any kind of productivity for me ATM.

«13
Sign In or Register to comment.