Results 1 to 3 of 3

Thread: segmentation fault error

  1. #1
    Join Date
    Jul 2008
    Location
    Chennai, India
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default segmentation fault error

    i have installed Qt 4 on slackware 12.1 without GUI , the installation has done successfully qmake -project, qmake, make everything working fine. while executing the output script getting segmentation fault it doesnt show any errors.

    Just I have tried sample program to verify the installation.

    Here is the code

    Qt Code:
    1. #include <QCoreApplication>
    2. #include <QtDebug>
    3. int main(int argc,char*argv[])
    4. {
    5. qDebug()<<"WithinMain";
    6. QCoreApplication app(argc,argv);
    7. qDebug ()<<"Running";
    8. return app.exec();
    9. }
    To copy to clipboard, switch view to plain text mode 
    Output
    within main
    Segmentation fault

    what could be the wrong? Please help me

    root@myami:/home/pr# ldd pr
    linux-gate.so.1 => (0xbfffe000)
    libQtGui.so.4 => /usr/local/Trolltech/Qt-4.4.0/lib/libQtGui.so.4 (0xb765b000)
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb75e8000)
    libXext.so.6 => /usr/lib/libXext.so.6 (0xb75da000)
    libX11.so.6 => /usr/lib/libX11.so.6 (0xb74f3000)
    libQtCore.so.4 => /usr/local/Trolltech/Qt-4.4.0/lib/libQtCore.so.4 (0xb72b9000)
    librt.so.1 => /lib/librt.so.1 (0xb72af000)
    libdl.so.2 => /lib/libdl.so.2 (0xb72ab000)
    libpthread.so.0 => /lib/libpthread.so.0 (0xb7294000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb71b0000)
    libm.so.6 => /lib/libm.so.6 (0xb718a000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xb717f000)
    libc.so.6 => /lib/libc.so.6 (0xb7032000)
    libz.so.1 => /usr/lib/libz.so.1 (0xb701e000)
    libXau.so.6 => /usr/lib/libXau.so.6 (0xb701b000)
    libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb7019000)
    libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb7002000)
    /lib/ld-linux.so.2 (0xb7f30000)
    libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb6ffc000)
    installation path: /usr/local/Trolltech/Qt-4.4.0/

    Thanks in advnace
    Sg..
    Last edited by jpn; 24th July 2008 at 17:30. Reason: missing tags

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: segmentation fault error

    Could you show us the backtrace from gdb?
    J-P Nurmi

  3. #3
    Join Date
    Jul 2008
    Location
    Chennai, India
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: segmentation fault error

    Thanks a lot for your response.

    I am an Linux admin so not aware of Qt programs, I need to install the Qt successfully

    Here I post the output of gdb backtrace .. Please help me

    root@myami:/home/qtscripts# gdb qtscripts
    GNU gdb 6.6
    Copyright (C) 2006 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB. Type "show warranty" for details.
    This GDB was configured as "i486-slackware-linux"...
    Using host libthread_db library "/lib/libthread_db.so.1".
    (gdb) run
    Starting program: /home/qtscripts/qtscripts
    warning: Cannot initialize thread debugging library: unknown thread_db error '22'
    warning: Cannot initialize thread debugging library: unknown thread_db error '22'
    warning: Cannot initialize thread debugging library: unknown thread_db error '22'
    warning: Cannot initialize thread debugging library: unknown thread_db error '22'
    warning: Cannot initialize thread debugging library: unknown thread_db error '22'
    warning: Cannot initialize thread debugging library: unknown thread_db error '22'
    warning: Cannot initialize thread debugging library: unknown thread_db error '22'
    warning: Cannot initialize thread debugging library: unknown thread_db error '22'
    warning: Cannot initialize thread debugging library: unknown thread_db error '22'
    warning: Cannot initialize thread debugging library: unknown thread_db error '22'
    warning: Cannot initialize thread debugging library: unknown thread_db error '22'
    warning: Cannot initialize thread debugging library: unknown thread_db error '22'
    warning: Cannot initialize thread debugging library: unknown thread_db error '22'

    Program received signal SIGSEGV, Segmentation fault.
    0x0de26093 in ?? ()

    (gdb) bt
    #0 0x0de26093 in ?? ()
    #1 0xb6f33917 in gconv () from /usr/lib/gconv/UTF-16.so
    #2 0xb6fe4c99 in __gconv () from /lib/libc.so.6
    #3 0xb6fe42ce in iconv () from /lib/libc.so.6
    #4 0xb73cf2bd in QIconvCodec::convertFromUnicode (this=0x8052568,
    uc=0x8051efa, len=14) at codecs/qiconvcodec.cpp:242
    #5 0xb73c97a7 in QTextCodec::fromUnicode (this=0x8052568, str=@0x8051f38)
    at codecs/qtextcodec.cpp:1182
    #6 0xb72eb81e in QString::toLocal8Bit (this=0x8051f38)
    at tools/qstring.cpp:3059
    #7 0xb732cb69 in locale_encode (f=@0x8051f38) at io/qfile.cpp:68
    #8 0xb732c9aa in QFile::encodeName (fileName=@0x8051f38) at io/qfile.cpp:461
    #9 0xb7376e22 in QFSFileEnginePrivate::nativeInitFileName (this=0x8051f28)
    at io/qfsfileengine_unix.cpp:131
    #10 0xb7371654 in QFSFileEngine (this=0x8051cd0, file=@0xbfc19b50)
    at io/qfsfileengine.cpp:187
    #11 0xb731e7ff in QAbstractFileEngine::create (fileName=@0xbfc19b50)
    at io/qabstractfileengine.cpp:203
    #12 0xb7333647 in QFileInfoPrivate::initFileEngine (this=0x8051c48,
    file=@0xbfc19b50) at io/qfileinfo.cpp:140
    #13 0xb7333bfa in QFileInfo (this=0xbfc19b48, file=@0xbfc19b50)
    at io/qfileinfo.cpp:387
    #14 0xb739d2ac in QCoreApplication::applicationFilePath ()
    ---Type <return> to continue, or q <return> to quit---
    at kernel/qcoreapplication.cpp:1678
    #15 0xb739dd0b in QCoreApplication::applicationDirPath ()
    at kernel/qcoreapplication.cpp:1624
    #16 0xb729b77c in QLibraryInfoPrivate::findConfiguration ()
    at global/qlibraryinfo.cpp:138
    #17 0xb729b957 in QLibrarySettings (this=0x8051c00)
    at global/qlibraryinfo.cpp:109
    #18 0xb729b9c6 in qt_library_settings () at global/qlibraryinfo.cpp:75
    #19 0xb729babe in QLibraryInfo::location (loc=QLibraryInfo::PluginsPath)
    at global/qlibraryinfo.cpp:99
    #20 0xb739e106 in QCoreApplication::libraryPaths ()
    at kernel/qcoreapplication.cpp:1965
    #21 0xb739e84b in QCoreApplication::init (this=0xbfc19ef4)
    at kernel/qcoreapplication.cpp:472
    #22 0xb739ea85 in QCoreApplication (this=0xbfc19ef4, p=@0x804b198)
    at kernel/qcoreapplication.cpp:392
    #23 0xb7741bdc in QApplication (this=0xbfc19ef4, argc=@0xbfc19f50,
    argv=0xbfc19fd4, GUIenabled=false, _internal=263168)
    at kernel/qapplication.cpp:700
    #24 0x08048c89 in main ()

Similar Threads

  1. nmake error during .pro compiling
    By mattia in forum Installation and Deployment
    Replies: 5
    Last Post: 18th June 2008, 10:15
  2. Compile 4.4.0
    By LordQt in forum Installation and Deployment
    Replies: 18
    Last Post: 29th May 2008, 13:43
  3. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 12:57
  4. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 02:49
  5. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 12:19

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.