Results 1 to 11 of 11

Thread: [Qt4.1]program segfault after upgrading from 4.0.1 to 4.1

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [Qt4.1]program segfault after upgrading from 4.0.1 to 4.1

    Did you upgrade MySQL libs recently?

  2. #2
    Join Date
    Jan 2006
    Posts
    46
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [Qt4.1]program segfault after upgrading from 4.0.1 to 4.1

    yes I did, I used to use 4.1 before so /usr/lib/libmysqlclient.so.14.0.0 now I use /usr/lib/libmysqlclient.so.15.0.0, you think that might be the problem?

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [Qt4.1]program segfault after upgrading from 4.0.1 to 4.1

    Quote Originally Posted by patcito
    yes I did, I used to use 4.1 before so /usr/lib/libmysqlclient.so.14.0.0 now I use /usr/lib/libmysqlclient.so.15.0.0, you think that might be the problem?
    It crashes when the execution flow enters libmysqlclient, so if you did upgrade that library, it might be the cause.

    But first write a small program that connects to the database and fetches some data, if it doesn't crash the problem is in your code for 100%, if it crashes it is more likely that the problem in lack of binary compatibility between two versions of libmysqlclient.

    If you are using plugins, you can try to recompile QMYSQL driver, otherwise you will have to recompile whole Qt.

  4. #4
    Join Date
    Jan 2006
    Posts
    46
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [Qt4.1]program segfault after upgrading from 4.0.1 to 4.1

    I did a basic program and it segfaults too, I'll report it to the kubuntu guys thanx.

    Pat

    Update: here is the test program: http://p80.free.fr/basicmysql.tar.bz2 could you confirm it doesn't crash for you please? it displays mysql users in a qtableview, you can modify connection.h to change the user password
    Last edited by patcito; 8th February 2006 at 02:05.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [Qt4.1]program segfault after upgrading from 4.0.1 to 4.1

    Quote Originally Posted by patcito
    here is the test program: http://p80.free.fr/basicmysql.tar.bz2 could you confirm it doesn't crash for you please? it displays mysql users in a qtableview, you can modify connection.h to change the user password
    My idea of a small program is:
    Qt Code:
    1. #include <QtDebug>
    2. #include <QApplication>
    3. #include <QVariant>
    4.  
    5. #include "connection.h"
    6.  
    7. int main(int argc, char *argv[])
    8. {
    9. QApplication app(argc, argv);
    10.  
    11. createConnection();
    12.  
    13. QSqlQuery q( "SELECT * FROM user" );
    14. qDebug() << q.lastError();
    15. while( q.next() ) {
    16. qDebug() << q.value( 0 ) << q.value( 1 );
    17. }
    18. }
    To copy to clipboard, switch view to plain text mode 

    Anyway, it seems that there is a bug in Qt 4.1.0. If I change CutePOS::initialize() to:
    Qt Code:
    1. model->setQuery( "select * from user" );
    2. ui.articlestableView->setModel(model);
    To copy to clipboard, switch view to plain text mode 
    it works.

  6. #6
    Join Date
    Jan 2006
    Posts
    46
    Thanks
    13
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default [Solved] [Qt4.1]program segfault after upgrading from 4.0.1 to 4.1

    Thanx a lot for your help. I compiled a snapshot of Qt4.1.1 and it does run now!

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
  •  
Qt is a trademark of The Qt Company.