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



  • 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?

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.