ArgumentException while enumerating hit test elements


I've received reports of crashes in my WP7 app that can be traced back to an error occuring in the VisualTreeHelper.FindElementsInHostCoordinates method. Unfortunately, the reports only include the exception name and stack trace (see attached), and I have not been able to reproduce this locally.
Since all the methods involved are private, it doesn't seem possible to implement a workaround without rebuilding the TouchHelper assembly locally.

file attachments


davidezordan wrote Sep 8, 2012 at 11:04 AM

Thanks for the feedback, we'll investigate the issue.


wrote Feb 14, 2013 at 7:46 PM

EmperorXLII wrote May 4, 2013 at 2:55 PM

After changing the navigation structure of the app recently, I found I could reproduce the error reliably by navigating away from the page using TouchHelper. Looking at the code, I noticed that I never called EnableInput( false ) when the page left the screen; doing so in the Unloaded event seems to have solved the problem.