[Qt-interest] Qt 4.5.0 not 'valgrind proof'

Denis Dzyubenko denis.dzyubenko at trolltech.com
Mon Mar 16 11:10:27 CET 2009


Hi,

Christoph Duelli wrote:
>> I get segfault errors in valgrind even before my app starts.
>>
>> Here as sample backtrace
>>
>> ==25795== Process terminating with default action of signal 11 (SIGSEGV):
>> dumping core
>> ==25795==  Access not within mapped region at address 0x9D
>> ==25795==    at 0x6A027BD: QString::fromLocal8Bit(char const*, int)
>> (qstring.cpp:3652)
>> ==25795==    by 0x6AB2032: QCoreApplication::arguments()
>> (qcoreapplication.cpp:1921)
> 
> Guessing without code is probably not too helpful, but still:
> I once made the trivial mistake of forgetting the "&" (in int &argc) in my
> QApplication-subclass's constructor. This had "interesting" effects...
> Just an idea...

indeed. According to the QApplication documentation[1], arguments 
provided to the QApplication constructor must be valid objects during 
the lifetime of the qapplication object.

[1] http://doc.trolltech.com/4.5/qapplication.html#QApplication

-- 
Denis Dzyubenko
Software Engineer
Nokia, Qt Software



More information about the Qt-interest-old mailing list