Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-50928

QNetworkAccessManager, "Type conversion already registered from type QSharedPointer<QNetworkSession> to type QObject*" warning

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.4.1, 5.5.1, 5.6.0 Beta
    • Network
    • None
    • Windows 8.1 x64, Visual Studio 2013

    Description

      I have multithreaded C++ application which uses QNetworkAccessManager in it's threads. Sometimes it gives me this warning message:

      Type conversion already registered from type QSharedPointer<QNetworkSession> to type QObject*

      QNetworkAccessManager creates separate thread (it's name is "Qt HTTP thread"). This is where warning starts.
      Call stack (for Qt 5.5.1) looks like this:

       	Qt5Cored.dll!qt_message_print(QtMsgType msgType=QtWarningMsg, const QMessageLogContext & context={...}, const QString & message={...}) Line 1543
       	Qt5Cored.dll!qt_message(QtMsgType msgType=QtWarningMsg, const QMessageLogContext & context={...}, const char * msg=0x571f79d8, char * ap=0x0f18d69c) Line 266
       	Qt5Cored.dll!QMessageLogger::warning(const char * msg=0x571f79d8, ...) Line 544
       	Qt5Cored.dll!QMetaType::registerConverterFunction(const QtPrivate::AbstractConverterFunction * f=0x5811b8f4, int from=1046, int to=39) Line 642
       	Qt5Networkd.dll!QtPrivate::MetaTypeSmartPointerHelper<QSharedPointer<QNetworkSession>,void>::registerConverter(int id=1046) Line 2075
       	Qt5Networkd.dll!qRegisterNormalizedMetaType<QSharedPointer<QNetworkSession> >(const QByteArray & normalizedTypeName={...}, QSharedPointer<QNetworkSession> * dummy=0xffffffff, QtPrivate::MetaTypeDefinedHelper<QSharedPointer<QNetworkSession>,1>::DefinedType defined=Defined) Line 1686
       	Qt5Networkd.dll!QtPrivate::SharedPointerMetaTypeIdHelper<QSharedPointer<QNetworkSession>,1>::qt_metatype_id() Line 2075
       	Qt5Networkd.dll!QMetaTypeId2<QSharedPointer<QNetworkSession> >::qt_metatype_id() Line 1584
       	Qt5Networkd.dll!qMetaTypeId<QSharedPointer<QNetworkSession> >() Line 1727
       	Qt5Networkd.dll!qVariantFromValue<QSharedPointer<QNetworkSession> >(const QSharedPointer<QNetworkSession> & t={...}) Line 496
       	Qt5Networkd.dll!QVariant::fromValue<QSharedPointer<QNetworkSession> >(const QSharedPointer<QNetworkSession> & value={...}) Line 350
       	Qt5Networkd.dll!QHttpNetworkConnectionChannel::init() Line 107
       	Qt5Networkd.dll!QHttpNetworkConnectionChannel::ensureConnection() Line 252
       	Qt5Networkd.dll!QHttpNetworkConnectionPrivate::_q_startNextRequest() Line 1014
       	Qt5Networkd.dll!QHttpNetworkConnection::qt_static_metacall(QObject * _o=0x06d97a20, QMetaObject::Call _c=InvokeMetaMethod, int _id=0, void * * _a=0x05c94970) Line 78
       	Qt5Cored.dll!QMetaCallEvent::placeMetaCall(QObject * object=0x06d97a20) Line 486
       	Qt5Cored.dll!QObject::event(QEvent * e=0x06d9f9f0) Line 1240
       	Qt5Cored.dll!QCoreApplicationPrivate::notify_helper(QObject * receiver=0x06d97a20, QEvent * event=0x06d9f9f0) Line 1094
       	Qt5Cored.dll!QCoreApplication::notify(QObject * receiver=0x06d97a20, QEvent * event=0x06d9f9f0) Line 1038
       	Qt5Cored.dll!QCoreApplication::notifyInternal(QObject * receiver=0x06d97a20, QEvent * event=0x06d9f9f0) Line 965
       	Qt5Cored.dll!QCoreApplication::sendEvent(QObject * receiver=0x06d97a20, QEvent * event=0x06d9f9f0) Line 224
       	Qt5Cored.dll!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver=0x00000000, int event_type=0, QThreadData * data=0x06e27d08) Line 1593
      	Qt5Cored.dll!QEventDispatcherWin32::sendPostedEvents() Line 1241
       	Qt5Cored.dll!qt_internal_proc(HWND__ * hwnd=0x00fa0238, unsigned int message=1025, unsigned int wp=0, long lp=0) Line 416
       	user32.dll!__InternalCallWinProc@20()
       	user32.dll!UserCallWinProcCheckWow()
       	user32.dll!_DispatchMessageWorker@8()
       	user32.dll!_DispatchMessageW@4()
       	Qt5Cored.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 818
       	Qt5Cored.dll!QEventLoop::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 129
       	Qt5Cored.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...}) Line 204
       	Qt5Cored.dll!QThread::exec() Line 503
       	Qt5Cored.dll!QThread::run() Line 571
       	Qt5Cored.dll!QThreadPrivate::start(void * arg=0x07194f10) Line 369
       	msvcr120d.dll!__beginthreadex()
       	msvcr120d.dll!__endthreadex()
       	kernel32.dll!@BaseThreadInitThunk@12()
       	ntdll.dll!__RtlUserThreadStart()
       	ntdll.dll!__RtlUserThreadStart@8()
      
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            cnn Qt Core & Network
            yuri_q Yuri M
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes