Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, January 2007
interpreting valgrind messages


Message 1 in thread

Hi,

I'm having problems interpreting some messages of valgrind. I'm not sure if it 
means that the valgring output below is related to a problem in my 
allpication code or Qt/X11.
Therefore, my question: Does this valgrind output look familiar to anybody?
If no, it probably means that there is something wrong with my own code.

BTW, I'm using Qt-4.2.2 on Suse 10.1 x86_64 (gcc 4.1.0)

Cheers,
-Rainer


--------------- valgind output ---------------
==5655== Conditional jump or move depends on uninitialised value(s)
==5655==    at 0x69B4378: XSetCommand (in /usr/X11R6/lib64/libX11.so.6.2)
==5655==    by 0x69C2C18: XSetWMProperties (in /usr/X11R6/lib64/libX11.so.6.2)
==5655==    by 0x5486634: 
QApplicationPrivate::applyX11SpecificCommandLineArguments(QWidget*) 
(qapplication_x11.cpp:2183)
==5655==    by 0x5479A83: QWidget::setVisible(bool) (qwidget.cpp:5155)
==5655==    by 0x5B306A: main (qwidget.h:415)
==5655==
==5655== Conditional jump or move depends on uninitialised value(s)
==5655==    at 0x69B43C7: XSetCommand (in /usr/X11R6/lib64/libX11.so.6.2)
==5655==    by 0x69C2C18: XSetWMProperties (in /usr/X11R6/lib64/libX11.so.6.2)
==5655==    by 0x5486634: 
QApplicationPrivate::applyX11SpecificCommandLineArguments(QWidget*) 
(qapplication_x11.cpp:2183)
==5655==    by 0x5479A83: QWidget::setVisible(bool) (qwidget.cpp:5155)
==5655==    by 0x5B306A: main (qwidget.h:415)

--
 [ signature omitted ] 

Message 2 in thread

On Monday, 15. January 2007 14:35, Rainer Sabelka wrote:
> I'm having problems interpreting some messages of valgrind. I'm not sure if
> it means that the valgring output below is related to a problem in my
> allpication code or Qt/X11.

Answering my own post, I found out that the valgrind message was caused indeed 
by a bug in my own code.

I subclasses QApplication but provided wrong constructor arguments:

Instead of QApplication(int &argc, char **argv) I used QApplication(int argc, 
char **argv) - I sipmly forgot the & before argc.
Therefore the QApplication stored a reference to argc, which went out of scope 
after finishing the constuctor, which caused the trouble later on.

-Rainer

--
 [ signature omitted ]