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

QGeoPositionInfoSource positionUpdated not emitted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.9.1
    • Fix Version/s: None
    • Component/s: Positioning
    • Labels:
      None
    • Environment:
      Windows 10 64 bits.
      Compiling to Android using armeabi-v7a (Gcc 4.9).
      Build version: android-25.
      AndroidManifest.xml:
      <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19"/>

      Description

      QGeoPositionInfoSource positionUpdated signal stops being emitted after a while when used in a Qt Android Service.
      Follow the code below:

       QGeoPositionInfoSource *positionSource = QGeoPositionInfoSource::createDefaultSource(0);
          if (positionSource){
              positionSource->setPreferredPositioningMethods(QGeoPositionInfoSource::SatellitePositioningMethods);
              positionSource->setUpdateInterval(10000);
              connect(positionSource,SIGNAL(positionUpdated(QGeoPositionInfo)),this,SLOT(slotPositionUpdated(QGeoPositionInfo)));
              connect(positionSource,SIGNAL(error(QGeoPositionInfoSource::Error)),this,SLOT(slotError(QGeoPositionInfoSource::Error)));
              positionSource->startUpdates();
          }
      

      No error is received to identify what's happening. 

      This is not so easy to reproduce. positionUpdates signal works fine while you are in the same are (at least 20km radius) from the position you start the service. 

      I'm able to reproduce this issue every time I travel from one city to other. After around 40kms, slotPositionUpdated stops been called. I have no idea why.

      After that, slotPositionUpdated is never called again. I have to restart the service in order to make it work again. 

      Service doesn't crash. 

      The same route works perfectly when retrieving gps positioning via java. 

       

        Attachments

        1. qt_service_gps_test.tar.bz2
          131 kB
          Ross Rogers
        2. qt_service_gps_test.tar.bz2
          131 kB
          Ross Rogers

          Issue Links

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

            Activity

              People

              Assignee:
              ablasche Alex Blasche
              Reporter:
              tezine Bruno Tezine
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes