Problem with running application after updating QT



  • Hello,

    A friend of mine created a program using QT that runs on Ubuntu 12.04. This program has been running for a few years now without any problems but since I updated Ubuntu the program crashes when someone tries to login in (it is a server and people can login using a client).

    I'm not a professional coder so I googled how I could fix this and most topics linked to valgrind or gdb. I ran both debuggers but I still can't find the problem.

    The output valgrind gives is:

    bq. ==18300== Thread 2:
    ==18300== Use of uninitialised value of size 4
    ==18300== at 0x455E814: QString::operator=(QString const&) (in /usr/lib/i386-linux-gnu/libQtCore.so.4.8.1)
    ==18300== by 0x4D9B657: ???
    ==18300==
    ==18300== Invalid read of size 4
    ==18300== at 0x455E814: QString::operator=(QString const&) (in /usr/lib/i386-linux-gnu/libQtCore.so.4.8.1)
    ==18300== by 0x4D9B657: ???
    ==18300== Address 0x0 is not stack'd, malloc'd or (recently) free'd
    ==18300==
    ==18300==
    ==18300== Process terminating with default action of signal 11 (SIGSEGV)
    ==18300== Access not within mapped region at address 0x0
    ==18300== at 0x455E814: QString::operator=(QString const&) (in /usr/lib/i386-linux-gnu/libQtCore.so.4.8.1)
    ==18300== by 0x4D9B657: ???
    ==18300== If you believe this happened as a result of a stack
    ==18300== overflow in your program's main thread (unlikely but
    ==18300== possible), you can try to increase the size of the
    ==18300== main thread stack using the --main-stacksize= flag.
    ==18300== The main thread stack size used in this run was 8388608.
    ==18300==
    ==18300== HEAP SUMMARY:
    ==18300== in use at exit: 256,719 bytes in 823 blocks
    ==18300== total heap usage: 5,321 allocs, 4,498 frees, 1,622,113 bytes allocated
    ==18300==
    ==18300== LEAK SUMMARY:
    ==18300== definitely lost: 0 bytes in 0 blocks
    ==18300== indirectly lost: 0 bytes in 0 blocks
    ==18300== possibly lost: 5,764 bytes in 50 blocks
    ==18300== still reachable: 250,955 bytes in 773 blocks
    ==18300== suppressed: 0 bytes in 0 blocks
    ==18300== Rerun with --leak-check=full to see details of leaked memory
    ==18300==
    ==18300== For counts of detected and suppressed errors, rerun with: -v
    ==18300== Use --track-origins=yes to see where uninitialised values come from
    ==18300== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
    Killed

    I only see links to the qt libs but I don't think there is a problem with QT. Do you have any idea how I can fix this?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Valgrind is a memory analyzer not a debugger. In your case you should use gdb to find the crash source



  • bq. Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0xb5d82b40 (LWP 18368)]
    0xb7946814 in QString::operator=(QString const&) () from /usr/lib/i386-linux-gnu/libQtCore.so.4

    I ran gdb and i got this message back from the system. Because of the Segmentation Fault I used valgrind


  • Lifetime Qt Champion

    You should have more information about what lead to that crash, e.g. all functions called before this one


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.