Closed alexlobanov closed 7 years ago
Is this solved?
We waiting confirmation from users.
I'm trying to fix this in elegant way.. but seems like I can't do this.
But after I change some logic in the Dispose()
method, and also override IsInLayout
property as I as this on the stackstrace. On the property I check java handle reference link for null, like this:
public override bool IsInLayout
{
get
{
if (nativeControl.Handle == IntPtr.Zero)
{
return false;
}
return base.IsInLayout;
}
}
This is seems like fixed issue / made it more rare.. but of course, this is not right way to fix this.
I'm also seeing this in the latest version
@mikegottlieb did you know version that don't have this issue?
@alexrainman
I also saw some new crashes on this week, this start to be more much less often after I create those patch, and when I change GC collector for Android to "new" instead of "tarjan" :
MONO_GC_PARAMS=bridge-implementation=new
Please read this: Garbage Collection Android. Xamarin.com
Thanks for any help!
I switched back to version 1.2.4. I also ended up rolling all of my upgrades include my Xamarin.Forms version back down because I was experiencing a lot of problems.
@alexlobanov when you say TabPage are you talking about TabbedPage or this plugin https://www.nuget.org/packages/CwwOnline.TabbedPageExt.Xamarin/?
Because if it's the plugin, then i cannot do anything about it. I have it working on Xamarin.Forms TabbedPage.
@alexrainman I used only Xamarin.Forms TabbedPage. I switched back to version 1.2.4 as @mikegottlieb suggested, I will report back if this is fix issue.
Thanks.
OK
I got this error today with the latest release NuGet 2.0.1. Latest Xamarin Forms stable. Occurred when rotating phone while on a page that was pushed on top of the page containing the segmented control.
Please reopen & fix?
Stack trace:
Message: Cannot access a disposed object. Object name: 'SegmentedControl.FormsPlugin.Android.SegmentedControlRenderer'.
Java.Interop.JniPeerMembers.AssertSelf(Java.Interop.IJavaPeerable self) in <3cb12bce834a498199b2be6cd3e00922>:0
Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod(System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) in <3cb12bce834a498199b2be6cd3e00922>:0
Android.Views.View.get_IsInLayout() in
I also have the exact same issue as @VincentH-Net described above, same conditions, same error. Using latest Nuget and Latest Forms version. @alexrainman Please can this issue be reopened and fixed?
For me it crashes on Android when I use the control on a master-detail page. Reverting back to ver 1.2.4 is a very poor workaround, because that version does not apply the Tint color consistently. @alexrainman please re-open.
Hi,
Thanks a lot for this great library and for your work on this.
Have one question, I used this plugin in the one app. Use this in one of the pages in the TabPage control.
Issue:
So as I saw on HockeyApp, some users have crash (android users only). This crash is very randomly appears, I think it's just in 1 of the 20-30 cases. I spent two hours trying to reproduce this, and I got two crashes (when page with this control creating).
So this is one of the crash reports (more frequently issue):
And one more (more detailed):
Expected scenario:
App should not crash.
Environment versions:
SegmentedControl Version - 1.3.1 Xamarin.Android - Version: 7.3.1.2 (Visual Studio Enterprise) Xamarin Forms - 2.3.4.247 Operating System - Mac OS X 10.12.5
Do you have some ideas how to resolve this?
Thanks a lot.