Giter Site home page Giter Site logo

xamarinrepro1's Introduction

Xamarin bug repro #1

In some cases, an OnTouchListener used for swipe detection can cause an ObjectDisposedException for a GestureDetector instance.

This problem only shows up when using the Tarjan GC, both with and without concurrent GC. Setting MONO_GC_PARAMS=bridge-implementation=new prevents the exception.

This seems similar to several other bugs (this one in particular). However:

  • This repro is occurring on Xamarin.Android, not Xamarin.Forms.
  • This repro is using a RecyclerView of text views, not images and not ListView like many similar bugs.
  • This repro uses explicit GCs to encourage the bug to manifest quickly. Hundreds of swipes are not necessary to repro.

To repro:

  1. Start the project (on a device or emulator). You should see a list of numbers.
  2. Scroll the list.

You should see an exception:

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Android.Views.GestureDetector'.
  at Java.Interop.JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self) [0x00029] in <e8c0e16a54534fa885244f0ad837c79e>:0 
  at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00000] in <e8c0e16a54534fa885244f0ad837c79e>:0 
  at Android.Views.GestureDetector.OnTouchEvent (Android.Views.MotionEvent ev) [0x00031] in <848bbd7c681a4975918c72f17d2f5144>:0 
  at PewBibleKjv.SwipeTouchListener.OnTouch (Android.Views.View v, Android.Views.MotionEvent e) [0x00002] in C:\\Work\\XamarinRepro1\\PewBibleKjv\\SwipeTouchListener.cs:24

xamarinrepro1's People

Contributors

stephencleary avatar

Watchers

 avatar

Forkers

nickuk-77

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.