Results 1 to 2 of 2

Thread: QSqlDatabase::close() sigsev exception

  1. #1
    Join Date
    Sep 2007
    Location
    Sant'Elpidio a Mare, Italy
    Posts
    194
    Thanks
    54
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default QSqlDatabase::close() sigsev exception

    Hello,

    posting code here is quite endless because is a big lot of code...I don't want to waste your precious time
    Instead I ask for tips about a strange behavior:
    I have a nice QSqlDatabase object, valid, open and cute, everything works fine. Once in a day it has to be closed, so I do
    Qt Code:
    1. // QVector<QSqlDatabase> *vHandle; // vector of connections
    2. // int vIndex; // current index=0, vHandle->count()=1
    3. QSqlDatabase app=vHandle->at(vIndex);
    4. app.close(); // ! exception
    5. vHandle->replace(vIndex,app);
    To copy to clipboard, switch view to plain text mode 
    app.close() raises exception, in detail QMYSQLDriver::close() does, and more in detail mysql_close(d->mysql) does (I can't go deeper debugging).
    So the question is: why should QSqlDatabase::close() raise exception? Aware of this I could find my issue easier.

    EDIT: it is not just close()! Also mysql_real_query raises exception when executing query (QSqlQuery::exec())... now I have to understand why it has to crash instead of warn/fail/anything-else-nicer... any idea?

    Thanks thanks thanks.
    Last edited by Raccoon29; 4th December 2009 at 09:22.
    --
    raccoon29

    "La mia vita finirà quando non vedrò più la gente ridere...non necessariamente alle mie battute "

  2. #2
    Join Date
    Sep 2007
    Location
    Sant'Elpidio a Mare, Italy
    Posts
    194
    Thanks
    54
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: QSqlDatabase::close() sigsev exception

    This problem has been solved in the following thread:
    http://www.qtcentre.org/forum/f-qt-p...tml#post127126
    --
    raccoon29

    "La mia vita finirà quando non vedrò più la gente ridere...non necessariamente alle mie battute "

Similar Threads

  1. Exception not controlled
    By ^NyAw^ in forum Qt Programming
    Replies: 4
    Last Post: 5th October 2009, 16:43
  2. Exception type loss
    By azdruid in forum Qt Programming
    Replies: 3
    Last Post: 6th November 2007, 20:06
  3. Exceptions and qApp->processEvents()
    By mcostalba in forum Qt Programming
    Replies: 3
    Last Post: 8th January 2006, 17:06

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.