1

この潜在的に問題のあるメモリ アクセス パターンをデバッグする方法について、何か理論はありますか? 私が経験している特定の heisen バグに関連している可能性があると思いますが、それを特定することはできません。

これは、valgrind の下で、デバッグ ビルドの実行のスニペットです--track-origins=yes--leak-check=full

Qt の Gui lib を悪用して、次のように表示される可能性はありますか?

==15169== Conditional jump or move depends on uninitialised value(s)
==15169==    at 0x99CD8AA: XSetCommand (in /usr/lib64/libX11.so.6.3.0)
==15169==    by 0x99D1FFE: XSetWMProperties (in /usr/lib64/libX11.so.6.3.0)
==15169==    by 0x7280853: QWidgetPrivate::create_sys(unsigned long, bool, bool) (in /usr/lib64/qt4/libQtGui.so.4.8.3)
==15169==    by 0x723550F: QWidget::create(unsigned long, bool, bool) (in /usr/lib64/qt4/libQtGui.so.4.8.3)
==15169==    by 0x723F3E1: QWidget::setVisible(bool) (in /usr/lib64/qt4/libQtGui.so.4.8.3)
==15169==    by 0x40DFE5: QWidget::show() (qwidget.h:494)
==15169==    by 0x40DA5D: SYSApplication::on_start() (sysapplication.cpp:55)
==15169==    by 0x40D5BC: main (main.cpp:8)
==15169==  Uninitialised value was created by a stack allocation
==15169==    at 0x723F0E0: QWidget::setVisible(bool) (in /usr/lib64/qt4/libQtGui.so.4.8.3)
==15169== 
4

1 に答える 1

0

Check what variables your reference at main.cpp:8 and sysapplication.cpp:55. If you're at fault then one of the variables in use here is at fault.

Also, check out Uninitialised value was created by a stack allocation at QWidget::setVisible - Do you ever call setVisible? If so, what is the value of the parameter?

Important note: Valgrind will keep track of memory that is copied around. If you have:

int i;       // 1
int j = i;   // 2
int k = j;   // 3
if (k) {}    // 4

then Valgrind will throw this error at line 4 even though line 1 is at the source of the error.

It's also possible that Qt is failing to initialize something. Plenty of libraries throw a lot of worrying errors when run under Valgrind.

于 2012-09-26T22:24:30.400 に答える