Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Objectdisposed crash when closing app in release build #4583

Closed
samhouts opened this issue Aug 6, 2018 · 2 comments
Closed

Objectdisposed crash when closing app in release build #4583

samhouts opened this issue Aug 6, 2018 · 2 comments

Comments

@samhouts
Copy link
Member

samhouts commented Aug 6, 2018

From @PaulVrugt on August 6, 2018 14:1

Description

Lately, we have an app that crashes every time the app is closed (swiped away) in android. The issue ONLY occurs on release builds. On debug builds the app works fine. The exception stacktrace (caught by appcenter) is:

JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self)
System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRenderer'.
JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self)
JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters)
DrawerLayout.RemoveDrawerListener (Android.Support.V4.Widget.DrawerLayout+IDrawerListener listener)
NavigationPageRenderer.Dispose (System.Boolean disposing)
Object.Dispose ()
Platform.SetPageInternal (Xamarin.Forms.Page newRoot)

This is a very pressing issue for us, since we are unable to release an update for our app when the app crashes (almost) every time it is closed.

Steps to Reproduce

We cannot seem to reproduce it in a small app. I seems to happen to 1 of our 3 apps. Even though there is major code sharing between them.

Expected Behavior

App doesn't crash on close

Actual Behavior

App crashes on close

Basic Information

  • Version with issue:
  • Last known good version: don't know. Reverted back until 3.0.482510 but app still crashed.
  • IDE: Visual studio 2017
  • Platform Target Frameworks:
    • Android: 8.1 (27)
  • Android Support Library Version: 27.0.2.1
  • Nuget Packages: Lots.
  • Affected Devices: Tested on LG Nexus 5X

Reproduction Link

We are unable to create a small reproduction. It seems be a race condition in our app that isn't present in a small demo app. We're trying to discover a point in time in our history where the error started occurring, which might give us a clue as to what is the trigger for this issue.

Copied from original issue: xamarin/Xamarin.Forms#3489

@samhouts
Copy link
Member Author

samhouts commented Aug 6, 2018

Can you try the package linked in xamarin/Xamarin.Forms#2004 (comment) and see if it happens to resolve your issue? Thanks!

@samhouts
Copy link
Member Author

samhouts commented Aug 6, 2018

oops. wrong issue.

@samhouts samhouts closed this as completed Aug 6, 2018
@ghost ghost locked as resolved and limited conversation to collaborators May 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants