Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    QList for touch-points not being created, "A data abort exception has occurred"

    Mobile and Embedded
    1
    1
    1472
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      Karunesh last edited by

      Hi

      I am trying to get touch inputs for my program targeting an N8 (and a C7), and I am not able to create a QList for keeping touchpoints using QTouchEvent::touchPoints(). The program crashes with the following line: bq. Thread has crashed: A data abort exception has occurred accessing 0xee

      The events function looks like:
      @
      bool GLWindow::event(QEvent *event)
      {
      switch ( event->type() ) {
      case QEvent::TouchBegin: {
      QListQTouchEvent::TouchPoint touchBeginPoints =
      static_cast<QTouchEvent *>(event)->touchPoints();
      foreach (const QTouchEvent::TouchPoint &touchBeginPoint, touchBeginPoints)
      {
      float touchBeginX = touchBeginPoint.pos().x();
      float touchBeginY = touchBeginPoint.pos().y();
      qDebug() << "touchBeginPoint := " << touchBeginX << ", " << touchBeginY;
      }
      break;
      }
      case QEvent::TouchUpdate: {
      // same as touch begin: getting touch point
      break;
      }
      case QEvent::TouchEnd: {
      // same as touch begin: getting touch point
      break;
      }
      default: {
      qDebug() << "Goodbye";
      return true;
      }
      }
      return true;
      }
      @

      Basically I am just trying to print the touch point. But I am clueless as to why I can't create a QList (lines 7, 18 and 29). The code compiles fine. Any comments are welcome.

      UPDATE:

      • I have never worked with containers before. But creating and using a QList in another part of the program works fine. Should I be including something in my .pro file? (Most problems seem to end up regarding this with me!)
      • My program renders some 3D objects inside a QGLWidget, and I have not needed to call the above function separately (I don't think it should matter). Do touchevents behave differently in QGLWidgets?
      • I read (a bit) about exceptions in Qt and Symbian, but I am not able to get most of that. But I am not doing any networking or resource based i/o or manipulation except textures for 3D objects. When running the code on the device, I get the following warning: "QGLTexturePool: cannot create permanent texture because of invalid params", which I ignored upto now since the textures displayed fine. Is it possible that memory allocation while running the program is creating some problem?

      Thanks and regards
      Karunesh

      1 Reply Last reply Reply Quote 0
      • First post
        Last post