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

Asynchronous image provider crashes application sometimes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 4.7.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Windows XP, Qt 4.7.1

      Description

      My qml view is ListView and delegate is Image showing images loaded from Internet. I wanted to cache loaded images on disk. I implemented my own QDeclarativeImageProvider which uses its own QNetworkAccessManager to load image from Internet and save it to disk. QML Image element has asynchronous flag set to true and my QDeclarativeImageProvider is Image type loader (not Pixmap).

      It seems that quite often this causes application to crash. Debugging shows that it crashes always to line 1133 in qcoreapplication.cpp

      QtCored4.dll!QCoreApplication::postEvent(QObject * receiver=0x039e97a0, QEvent * event=0x0394f670, int priority=0) Line 1133 + 0x3 bytes
      QtCored4.dll!QCoreApplication::postEvent(QObject * receiver=0x039e97a0, QEvent * event=0x0394f670) Line 1094 + 0xf bytes
      QtDeclaratived4.dll!QDeclarativePixmapReply::postReply(QDeclarativePixmapReply::ReadError error=NoError, const QString & errorString=

      {...}, const QSize & implicitSize={...}

      , const QImage & image=

      {...}) Line 256 + 0x59 bytes
      QtDeclaratived4.dll!QDeclarativePixmapReader::processJob(QDeclarativePixmapReply * runningJob=0x039e97a0, const QUrl & url={...}

      , const QSize & requestSize=

      {...}

      ) Line 465
      QtDeclaratived4.dll!QDeclarativePixmapReader::processJobs() Line 441
      QtDeclaratived4.dll!QDeclarativePixmapReaderThreadObject::event(QEvent * e=0x039e9968) Line 398

      Is there a better way to implement caching images to disk?

        Attachments

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

          Activity

            People

            • Assignee:
              martjone Martin Jones (closed Nokia identity) (Inactive)
              Reporter:
              ahvenlam Antti Ahvenlampi
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes