MichaelRumpler / GestureSample

Sample App for MR.Gestures
MIT License
58 stars 17 forks source link

iOS Pan Gesture Recognizer Crashing #31

Closed AnthonyIacono closed 2 years ago

AnthonyIacono commented 3 years ago

Using MR.Gestures version 2.1.3 with a license

Getting a crash when scrolling aggressively through a ScrollView on iOS in iOSEventArgsHelper.GetViewPosition (null reference exception)

I don't use any pan gesture recognizers on the screen, so I'm not sure why it happens.

Thanks for your help!

MichaelRumpler commented 3 years ago

Sorry, but this is not enough information.

Please send me a repro project and the complete exception.

AnthonyIacono commented 3 years ago

@MichaelRumpler I'll get one together soon. If it helps, this is with a special scroll view that basically gets rid of elements as they go out of view. So I think basically it happens when one of those elements goes out of view and gets removed right as the pan event is being handled on the element.

I think a general improvement that could help in situations like this is to add some null checks around that element just to prevent accidentally crashing if something mid-pan is removed (similarly, other events probably apply here).