-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Picker.Focus() throws exception in 3.6 #5657
Comments
@samhouts @DeepikaBalaSubramaniyan Any known work-arounds for this until the next release? We just updated to X.F 3.6.0-sr1 but this control is on the home page of one of our consumer apps. |
Have some more information and a work-around: To work-around the issue I made a custom Picker renderer which overrides Dispose() and OnFocusChangeRequested(). The latter checks whether the renderer has been disposed before calling the base class. As to the cause, it looks like FocusChangeRequested event of the underlying VisualElement is not getting properly removed from disposed Pickers. In my work-around renderer the OnFocusChangeRequested() is getting called multiple times, 3 in my case. The first two times the Renderer has already been disposed, and for the last one it hasn't. |
Hi @PureWeen Still at last stable Xamarin Forms version 3.6.0.264807 and Last pre release version 4.0.0.250467-pre7 Picker.Focus() calls throws object disposed exception, But bug report was closed as fixed. Still in this simple sample able to reproduce the issue with Xamarin Forms version 3.6.0.264807 http://www.syncfusion.com/downloads/support/directtrac/general/ze/DataGridNet-1266236982. |
@PureWeen Same here, in latest 3.6 as well as latest 4.0 pre we also get this bug when calling Picker.Focus(). Desperately waiting for a final fix, cause this is crashing one of our customer apps in App Store. @jalbertSyncroTech Can you please post your custom Picker renderer which overrides Dispose() and OnFocusChangeRequested() ? |
#5670 hasn't been released yet I tested your sample with the next SR coming out and it doesn't crash anymore |
@PureWeen Thanks for your reply, can you give us an approximate release date for this fix? Will it be included in the upcoming 3.6.0 and 4.0-pre8 nuget-packages? https://www.nuget.org/packages/Xamarin.Forms Our customers are desperately waiting for the app-update with this fix, that's why I'm asking. |
Can't give an exact date but the release is in the cooker so as long as it passes through the QA cycles then it should be out soon |
@PureWeen Was this part of today's build 3.6.0.293080? We now have the following behaviour: On the first Picker.Focus() call the Picker is not actually focused, only from the 2nd call on it works / displays the Picker correctly. |
@benjaminsommerfeld if you can create a new issue and a reproduction that would be really helpful. |
Hi @samhouts
At Xamarin forms version 3.6 last stable also, Picker.Focus() calls throws exception , I have attached the exception details, Also Issue replicated sample, follow the replication procedure
Replication Procedure:
Exception screenshot:
Sample:
http://www.syncfusion.com/downloads/support/directtrac/general/ze/DataGridNet-1266236982
So Focus System.ObjectDisposedException: Cannot access a disposed object issue does not get fixed in xamarin forms 3.6 last stable version and last pre release version 4.6 for Xamarin.Forms.Picker View and Xamarin.Forms.DatePicker view, Attached sample is related to Picker.Focus() calls.
Please look in to this issue and provide the fix for upcoming releases.
Originally posted by @DeepikaBalaSubramaniyan in #5202 (comment)
The text was updated successfully, but these errors were encountered: