[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mythtv-commits
Subject:    Re: [mythtv-commits] Ticket #12477: [Qt5] mythdownloadmanager triggers "QIODevice::read: device not 
From:       "MythTV" <noreply () mythtv ! org>
Date:       2015-07-28 20:03:57
Message-ID: 055.b1891c0d9e88729a8b3c06e5609cc492 () mythtv ! org
[Download RAW message or body]

#12477: [Qt5] mythdownloadmanager triggers "QIODevice::read: device not open"
----------------------------------+-----------------------------
 Reporter:  stuarta               |          Owner:  stuarta
     Type:  Bug Report - General  |         Status:  new
 Priority:  minor                 |      Milestone:  0.28
Component:  Qt5 issues            |        Version:  Master Head
 Severity:  medium                |     Resolution:
 Keywords:  qt5 housekeeper       |  Ticket locked:  0
----------------------------------+-----------------------------

Comment (by stuarta):

 Have captured this in the debugger now.
 {{{
 Program received signal SIGABRT, Aborted.
 [Switching to Thread 0x7f75de7fc700 (LWP 13784)]
 0x00007f76b758acc9 in __GI_raise (sig=sig@entry=6)
     at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
 56      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or
 directory.

 (gdb) bt
 #0  0x00007f76b758acc9 in __GI_raise (sig=sig@entry=6)
     at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
 #1  0x00007f76b758e0d8 in __GI_abort () at abort.c:89
 #2  0x00007f76b83dc30e in QMessageLogger::warning(char const*, ...) const
 ()
    from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
 #3  0x00007f76b850ceca in QIODevice::read(char*, long long) ()
    from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
 #4  0x00007f76b850d5d9 in QIODevice::readAll() ()
    from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
 #5  0x00007f76ba8dca02 in MythDownloadManager::downloadFinished
 (this=0x7f75d800e5d0,
     dlInfo=0x7f75d800d0b0) at mythdownloadmanager.cpp:1225
 #6  0x00007f76ba8db915 in MythDownloadManager::downloadFinished
 (this=0x7f75d800e5d0,
     reply=0x7f767401e8a0) at mythdownloadmanager.cpp:1087
 #7  0x00007f76ba9a0d39 in MythDownloadManager::qt_static_metacall
 (_o=0x7f75d800e5d0,
     _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7f75de7fb8e0)
     at moc_mythdownloadmanager.cpp:89
 #8  0x00007f76b85e62a6 in QMetaObject::activate(QObject*, int, int,
 void**) ()
    from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
 #9  0x00007f76b90a05c2 in QNetworkAccessManager::finished(QNetworkReply*)
 ()
    from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
 #10 0x00007f76b90a0eb4 in ?? () from /usr/lib/x86_64-linux-
 gnu/libQt5Network.so.5
 #11 0x00007f76b90a2d69 in ?? () from /usr/lib/x86_64-linux-
 gnu/libQt5Network.so.5
 #12 0x00007f76b85e722e in QObject::event(QEvent*) ()
    from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
 #13 0x00007f76b85beefd in QCoreApplication::notify(QObject*, QEvent*) ()
    from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
 #14 0x00007f76b85bec2d in QCoreApplication::notifyInternal(QObject*,
 QEvent*) ()
    from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
 #15 0x00007f76b85c0e07 in
 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
 from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
 #16 0x00007f76b860bcd3 in ?? () from /usr/lib/x86_64-linux-
 gnu/libQt5Core.so.5
 #17 0x00007f76af6eae04 in g_main_context_dispatch ()
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 #18 0x00007f76af6eb048 in ?? () from /lib/x86_64-linux-
 gnu/libglib-2.0.so.0
 #19 0x00007f76af6eb0ec in g_main_context_iteration ()
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 #20 0x00007f76b860b98c in
 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
 () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
 #21 0x00007f76ba8d503e in MythDownloadManager::run (this=0x7f75d800e5d0)
     at mythdownloadmanager.cpp:292
 #22 0x00007f76ba86388d in MThreadInternal::run (this=0x7f75d80057e0) at
 mthread.cpp:79
 #23 0x00007f76b83ea233 in ?? () from /usr/lib/x86_64-linux-
 gnu/libQt5Core.so.5
 #24 0x00007f76b8141182 in start_thread (arg=0x7f75de7fc700) at
 pthread_create.c:312
 #25 0x00007f76b764e47d in clone () at
 ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
 }}}

 So this points to the download manager not handling a disconnected
 endpoint.
 Relevant code is as follows

 {{{
 1220         // If we downloaded via the QNetworkAccessManager
 1221         // AND the caller isn't handling the reply directly
 1222         if (reply && dlInfo->m_processReply)
 1223         {
 1224             bool append = (!dlInfo->m_syncMode && dlInfo->m_caller);
 1225             QByteArray data = reply->readAll();
 1226             dataSize = data.size();
 }}}

 The ''QByteArray data = reply->readAll();'' is where the issue occurs

--
Ticket URL: <https://code.mythtv.org/trac/ticket/12477#comment:2>
MythTV <http://www.mythtv.org>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic