Gesture Detector System.ObjectDisposedException RRS feed

  • Question

  • User318241 posted


    I am using Gesture Detector in my app. When I navigate to other activities and spend time there and after coming back to the Home, I got Gesture Detector System.ObjectDisposedException (Can not access disposed object). While i did not dispose it.

    Thanks Gourav Gupta

    Thursday, April 20, 2017 11:44 AM

All replies

  • User2756 posted

    I have been seeing this for a while now with a custom View that uses a Scroller and often seems to happen after the activity has been obscured and resumed. Trying to catch individual exceptions and recover just causes it to crop up elsewhere, do any of the Xamarin team have a workaround for this?

    Tuesday, April 25, 2017 1:47 PM
  • User169159 posted

    I've got the same issue. To make issue to be more steady I am starting task in OnCreate of an Activity:

    Task MemoryEater ()
        return Task.Run (async () => {
            while (true) {
                byte [] f = new byte [1000 * 1000 * 5];
                await Task.Delay (200);
                f = null;

    In my case I am using port to C# of https://github.com/matabii/scale-imageview-android In each crash case on of these is disposed: Android.Widget.Toast Android.Graphics.Matrix Android.Views.GestureDetector

    Also I was getting the same with SlidingMenuSharp: https://github.com/Cheesebaron/SlidingMenuSharp/issues/20

    @ChrisBramley said: Trying to catch individual exceptions and recover just causes it to crop up elsewhere Confirm.

    Friday, May 26, 2017 8:43 AM
  • User169159 posted

    Created bug report including sample project.

    Monday, May 29, 2017 10:56 AM