Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QtPositioning error in Qt 5.3 RC on Android

QtPositioning error in Qt 5.3 RC on Android

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 2 Posters 983 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alan73
    wrote on last edited by
    #1

    Hello!

    I'm experimenting with Qt Positioning in Qt 5.3 RC on Android.
    This is sample of my code, where I create sources of position and satellites:

    @QGeoPositionInfoSource *source = QGeoPositionInfoSource::createDefaultSource(this);
    if (source) {
    QStringList posSourcesList = QGeoPositionInfoSource::availableSources();
    qDebug() << "Position sources count: " << posSourcesList.count();
    foreach (const QString &src, posSourcesList) {
    qDebug() << "pos source in list: " << src;
    }

        source->startUpdates();
        connect(source, SIGNAL(positionUpdated(QGeoPositionInfo)),
                this, SLOT(positionUpdated(QGeoPositionInfo)));
    }
    //----------------------------------------------------------------------------------
    
    QGeoSatelliteInfoSource *satelliteSource = QGeoSatelliteInfoSource::createDefaultSource(this);
    if(satelliteSource)
    {
        QStringList sourcesList = QGeoSatelliteInfoSource::availableSources();
        qDebug() << "Satellites sources count: " << sourcesList.count();
        foreach (const QString &src, sourcesList) {
           qDebug() << "source in list: " << src;
        }
    
        satelliteSource->startUpdates();
        connect(satelliteSource, SIGNAL(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)),
                this, SLOT(satellitesInViewUpdated(QList<QGeoSatelliteInfo>)));
        }@
    

    I get segmentation with the output:
    @D/Qt (16403): ../test_GPS/gpshandler.cpp:14 (GPSHandler::GPSHandler(QObject*)): Position sources count: 1
    D/Qt (16403): ../test_GPS/gpshandler.cpp:16 (GPSHandler::GPSHandler(QObject*)): pos source in list: "android"
    D/QtPositioning(16403): Regular updates using GPS
    D/QtPositioning(16403): Regular updates using network
    D/Qt (16403): ../test_GPS/gpshandler.cpp:37 (GPSHandler::GPSHandler(QObject*)): Satellites sources count: 1
    D/Qt (16403): ../test_GPS/gpshandler.cpp:39 (GPSHandler::GPSHandler(QObject*)): source in list: "android"
    F/Qt (16403): jnipositioning.cpp:496 (void satelliteUpdated(JNIEnv*, jobject, jobjectArray, jint, jboolean)): satelliteUpdated: source == 0@

    Here is the backtrace:

    @0 ?? /home/qtproj/build-test_GPS-Android_for_armeabi_v7a_GCC_4_8_Qt_5_3_0-Debug/libc.so 0x4010a8e8
    1 abort /home/qtproj/build-test_GPS-Android_for_armeabi_v7a_GCC_4_8_Qt_5_3_0-Debug/libc.so 0x40108948
    2 QMessageLogger::fatal(char const*, ...) const /opt/Qt-5.3.0_rc/5.3/android_armv7/lib/libQt5Core.so 0x75357ff6
    3 satelliteUpdated(_JNIEnv*, _jobject*, _jobjectArray*, int, unsigned char) /opt/Qt-5.3.0_rc/5.3/android_armv7/plugins/position/libqtposition_android.so 0x751a8c08
    4 ?? 0x40b3a910
    5 ?? 0x40b3a910 @

    When I'm creating only QGeoPositionInfoSource or only QGeoSatelliteInfoSource, this error doesn't occur.
    Any suggestions?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You may have found a bug. You should check the "bug report system":http://bugreports.qt-project.org to see if something known. If not, please consider opening a new report providing a minimal compilable example showing the problem.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved