Results 1 to 20 of 48

Thread: Program crashes (SIGSEGV)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Program crashes (SIGSEGV)

    @marcel: He doesn't use qmake.

    It's enough if you add the -ggdb flag.

  2. #2
    Join Date
    May 2007
    Posts
    37
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Program crashes (SIGSEGV)

    There changes nothing:

    # gdb ./QQMsn 2> ../QQMsn_debug.txt
    GNU gdb 6.5
    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 "i586-suse-linux"...Using host libthread_db library "/lib/libthread_db.so.1".

    (gdb) run
    Starting program: /home/quinten/QQMsn_build/QQMsn
    [Thread debugging using libthread_db enabled]
    [New Thread -1222338864 (LWP 4290)]
    [New Thread -1224852592 (LWP 4297)]

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread -1222338864 (LWP 4290)]
    0xb66f7d83 in SSL_read () from /usr/lib/libssl.so
    (gdb) bt
    #0 0xb66f7d83 in SSL_read () from /usr/lib/libssl.so
    #1 0x00000004 in ?? ()
    #2 0x00000004 in ?? ()
    #3 0x00000000 in ?? ()
    (gdb) kill
    Kill the program being debugged? (y or n) y
    But I don't understand a backtrace, how do you have to read it? Where can you find the crucial information in the backtrace?
    Using Qt version 4.3.0

  3. #3
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Program crashes (SIGSEGV)

    From what I see in the call stack, it crashes in libssl.
    Qt supports SSL from 4.3. Did you link with the correct( required ) ssl library ?
    Maybe you didn't have the correct version when you compiled Qt. Anyway, It does not make a lot of sense crashing at that point ( perhaps a bug in Qt related to SSL ? ).

    Try disabling SSL from QHttp, if you can...

    To Wysota: It doesn't matter if he enables debugging information in his app, because it crashes in another lib.

    Regards

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Program crashes (SIGSEGV)

    Quote Originally Posted by marcel View Post
    To Wysota: It doesn't matter if he enables debugging information in his app, because it crashes in another lib.
    Of course it matters - something calls this "another lib", right?. As you can see three symbols are not identified correctly. And it looks like a corrupted stack (look at symbol addresses, it looks like the frame stack is incorrect), by the way, so I suggest doing "make distclean && qmake && make" first to make sure the app is compiled properly. Blaiming OpenSSL is certainly not the way to go.

Similar Threads

  1. Porting my program to another windows machine !
    By probine in forum Qt Programming
    Replies: 1
    Last Post: 14th March 2007, 06:46
  2. QT Program debug,GDB on Linux
    By darpan in forum General Programming
    Replies: 1
    Last Post: 26th January 2007, 22:02
  3. QT MySQL
    By sabeeshcs in forum Newbie
    Replies: 6
    Last Post: 12th January 2007, 04:19
  4. Enter key causing program to exit
    By welby in forum Qt Programming
    Replies: 2
    Last Post: 9th March 2006, 16:11
  5. Reading from TCP Socket crashes program
    By OnionRingOfDoom in forum Qt Programming
    Replies: 26
    Last Post: 27th January 2006, 19:32

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.