This project has moved and is read-only. For the latest updates, please go here.
2
Vote

'System.NullReferenceException' occurred in Microsoft.Phone.Controls.Toolkit.DLL

description

I have 4 listpickers on my WP8 app settings page.
Usually you touch then drag the page to see more settings.
If it happen that your touch hit a listpicker, app will crash and above exception is thrown.

Under debugger, I can see that the problem is in:
File: GestureListenerStatic.cs,
Method: OnDragComplete
Line: 'finalVelocity = deltaTransform.Transform(completedInfo.FinalVelocities.LinearVelocity);'

completedInfo.FinalVelocities is actually null, hence the exception

I'll try a null check for now, but appreciate if you guys check it out.

Stack:
Microsoft.Phone.Controls.Toolkit.DLL!Microsoft.Phone.Controls.GestureListener.OnDragCompleted(System.Windows.Input.ManipulationDeltaEventArgs lastDragInfo = {System.Windows.Input.ManipulationDeltaEventArgs}, System.Windows.Input.ManipulationCompletedEventArgs completedInfo = {System.Windows.Input.ManipulationCompletedEventArgs}) Line 270 C#
Microsoft.Phone.Controls.Toolkit.DLL!Microsoft.Phone.Controls.GestureListener.OnManipulationCompleted(object sender = {Microsoft.Phone.Controls.TransitionFrame}, System.Windows.Input.ManipulationCompletedEventArgs e = {System.Windows.Input.ManipulationCompletedEventArgs}) Line 218   C#
System.Windows.ni.dll!MS.Internal.CoreInvokeHandler.InvokeEventHandler(int typeIndex, System.Delegate handlerDelegate, object sender, object args)  Unknown
System.Windows.ni.dll!MS.Internal.JoltHelper.FireEvent(System.IntPtr unmanagedObj, System.IntPtr unmanagedObjArgs, int argsTypeIndex, int actualArgsTypeIndex, string eventName)    Unknown

comments

johnegbert wrote Jan 5, 2015 at 8:44 PM

I am having this same issue. Is there a fix or a work around for this?