@BjornB I noticed these button issues too, but I thought they were so obvious that they were working on the. Is there an official word on this fix from Xamarin?
at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in :0
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in :0
at Android.Views.View.Measure (System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x0002b] in /Users/builder/data/lanes/4695/9dbc4c53/source/xamarin-android/src/Mono.Android/obj/Release/android-25/mcw/Android.Views.View.cs:13977
at Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer.Xamarin.Forms.Platform.Android.IVisualElementRenderer.GetDesiredSize (System.Int32 widthConstraint, System.Int32 heightConstraint) [0x0005f] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\PickerRenderer.cs:77
at Xamarin.Forms.Platform.Android.Platform.Xamarin.Forms.Internals.IPlatform.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x00000] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Renderers\ListViewAdapter.cs:92
at Xamarin.Forms.VisualElement.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0002d] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:632
at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:601
at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:477
at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:535
at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.View child, Xamarin.Forms.Rectangle region, Xamarin.Forms.SizeRequest childSizeRequest) [0x000eb] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:269
at Xamarin.Forms.StackLayout.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00092] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\StackLayout.cs:54
at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x000c7] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:235
at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:200
at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:637
at Xamarin.Forms.Layout+<>c.b__39_0 () [0x00080] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:338
at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in /Users/builder/data/lanes/4695/9dbc4c53/source/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:36
at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in /Users/builder/data/lanes/4695/9dbc4c53/source/xamarin-android/src/Mono.Android/obj/Release/android-25/mcw/Java.Lang.IRunnable.cs:81
at (wrapper dynamic-method) System.Object:7081af60-9bb1-4386-8e8b-480d3931419c (intptr,intptr)
Hopefully combined with the other PRs for ObjectDisposedException this eliminates the majority of the remaining issues with the fast renderers.
However, have just found one last problem with image sizing on Android related to changes in XF 2.3.5.
In certain conditions, the images overlap and do not size correctly on layout.
Working on a repro project and will ticket on BugZilla later today.
Further testing shows that Aspect=AspectFill may be being handled differently in the new fast ImageRenderer.
Repro project and BugZilla ticket to follow.
Nested controls still do not inherit IsEnabled from their container. ScrollView set to disabled will still allow scrolling.
Bugzilla 43007
Bugzilla 44096
Are marked resolved and should be reopened or they won't get assigned to anyone.
Note: Under the exact right binding condition with a DataTrigger you can get it to disable after rendering SOMETIMES - but not in the simplest of straight-forward uses or direct bindings which would constitute 99% of the use-cases.
Note: Only through binding can it sometimes be made to work. If you set it to disabled through code behind, that also is not honored.
@Velocity I actually was seeing this in the -pre 5 package in our test branch. I'm glad you said something about it because I hadn't got around to submitting that bug. I'll see if I can get a screen shot posted.
That's terrific news. Being as I'm in a work environment we don't do community GIT pulls. Enterprise environment means official stable release only. So I'm very much looking forward to reading when this is 'released into the wild' officially.
@TheRealJasonSmith@DavidOrtinau, guys I want to touch base again on the System.ObjectDisposedException issue @Velocity and I have been talking about. Truth be told, I have been seeing this exact same issue in my current version of my app using XF 2.3.4.239 for months. I know it's the same issue because I started poking around my crash logs on Azure Mobile and found a crash from my 2.3.5 branch tests, and from my current master branch using 2.3.4 and compared the stack traces.
Take a look a the stack traces below, they are basically identical, but the disposed object in 2.3.4 is the FORMSIMAGEVIEW while in 2.3.5 is the FASTRENDERERS.IMAGERENDERER. It would appear that this issue isn't new. With that said, I found 2 additional crash logs that were System.ObjectDisposedExceptions, one being the FORMSIMAGEVIEW (has different stack trace) while the other a FORMSTEXTVIEW. It would appear that whatever is handing off stuff to the JavaInterop could be where the issue lies. I have attached those stack traces to this post.
What can I do to further help? I can easily reproduce this crash, but I have no idea how, I just have to use my app, navigate back and forth and perform actions and then it'll crash randomly. I can't release my app until I know this issue is resolved, so please help me help you. Thanks.
@TheRealJasonSmith said:
Can you try subclassing the ImageRenderer (fast renderer) and replacing the default with your new custom one. Then override the dispose method and just start doing some tracking there for which things get called with Dispose(true) vs Dispose(false). It is my contention that a Dispose(false) is happening shortly before the crash... If you do find that lets try to figure out why.
So I tried the above ^^ and I was able to confirm that your suspicion is happening... As I was using my app and doing the actions that normally caused the crash, I was getting this logging as I was watching images get disposed:
Dispose(True) (no crash)
Called disposing True on 'Xamarin.Forms.UriImageSource' from Prepify.App.App
=> Prepify.App.Views.Modals.AddListItemModal
=> Xamarin.Forms.Grid
=> Xamarin.Forms.StackLayout
=> Xamarin.Forms.Image
All this was working great. Then after a while I got the crash... you'll see that it was coming from a page with a ListView and you can see that it called Dispose(false) on each image in the ListView (for each list item), then the crash happened. Also, it happened immediately after I navigated backward (using MasterDetail back button). Notice also that the Image.Source, noted in single quotes, is blank.
Dispose(False)
Called disposing False on '' from Prepify.App.Controls.Templates.Inventory.UnacquiredItemCellTemplate
=> Xamarin.Forms.ContentView
=> Xamarin.Forms.Grid
=> Xamarin.Forms.AbsoluteLayout
=> Xamarin.Forms.Image
Called disposing False on '' from Prepify.App.Controls.Templates.Inventory.UnacquiredItemCellTemplate
=> Xamarin.Forms.ContentView
=> Xamarin.Forms.Grid
=> Xamarin.Forms.AbsoluteLayout
=> Xamarin.Forms.Image
Called disposing False on '' from Prepify.App.Controls.Templates.Inventory.UnacquiredItemCellTemplate
=> Xamarin.Forms.ContentView
=> Xamarin.Forms.Grid
=> Xamarin.Forms.AbsoluteLayout
=> Xamarin.Forms.Image
Called disposing False on '' from Prepify.App.Controls.Templates.Inventory.UnacquiredItemCellTemplate
=> Xamarin.Forms.ContentView
=> Xamarin.Forms.Grid
=> Xamarin.Forms.AbsoluteLayout
=> Xamarin.Forms.Image
Called disposing False on '' from Prepify.App.Controls.Templates.Inventory.UnacquiredItemCellTemplate
=> Xamarin.Forms.ContentView
=> Xamarin.Forms.Grid
=> Xamarin.Forms.AbsoluteLayout
=> Xamarin.Forms.Image
Called disposing False on '' from Prepify.App.Controls.Templates.Inventory.UnacquiredItemCellTemplate
=> Xamarin.Forms.ContentView
=> Xamarin.Forms.Grid
=> Xamarin.Forms.AbsoluteLayout
=> Xamarin.Forms.Image
Called disposing False on '' from Prepify.App.Controls.Templates.Inventory.AcquiredItemCellTemplate
=> Xamarin.Forms.ContentView
=> Xamarin.Forms.Grid
=> Prepify.App.Controls.ThumbnailPlaceholder
=> Xamarin.Forms.Grid
=> Xamarin.Forms.Image
Called disposing False on 'Xamarin.Forms.FileImageSource' from Prepify.App.Controls.Templates.Inventory.AcquiredItemCellTemplate
=> Xamarin.Forms.ContentView
=> Xamarin.Forms.Grid
=> Xamarin.Forms.StackLayout
=> Xamarin.Forms.Image
Here is my Renderer code that logged:
public class PrepifyImageRenderer : ImageRenderer
{
protected override void Dispose(bool disposing)
{
App.App.Log.Info($"Called disposing {disposing} on {this.Element.Source} from {LogViewStackAllTheWayUp(this.Element)} ");
base.Dispose(disposing);
}
private string LogViewStackAllTheWayUp(Element element)
{
if (element.Parent != null)
return LogViewStackAllTheWayUp(element.Parent) + $"\n\t=> {element.GetType()}";
else
return element.GetType().ToString();
}
}
Any ideas on when 2.3.5 will be released? It looks like a great release, and there are several bugs that I am tracking that should hopefully be fixed in this release.
@DavidOrtinau I posted about this ObjectDisposedException last Wednesday. Has there been any progress? Do I need to create a formal bug, or is there an existing one?
Ok we are getting denied in the Apple store now because of this error:
"We noticed that your app did not run at iPhone resolution when reviewed on iPad running iOS 10.3.3."
What the heck does that mean? And how do we set our iPads to run iPhone resolutions so I can correct the masterdetailspage? We have never had them deny us for this before...
@DavidOrtinau any update on https://bugzilla.xamarin.com/show_bug.cgi?id=56515 ?
It's a 2017 May bug with Importance: High blocker, which is just "hanging" on bugzilla... unbelievable
I know, that there could be some internal processes in MS, but communication with us, community is also important.
@DavidOrtinau Yes this is with Pre6. We have a customized version of it but none of the customizations have anything to do with this. I am playing around with a few things and resubmitted the app for review. The issue comes down to the two different renderers for the phone, because they are running the phone version on the tablet it uses the Phone renderer but the idiom says tablet. So I changed the phone renderer on our side to force portrait mode ALWAYS under phone renderer when used on idiom tablet. It appears to show correctly at 2X on the tablet when the target device 2 is taken out.
So who knows if they will accept it but we are waiting.
EDIT: Well that was fast. Apple just approved the new version. Its a stupid rule that they have where they apparently need to be able to run the iPhone app on the tablet EVEN if you have a tablet version in the store as well. So literally NO ONE will EVER get that version of the app but they have their rules I guess. I dont know if we were randomly selected for harassment or if something changed in the renderers to cause a weird display in Pre6. Anyway it seems for us by forcing portrait it renders correctly. The issue was when the app was in landscape on the tablet. And since no one will every get that version of the app it doesnt matter what it looks like.
@DavidOrtinau Well I still find it weird that after all those releases they flagged us for that. So either two things are true, something changed in in Forms code, or they do random checks and we got nailed for it... btw I wanted to mention that UWP has a few changes that need to be put in for .NET Native deploys. As it stands the Microsoft Store denies Xamarin Forms apps without the changes (rd.xml mainly, but also null references on disposing).
Edit: To clarify for others, .NET Native is a pre-req to be in the store.
@JKay said:
I'm also getting this exception on UWP, but dont know what causes it:
System.InvalidOperationException
at System.Runtime.CompilerServices.ConditionalWeakTable2.VerifyIntegrity() at System.Runtime.CompilerServices.ConditionalWeakTable2.TryGetValue(TKey key, TValue& value)
at Xamarin.Forms.Setter.UnApply(BindableObject target, Boolean fromStyle)
at Xamarin.Forms.TriggerBase.OnConditionChanged(BindableObject bindable, Boolean oldValue, Boolean newValue)
at Xamarin.Forms.BindingCondition.OnBoundPropertyChanged(BindableObject bindable, Object oldValue, Object newValue)
at Xamarin.Forms.BindableObject.ClearValue(BindableProperty property, Boolean checkaccess)
at Xamarin.Forms.BindingCondition.TearDown(BindableObject bindable)
at Xamarin.Forms.TriggerBase.OnDetachingFrom(BindableObject bindable)
at Xamarin.Forms.TriggerBase.Xamarin.Forms.IAttachedObject.DetachFrom(BindableObject bindable)
at Xamarin.Forms.AttachedCollection`1.OnDetachingFrom(BindableObject bindable)
at Xamarin.Forms.VisualElement.Finalize()
Unfortunately I don't have time to check if this error is already known or to provide a reproduction, but I'am getting following exception on Android (pre6) when navigating back from a page containing a hidden Button (Image only).
"Cannot access a disposed object.\nObject name: 'Xamarin.Forms.Platform.Android.FastRenderers.ButtonRenderer'."
at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in <bd30a18775d94dc8b6263aecd1ca9077>:0
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in <bd30a18775d94dc8b6263aecd1ca9077>:0
at Android.Views.View.Measure (System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x00035] in <d855bac285f44dda8a0d8510b679b1e2>:0
at Xamarin.Forms.Platform.Android.FastRenderers.ButtonRenderer.Xamarin.Forms.Platform.Android.IVisualElementRenderer.GetDesiredSize (System.Int32 widthConstraint, System.Int32 heightConstraint) [0x00006] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\NavigationPageRenderer.cs:210
at Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Internals.IPlatform.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x0000a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Cells\ViewCellRenderer.cs:87
at Xamarin.Forms.VisualElement.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0002d] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:632
at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:601
at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:477
at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:535
at Xamarin.Forms.StackLayout.CalculateNaiveLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, Xamarin.Forms.StackOrientation orientation, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint) [0x00236] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\StackLayout.cs:186
at Xamarin.Forms.StackLayout.CalculateLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean processExpanders) [0x00058] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\StackLayout.cs:111
at Xamarin.Forms.StackLayout.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x0005b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\StackLayout.cs:45
at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x000c7] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:235
at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:200
at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:637
at Xamarin.Forms.Layout+<>c.<OnChildMeasureInvalidated>b__39_0 () [0x00080] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:338
at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <d855bac285f44dda8a0d8510b679b1e2>:0
at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <d855bac285f44dda8a0d8510b679b1e2>:0
at (wrapper dynamic-method) System.Object:1db27744-3cb9-4309-a21f-810b0aad427b (intptr,intptr)
> @DevNative said: > Unfortunately I don't have time to check if this error is already known or to provide a reproduction, but I'am getting following exception on Android (pre6) when navigating back from a page containing a hidden Button (Image only). > > "Cannot access a disposed object.\nObject name: 'Xamarin.Forms.Platform.Android.FastRenderers.ButtonRenderer'." > > at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in :0 at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in :0 at Android.Views.View.Measure (System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x00035] in :0 at Xamarin.Forms.Platform.Android.FastRenderers.ButtonRenderer.Xamarin.Forms.Platform.Android.IVisualElementRenderer.GetDesiredSize (System.Int32 widthConstraint, System.Int32 heightConstraint) [0x00006] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\NavigationPageRenderer.cs:210 at Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Internals.IPlatform.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x0000a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Cells\ViewCellRenderer.cs:87 at Xamarin.Forms.VisualElement.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0002d] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:632 at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:601 at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:477 at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:535 at Xamarin.Forms.StackLayout.CalculateNaiveLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, Xamarin.Forms.StackOrientation orientation, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint) [0x00236] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\StackLayout.cs:186 at Xamarin.Forms.StackLayout.CalculateLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean processExpanders) [0x00058] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\StackLayout.cs:111 at Xamarin.Forms.StackLayout.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x0005b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\StackLayout.cs:45 at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x000c7] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:235 at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:200 at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:637 at Xamarin.Forms.Layout+<>c.b__39_0 () [0x00080] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:338 at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in :0 at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in :0 at (wrapper dynamic-method) System.Object:1db27744-3cb9-4309-a21f-810b0aad427b (intptr,intptr)
Hey all, just back from a week long team meeting, planning our next several releases and spec'ing things out. Here's what is happening next, and I'll echo this on the roadmap when I update it.
tl;dr we are putting together our next pre-release to be published later this week (barring any complications) and it'll be versioned 2.4.
--
When testing 2.3.5-pre6 it was discovered for a specific scenario we had introduced a breaking change with Fast Renderers. That's a win for our QA/pre-release strategy! We have refactored to mitigate this change while keeping the Fast Renderer architecture.
Additionally, we are introducing a flags API to enable/disable features and behaviors and controls (etc.) that introduce experimental features or introduce breaking changes. This is still being worked out, but it's mostly complete. What this will mean for the next release is Fast Renderers will be disabled by default and you will use this new API to enable them when you initialize Xamarin.Forms. I will detail how this works when we settle on the implementation and release it later this week.
We also have been carrying about 50 fixes awaiting a 2.3.6 release. When evaluating what was in 2.3.5 we determined it's really a 2.4 in terms of change and scope, and it has also been decided to combine 2.3.6 changes.
Strides are being made in terms of planning, approving, and testing releases. These improved processes are having obvious impact on our timing of both releases and my capacity to communicate everything going on proactively. That'll get better as we hit our stride, and the quality of our products overall are improving. So worth it!
Starting from 2.3.5.233-pre1 the whole effects system don't work for android although it's work well in UWP, Don't test it on iOS.
Here what i did:
Created PCL Xamarin.Forms app and modified MainPage
<Label x:Name="label" Text="Welcome to Xamarin Forms!" VerticalOptions="Center" HorizontalOptions="Center" />
I tested 2.3.5.233-pre1, 2.3.5.235-pre2, 2.3.5.239-pre3, 2.3.5.255-pre5, 2.3.5.256-pre6 and last nightly build 2.3.6.122-nightly but still don't work, When I downgraded to 2.3.4.247 it's work well.
I noticed the app recognize the effect but can't make it attached so it didn't execute effect code at all.
Starting from 2.3.5.233-pre1 the whole effects system don't work for android although it's work well for in UWP, Don't test it on iOS.
Here what i did:
Created PCL Xamarin.Forms app and modified MainPage
I tested 2.3.5.233-pre1, 2.3.5.235-pre2, 2.3.5.239-pre3, 2.3.5.255-pre5, 2.3.5.256-pre6 and last nightly build 2.3.6.122-nightly but still don't work, When I downgrade to 2.3.4.247 it's work well.
I noticed the app recognize the effect but can't make it attached so it didn't exebuted at all, Thanks in advanced.
Posts
@BjornB I noticed these button issues too, but I thought they were so obvious that they were working on the. Is there an official word on this fix from Xamarin?
@BjornB @Britton_Beckham thanks, I raised this with the team and we're looking at it.
@rmarinho I have this stacktrace with -pre6
at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in :0
at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in :0
at Android.Views.View.Measure (System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x0002b] in /Users/builder/data/lanes/4695/9dbc4c53/source/xamarin-android/src/Mono.Android/obj/Release/android-25/mcw/Android.Views.View.cs:13977
at Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer.Xamarin.Forms.Platform.Android.IVisualElementRenderer.GetDesiredSize (System.Int32 widthConstraint, System.Int32 heightConstraint) [0x0005f] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\PickerRenderer.cs:77
at Xamarin.Forms.Platform.Android.Platform.Xamarin.Forms.Internals.IPlatform.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x00000] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Renderers\ListViewAdapter.cs:92
at Xamarin.Forms.VisualElement.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0002d] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:632
at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:601
at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:477
at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:535
at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.View child, Xamarin.Forms.Rectangle region, Xamarin.Forms.SizeRequest childSizeRequest) [0x000eb] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:269
at Xamarin.Forms.StackLayout.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00092] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\StackLayout.cs:54
at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x000c7] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:235
at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:200
at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:637
at Xamarin.Forms.Layout+<>c.b__39_0 () [0x00080] in C:\BuildAgent\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:338
at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in /Users/builder/data/lanes/4695/9dbc4c53/source/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:36
at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in /Users/builder/data/lanes/4695/9dbc4c53/source/xamarin-android/src/Mono.Android/obj/Release/android-25/mcw/Java.Lang.IRunnable.cs:81
at (wrapper dynamic-method) System.Object:7081af60-9bb1-4386-8e8b-480d3931419c (intptr,intptr)
PR up for ObjectDisposedException in
ButtonDrawable.Draw
method.https://github.com/xamarin/Xamarin.Forms/pull/1040
Hopefully combined with the other PRs for ObjectDisposedException this eliminates the majority of the remaining issues with the fast renderers.
However, have just found one last problem with image sizing on Android related to changes in XF 2.3.5.
In certain conditions, the images overlap and do not size correctly on layout.
Working on a repro project and will ticket on BugZilla later today.
Further testing shows that
Aspect=AspectFill
may be being handled differently in the new fastImageRenderer
.Repro project and BugZilla ticket to follow.
07jul2017 - 2.3.5-pre6
Nested controls still do not inherit
IsEnabled
from their container.ScrollView
set to disabled will still allow scrolling.Bugzilla 43007
Bugzilla 44096
Are marked
resolved
and should be reopened or they won't get assigned to anyone.Note: Under the exact right binding condition with a DataTrigger you can get it to disable after rendering SOMETIMES - but not in the simplest of straight-forward uses or direct bindings which would constitute 99% of the use-cases.
Note: Only through binding can it sometimes be made to work. If you set it to disabled through code behind, that also is not honored.
This very direct markup is still scrollable.
@Velocity I actually was seeing this in the -pre 5 package in our test branch. I'm glad you said something about it because I hadn't got around to submitting that bug. I'll see if I can get a screen shot posted.
@Velocity thanks for your work and feedback there.
@ClintStLaurent thanks for raising that. I'll make sure we check it out.
@DavidOrtinau @Britton_Beckham
BugZilla report added for
AspectFill
bug including screenshots and repro projects showing XF 2.3.4 vs 2.3.5.Should be fixed by PR 1049.
That's terrific news. Being as I'm in a work environment we don't do community GIT pulls. Enterprise environment means official stable release only. So I'm very much looking forward to reading when this is 'released into the wild' officially.
@TheRealJasonSmith @DavidOrtinau, guys I want to touch base again on the
System.ObjectDisposedException
issue @Velocity and I have been talking about. Truth be told, I have been seeing this exact same issue in my current version of my app using XF 2.3.4.239 for months. I know it's the same issue because I started poking around my crash logs on Azure Mobile and found a crash from my 2.3.5 branch tests, and from my current master branch using 2.3.4 and compared the stack traces.Take a look a the stack traces below, they are basically identical, but the disposed object in 2.3.4 is the
FORMSIMAGEVIEW
while in 2.3.5 is theFASTRENDERERS.IMAGERENDERER
. It would appear that this issue isn't new. With that said, I found 2 additional crash logs that wereSystem.ObjectDisposedException
s, one being theFORMSIMAGEVIEW
(has different stack trace) while the other aFORMSTEXTVIEW
. It would appear that whatever is handing off stuff to theJavaInterop
could be where the issue lies. I have attached those stack traces to this post.What can I do to further help? I can easily reproduce this crash, but I have no idea how, I just have to use my app, navigate back and forth and perform actions and then it'll crash randomly. I can't release my app until I know this issue is resolved, so please help me help you. Thanks.
2.3.4.239
2.3.5-pre5
So I tried the above ^^ and I was able to confirm that your suspicion is happening... As I was using my app and doing the actions that normally caused the crash, I was getting this logging as I was watching images get disposed:
Dispose(True) (no crash)
All this was working great. Then after a while I got the crash... you'll see that it was coming from a page with a
ListView
and you can see that it calledDispose(false)
on each image in theListView
(for each list item), then the crash happened. Also, it happened immediately after I navigated backward (using MasterDetail back button). Notice also that theImage.Source
, noted in single quotes, is blank.Dispose(False)
Here is my Renderer code that logged:
Any ideas on when 2.3.5 will be released? It looks like a great release, and there are several bugs that I am tracking that should hopefully be fixed in this release.
on my post above 2.3.4.239 == 2.3.4.231
@DavidOrtinau I posted about this
ObjectDisposedException
last Wednesday. Has there been any progress? Do I need to create a formal bug, or is there an existing one?Is there any update on those issues Britton_Beckham has been having? It's preventing us from having a stable release.
I'm getting this with latest [email protected]@JohnOsborn:
A fix for this has been made in the labelrenderer for Getdesiredsize()
Should i put the same check in the button or have you found the "real" cause for disposed objects issue?
Thx
@BjornB Is there a temporary workaround for the issue I can do?
> @BjornB Is there a temporary workaround for the issue I can do?
Yes, You can use the standard renderer for button instead of fastrenderer.
Create a button renderer that inherits from the standard renderer and use it on all buttons.
@BjornB That worked, thank you!
"We noticed that your app did not run at iPhone resolution when reviewed on iPad running iOS 10.3.3."
What the heck does that mean? And how do we set our iPads to run iPhone resolutions so I can correct the masterdetailspage? We have never had them deny us for this before...
This Pr should fix it
https://github.com/xamarin/Xamarin.Forms/pull/1070
Maybe the root cause for these issues have been solved allready by this commit
https://github.com/xamarin/Xamarin.Forms/commit/60db754eb7171d5b691fe7ae85ef25c4dcef464f
@JohnOsborn the link to PR is wrong one I think
I hope it gets fixed "soon".
@DavidOrtinau any update on https://bugzilla.xamarin.com/show_bug.cgi?id=56515 ?
It's a 2017 May bug with Importance: High blocker, which is just "hanging" on bugzilla... unbelievable
I know, that there could be some internal processes in MS, but communication with us, community is also important.
@BradChase.2654 this is with -pre6? Did you sort it out?
@NamyslawSzymaniuk there was work done on it, I'll find out what's going on and push it through. Thanks for bringing it up. I'll report back.
@DavidOrtinau Yes this is with Pre6. We have a customized version of it but none of the customizations have anything to do with this. I am playing around with a few things and resubmitted the app for review. The issue comes down to the two different renderers for the phone, because they are running the phone version on the tablet it uses the Phone renderer but the idiom says tablet. So I changed the phone renderer on our side to force portrait mode ALWAYS under phone renderer when used on idiom tablet. It appears to show correctly at 2X on the tablet when the target device 2 is taken out.
So who knows if they will accept it but we are waiting.
EDIT: Well that was fast. Apple just approved the new version. Its a stupid rule that they have where they apparently need to be able to run the iPhone app on the tablet EVEN if you have a tablet version in the store as well. So literally NO ONE will EVER get that version of the app but they have their rules I guess. I dont know if we were randomly selected for harassment or if something changed in the renderers to cause a weird display in Pre6. Anyway it seems for us by forcing portrait it renders correctly. The issue was when the app was in landscape on the tablet. And since no one will every get that version of the app it doesnt matter what it looks like.
@NamyslawSzymaniuk update coming to the ticket with a solution or two for you.
@BradChase.2654 congrats!
@DavidOrtinau Well I still find it weird that after all those releases they flagged us for that. So either two things are true, something changed in in Forms code, or they do random checks and we got nailed for it... btw I wanted to mention that UWP has a few changes that need to be put in for .NET Native deploys. As it stands the Microsoft Store denies Xamarin Forms apps without the changes (rd.xml mainly, but also null references on disposing).
Edit: To clarify for others, .NET Native is a pre-req to be in the store.
I have the same scenario and experiencing the exact error!
@PouyaJavadzadeh This is fixed in SR2
https://github.com/xamarin/Xamarin.Forms/releases/tag/release-2.3.4-sr2
Unfortunately I don't have time to check if this error is already known or to provide a reproduction, but I'am getting following exception on Android (pre6) when navigating back from a page containing a hidden Button (Image only).
"Cannot access a disposed object.\nObject name: 'Xamarin.Forms.Platform.Android.FastRenderers.ButtonRenderer'."
> Unfortunately I don't have time to check if this error is already known or to provide a reproduction, but I'am getting following exception on Android (pre6) when navigating back from a page containing a hidden Button (Image only).
>
> "Cannot access a disposed object.\nObject name: 'Xamarin.Forms.Platform.Android.FastRenderers.ButtonRenderer'."
>
> at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in :0 at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeNonvirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in :0 at Android.Views.View.Measure (System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec) [0x00035] in :0 at Xamarin.Forms.Platform.Android.FastRenderers.ButtonRenderer.Xamarin.Forms.Platform.Android.IVisualElementRenderer.GetDesiredSize (System.Int32 widthConstraint, System.Int32 heightConstraint) [0x00006] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\NavigationPageRenderer.cs:210 at Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Internals.IPlatform.GetNativeSize (Xamarin.Forms.VisualElement view, System.Double widthConstraint, System.Double heightConstraint) [0x0000a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\Cells\ViewCellRenderer.cs:87 at Xamarin.Forms.VisualElement.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0002d] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:632 at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:601 at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:477 at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:535 at Xamarin.Forms.StackLayout.CalculateNaiveLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, Xamarin.Forms.StackOrientation orientation, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint) [0x00236] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\StackLayout.cs:186 at Xamarin.Forms.StackLayout.CalculateLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean processExpanders) [0x00058] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\StackLayout.cs:111 at Xamarin.Forms.StackLayout.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x0005b] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\StackLayout.cs:45 at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x000c7] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:235 at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:200 at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\VisualElement.cs:637 at Xamarin.Forms.Layout+<>c.b__39_0 () [0x00080] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\Layout.cs:338 at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in :0 at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in :0 at (wrapper dynamic-method) System.Object:1db27744-3cb9-4309-a21f-810b0aad427b (intptr,intptr)
I have submitted a PR to fix this some days ago
@DavidOrtinau any info about planned date for next Xamarin Forms update? Even next pre release?
I'm starting facing Fast Renderers issues, which has multiple PRs - ex. https://github.com/xamarin/Xamarin.Forms/pull/1033
Hey all, just back from a week long team meeting, planning our next several releases and spec'ing things out. Here's what is happening next, and I'll echo this on the roadmap when I update it.
tl;dr we are putting together our next pre-release to be published later this week (barring any complications) and it'll be versioned 2.4.
--
When testing 2.3.5-pre6 it was discovered for a specific scenario we had introduced a breaking change with Fast Renderers. That's a win for our QA/pre-release strategy! We have refactored to mitigate this change while keeping the Fast Renderer architecture.
Additionally, we are introducing a flags API to enable/disable features and behaviors and controls (etc.) that introduce experimental features or introduce breaking changes. This is still being worked out, but it's mostly complete. What this will mean for the next release is Fast Renderers will be disabled by default and you will use this new API to enable them when you initialize Xamarin.Forms. I will detail how this works when we settle on the implementation and release it later this week.
We also have been carrying about 50 fixes awaiting a 2.3.6 release. When evaluating what was in 2.3.5 we determined it's really a 2.4 in terms of change and scope, and it has also been decided to combine 2.3.6 changes.
Strides are being made in terms of planning, approving, and testing releases. These improved processes are having obvious impact on our timing of both releases and my capacity to communicate everything going on proactively. That'll get better as we hit our stride, and the quality of our products overall are improving. So worth it!
If you have questions, please ask.
@PouyaJavadzadeh if you have a reproduction sample, please attached it to that Bugzilla issue and reopen it so we can investigate immediately.
Starting from 2.3.5.233-pre1 the whole effects system don't work for android although it's work well in UWP, Don't test it on iOS.
Here what i did:
Created PCL Xamarin.Forms app and modified MainPage
<Label x:Name="label" Text="Welcome to Xamarin Forms!" VerticalOptions="Center" HorizontalOptions="Center" />
`public MainPage()
{
InitializeComponent();
}``
Then created MyEffect.cs in Android project
``using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
[assembly: ResolutionGroupName("App1")]
[assembly: ExportEffect(typeof(App1.Droid.MyEffect), "MyEffect")]
namespace App1.Droid
{
class MyEffect : PlatformEffect
{
protected override void OnAttached()
{
try
{
Control.SetBackgroundColor(Android.Graphics.Color.LightGreen);
}
catch (Exception ex)
{
Console.WriteLine("Cannot set property on attached control. Error: ", ex.Message);
}
}
}``
I tested 2.3.5.233-pre1, 2.3.5.235-pre2, 2.3.5.239-pre3, 2.3.5.255-pre5, 2.3.5.256-pre6 and last nightly build 2.3.6.122-nightly but still don't work, When I downgraded to 2.3.4.247 it's work well.
I noticed the app recognize the effect but can't make it attached so it didn't execute effect code at all.
Starting from 2.3.5.233-pre1 the whole effects system don't work for android although it's work well for in UWP, Don't test it on iOS.
Here what i did:
Created PCL Xamarin.Forms app and modified MainPage
`
public MainPage()
{
InitializeComponent();
}
Then created MyEffect.cs in Android project
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
[assembly: ResolutionGroupName("App1")]
[assembly: ExportEffect(typeof(App1.Droid.MyEffect), "MyEffect")]
namespace App1.Droid
{
class MyEffect : PlatformEffect
{
protected override void OnAttached()
{
try
{
Control.SetBackgroundColor(Android.Graphics.Color.LightGreen);
}
catch (Exception ex)
{
Console.WriteLine("Cannot set property on attached control. Error: ", ex.Message);
}
}
}`
I tested 2.3.5.233-pre1, 2.3.5.235-pre2, 2.3.5.239-pre3, 2.3.5.255-pre5, 2.3.5.256-pre6 and last nightly build 2.3.6.122-nightly but still don't work, When I downgrade to 2.3.4.247 it's work well.
I noticed the app recognize the effect but can't make it attached so it didn't exebuted at all, Thanks in advanced.