[Interest] [BUG] QDBusAbstractInterface::disconnectNotify

Thiago Macieira thiago.macieira at intel.com
Tue Feb 5 23:23:19 CET 2013


On terça-feira, 5 de fevereiro de 2013 23.11.10, Wolfgang Rohdewald wrote:
> all current sources from master branches (qt, kde)
> 
> in kde, I am running
> kdesrc/build/kde/kdepim-runtime/resources$ ctest -V -V -R maildir-synctest
> which makes the binary synctest coredump deep in Qt. See backtrace below.
> 
> I have been looking at the Qt source code and now I have a suspicion.
> 
> void QDBusAbstractInterface::disconnectNotify(const char *signal)
> {
>     // someone disconnecting from one of our signals
> 
> So this expects signal to be != 0, I assume. This matches the actual code
> which dereferences signal.
> 
> OTOH in QObject::disconnect(), the signal argument may be 0 which
> means "all signals" according to
> http://doc.qt.digia.com/qt/qobject.html#disconnect
> 
> And QObject::disconnect() does call
> QDBusAbstractInterface::disconnectNotify() with signal=0, see qobject.cpp
> line 2928:
> 
>     if (res)
>         const_cast<QObject*>(sender)->disconnectNotify(signal ? (signal - 1)
> : 0);
> 
> 
> So - to me it seems that QDBusAbstractInterface should handle signal=0
> instead of segfaulting.

That is correct.

Please file a bug report or, better yet, a fix :-)
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130205/36297528/attachment.sig>


More information about the Interest mailing list