Results 1 to 2 of 2

Thread: Segfault in Construkctor of QCoreApplication?!?

  1. #1
    Join Date
    Nov 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Segfault in Construkctor of QCoreApplication?!?

    Maybe I'm doing something fundamentally wrong ...

    I'm working under Ubuntu 8.04 Desktop on an IBM R52 laptop in an open-source project named "fingerprint GUI" using Qt4 for the development of the user interface. The project is aimed to enable login and PAM authentication using fingerprint sensor devices on Linux. Significant parts of the project work already. You can find the project on "http://www.pdfserver.net/fingerprint".

    How it works (For those who are not familiar with PAM):
    If e.g. a fingerprint login is required, the Gnome display manager "GDM" calls
    the PAM library "libpam.so" for authentication of the user. Depending on the PAM configuration in "/etc/pam.d" libpam.so calls the PAM module (in my case
    libpam_fingerprint.so) and waits for user authentication. this "libpam_fingerprint.so" is part of my project. It activates a QtDialog and urges the user to identify with his fingerprint.

    Now to my problem:
    While various applications such as GDM, su, sudo and gksu work fine, it comes in case of "gnome-screensaver" to a "SegFault" if the QCoreApplication object is initialized (entry in /var/log/syslog):
    "gnome-screensav[14369]: segfault at 00000008 eip b68702cf esp bf982130 error 4"

    This happens _always_ in line 457 of qcoreapplication.cpp. This is the relevant part in qcoreapplication.cpp:

    Qt Code:
    1. // ### move to QCoreApplicationPrivate constructor?
    2. void QCoreApplication::init()
    3. {
    4.  
    5. #ifdef Q_OS_UNIX
    6. setlocale(LC_ALL, ""); // use correct char set mapping
    7. setlocale(LC_NUMERIC, "C"); // make sprintf()/scanf() work
    8. #endif
    9.  
    10. #ifdef Q_WS_WIN
    11. // Get the application name/instance if qWinMain() was not invoked
    12. set_winapp_name();
    13. #endif
    14.  
    15. Q_ASSERT_X(!self, "QCoreApplication", "there should be only one application object");
    16. QCoreApplication::self = this;
    17.  
    18. #ifndef QT_NO_THREAD
    19. QThread::initialize();
    20. #endif
    21.  
    22. // use the event dispatcher created by the app programmer (if any)
    23. if (!QCoreApplicationPrivate::eventDispatcher)
    24. QCoreApplicationPrivate::eventDispatcher = d->threadData->eventDispatcher;
    25. // otherwise we create one
    26. if (!QCoreApplicationPrivate::eventDispatcher)
    27. d->createEventDispatcher(); //HERE IT HAPPENS !!!!!!!!!!
    28. Q_ASSERT(QCoreApplicationPrivate::eventDispatcher != 0);
    To copy to clipboard, switch view to plain text mode 

    I can reproduce this behavior with gnome-screensaver 2.22.2 and 2.20.x as well as with Qt version 4.3.4-0 (Ubuntu) and 4.4.3 (from qt-x11-opensource-src-4.4.3).

    In order to proof the error is not caused by my "libpam_fingerprint.so" I have built a very simple "libpam_dummy.so" library to be used with PAM. It creates a simple QDialog when called by PAM and returns PAM_SUCCESS on close. The sources I have attached here in file "pam_dummy.tar.gz". This simple module library causes _always_ the same segfault in the same line 457 of qcoreapplication.cpp as well.

    Now I don't have any idea about how to fix this. Either I'm doing something completely wrong or there is a bug in gnome-screensaver or in Qt. If anyone can help to find out what happens please have a look at it.

    Thanks for any advice!

    W.U.
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Segfault in Construkctor of QCoreApplication?!?

    ...nobody any ideas??

    W.U.

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.