March 20, 2012

Karunesh Karunesh
Lab Rat
4 posts

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



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:

  1. bool GLWindow::event(QEvent *event)
  2. {
  3.     switch ( event->type() ) {
  4.         case QEvent::TouchBegin: {
  5.             QList<QTouchEvent::TouchPoint> touchBeginPoints =
  6.                         static_cast<QTouchEvent *>(event)->touchPoints();
  7.             foreach (const QTouchEvent::TouchPoint &touchBeginPoint, touchBeginPoints)
  8.             {
  9.                 float touchBeginX = touchBeginPoint.pos().x();
  10.                 float touchBeginY = touchBeginPoint.pos().y();
  11.                 qDebug() << "touchBeginPoint := " << touchBeginX << ",  " << touchBeginY;
  12.             }
  13.             break;
  14.         }
  15.         case QEvent::TouchUpdate: {
  16.             // same as touch begin: getting touch point
  17.             break;
  18.         }
  19.         case QEvent::TouchEnd: {
  20.             // same as touch begin: getting touch point
  21.             break;
  22.         }
  23.         default: {
  24.             qDebug() << "Goodbye";
  25.            return true;
  26.         }
  27.     }
  28.     return true;
  29. }

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.


  • 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

0 replies

  ‹‹ Query on Messaging Module from " QtMobility "      QTimer and QBasicTimer unstable on RTLinux ››

You must log in to post a reply. Not a member yet? Register here!