Look_Im_Your_Root
Look_Im_Your_Root

Reputation: 15

Valgrind - libgtk-x11

I correct my all memory leak in my program writing in Qt.
I found some errors which can not cope.

==3343== Conditional jump or move depends on uninitialised value(s)
==3343==    at 0x80B4320: g_utf8_offset_to_pointer (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==3343==    by 0x106806A0: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.23)
==3343==    by 0x10680D28: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.23)
==3343==    by 0x10C1ACE6: ??? (in /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0.2400.23)
==3343==    by 0x8086CE4: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==3343==    by 0x8087047: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==3343==    by 0x80870EB: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==3343==    by 0x64C2453: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /home/michal/Qt/5.4/gcc_64/lib/libQt5Core.so.5.4.0)
==3343==    by 0x6465DAA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /home/michal/Qt/5.4/gcc_64/lib/libQt5Core.so.5.4.0)
==3343==    by 0x646ACC4: QCoreApplication::exec() (in /home/michal/Qt/5.4/gcc_64/lib/libQt5Core.so.5.4.0)
==3343==    by 0x406317: main (main.cpp:9)</code>

my main function

#include "mainwindow.hh"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    return a.exec(); //this is my 9th line
}

The whole day trying to fix it and I don't have any idea what's mean.
Could someone help me?

Upvotes: 0

Views: 279

Answers (1)

Severin Pappadeux
Severin Pappadeux

Reputation: 20130

For libraries which you're not interested in and have no means to fix problems, you create valgrind suppression file and they won't be shown again

Please see manual

http://valgrind.org/docs/manual/manual-core.html

Section 2.5 Suppressing errors

Upvotes: 1

Related Questions