0
我糾正了我在編寫Qt
的程序中的所有內存泄漏。
我發現了一些無法應對的錯誤。Valgrind - libgtk-x11
==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>
我的主要功能
#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
}
一整天時間來修復它,我沒有任何想法是什麼意思。
有人可以幫助我嗎?
它看起來像在第三方庫中的問題。你可能不應該試圖解決它。 – 2014-12-11 03:45:13
對不起,我的語言。在我的國家是上午5點...你有任何想法如何將它推出? – 2014-12-11 03:48:39