none
[UWP]GestureRecognizer throws exception in WP Direct3D App RRS feed

  • Question

  • I'm working on the graphic app for WP10 now. I need to use GestureRecognizer to move and to resize the objects on the screen. Looks kinda cool, but in some cases with two finger gestures, GestureRecognizer throws this error.

    WinRT information: Packets in the frame are inconsistent. Either pointer ids are not unique or there is a discrepancy in timestamps, frame ids, pointer types or source devices.

    Everything is OK with one finger gestures. The strange thing here is that this logic works fine on WP8.1.

    Exception throws when I try to process move event.

    void GestureHelper::ProcessMove(PointerPoint ^ppt){
    Vector<PointerPoint ^> ^pptVector = ref new Vector<PointerPoint ^>();
    pptVector->Append(ppt);

    this->recognizer->ProcessMoveEvents(pptVector);
    }

    Thursday, September 3, 2015 4:57 PM

Answers

  • This sounds like an issue we are tracking where the touch packets come out of order and get rejected. A fix is being looked at for an upcoming update.
    • Proposed as answer by IssueKiller Monday, September 7, 2015 1:32 AM
    • Marked as answer by Vladislav Koshyl Monday, September 7, 2015 7:29 AM
    Friday, September 4, 2015 4:55 PM

All replies

  • HI AngryHedgehog,

    >>Everything is OK with one finger gestures. The strange thing here is that this logic works fine on WP8.1.

    Do you mean the same code/logic is working well on WP8.1, but for UWP app, it shows this exception when using multiple finger gesture?

    Could you tell us detailed repro steps? Or you can simply share a minimal demo to us? As far as I know, because the Windows Phone 10 mobile RTM has not been released, so we can only use Preview SDK and VS2015 RC version to deploy app to WP10 device. So could you provide your environment information? like VS version and OS version.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, September 4, 2015 7:18 AM
    Moderator
  • Hi. I'm using Microsoft Visual Studio Community 2015 v.14.0.23107.0. I'm testing app on device Microsoft Lumia 435 Dual Sim with OS Windows 10 Mobile Insider Preview. Yes on WP8.1 this logic works well and on Universal project Gesture Recognizer sometimes throws an exception when I try process move. In this code, you can see how I process gestures:

    GestureHelper::GestureHelper(){
    this->recognizer = ref new GestureRecognizer();

    this->recognizer->GestureSettings = GestureSettings::ManipulationScale | GestureSettings::ManipulationTranslateX |
    GestureSettings::ManipulationTranslateY | GestureSettings::Tap | GestureSettings::ManipulationRotate | GestureSettings::DoubleTap | 
    GestureSettings::ManipulationTranslateInertia;

    this->recognizer->Tapped += ref new TypedEventHandler<GestureRecognizer ^, TappedEventArgs ^>(this, &GestureHelper::OnTapped);
    this->recognizer->ManipulationStarted += ref new TypedEventHandler<GestureRecognizer ^, ManipulationStartedEventArgs ^>(this, &GestureHelper::OnManipulationStarted);
    this->recognizer->ManipulationCompleted += ref new TypedEventHandler<GestureRecognizer ^, ManipulationCompletedEventArgs ^>(this, &GestureHelper::OnManipulationCompleted);
    this->recognizer->ManipulationUpdated += ref new TypedEventHandler<GestureRecognizer ^, ManipulationUpdatedEventArgs ^>(this, &GestureHelper::OnManipulationUpdated);
    this->recognizer->ManipulationInertiaStarting += ref new TypedEventHandler<GestureRecognizer ^, ManipulationInertiaStartingEventArgs ^>(this, &GestureHelper::OnManipulationInertiaStarting);
    }

    void GestureHelper::ProcessPress(PointerPoint ^ppt){
    this->recognizer->ProcessDownEvent(ppt);

    if (this->Clicked) {
    this->Clicked(ppt->Position.X, ppt->Position.Y);
    }
    }

    void GestureHelper::ProcessMove(PointerPoint ^ppt){
    //this->recognizer->ProcessMoveEvents(ppt->GetIntermediatePoints(ppt->PointerId));

    Vector<PointerPoint ^> ^pptVector = ref new Vector<PointerPoint ^>();
    pptVector->Append(ppt);

    this->recognizer->ProcessMoveEvents(pptVector);

    }

    void GestureHelper::ProcessRelease(PointerPoint ^ppt){
      this->recognizer->ProcessUpEvent(ppt);
    }

    Friday, September 4, 2015 7:50 AM
  • Try-catch is helped, but still would like to understand, why this exception throws
    Friday, September 4, 2015 9:46 AM
  • This sounds like an issue we are tracking where the touch packets come out of order and get rejected. A fix is being looked at for an upcoming update.
    • Proposed as answer by IssueKiller Monday, September 7, 2015 1:32 AM
    • Marked as answer by Vladislav Koshyl Monday, September 7, 2015 7:29 AM
    Friday, September 4, 2015 4:55 PM
  • This sounds like an issue we are tracking where the touch packets come out of order and get rejected. A fix is being looked at for an upcoming update.
    Yes, I also encountered this issue, looking forward to the bug fix, thx Rob

    Best Regards,
    Please remember to mark the replies as answers if they help

    Monday, September 7, 2015 1:32 AM