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

osm geocode plugin crash app if try to delete QGeoServiceProvider before QNetworkReply received

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.0
    • 5.5.0
    • Location: Places
    • None

    Description

      The next code causes exception:

      QVariantMap qvm;
              QGeoServiceProvider* m_gsp = new QGeoServiceProvider("osm",qvm, true);
              QGeoCodingManager* manager = m_gsp->geocodingManager();
              QGeoRectangle bounds(QGeoCoordinate(90, -180), QGeoCoordinate(-90,180));
              QGeoCodeReply*  reply = manager->geocode("pizza",-1, 0, bounds);
              //connect(reply,&QGeoCodeReply::finished, SOMEWHERE);
              m_gsp->deleteLater();

      Here if m_gsp would be deleted after "reply" successfully received and handled then everything fine. But if not(as in code above) then exception occured in qgeocodereplyosm.cpp:60 :

      QGeoCodeReplyOsm::~QGeoCodeReplyOsm()
      {
          if (m_reply)
              m_reply->deleteLater();
      }

      Attachments

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

        Activity

          People

            paangele Paolo Angelelli
            Opostol Silantyev Ivan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes