[SailfishDevel] Boosted process (pid=721) was terminated due to signal 11

Luciano Montanaro mikelima at gmail.com
Sun Dec 29 12:04:25 UTC 2013


I had crashes as well...

My code looks similar to yours, and I experienced the crash as well
(in the emulator, I suspected because there is no GPS on it, but...)

I found out that I needed to check for the positionInfoSource being valid:

Relevant snippets here:

StationListProxyModel::StationListProxyModel(QObject *parent) :
    QSortFilterProxyModel(parent),
    positionInfoSource(QGeoPositionInfoSource::createDefaultSource(this)),
    m_here(44.5, 9.0),
    m_filterRecentOnly(false)
{

   ...

    if (positionInfoSource) {
        qDebug() << "position info source available";
        connect(positionInfoSource, SIGNAL(positionUpdated(QGeoPositionInfo)),
                SLOT(updatePosition(QGeoPositionInfo)));
        positionInfoSource->setUpdateInterval(5000);
    } else {
        qDebug() << "No position info source available";
    }

 ...

}

On Sun, Dec 29, 2013 at 11:02 AM,  <christopher.lamb at thurweb.ch> wrote:
> Curiouser and curiouser. Today the app still exits on GPS Startup, but the
> Signal 11 error is not being reported, even though this was repeatedly the
> case last night.
>
> In the meantime I have created a throwaway demo SatInfoSourceDemo
> illustrating the problem. (Basically the standard Sailfish template, +
> satinfosource.h and .cpp)
>
> The app exits as soon as satInfoSource.startUpdates(); is called. (In this
> demo from the Pulley Menu on FirstPage.qml
>
> I am guessing the problem is either in my satinfocource plugin, or more
> likely in the Qt5Positioning Library this is calling. The Harmattan
> equivalent of htis code works on a real N9.
>
> The code of the Throwaway demo is pasted below.
>
> Thanks
>
> Chris
>
>
> yaml
> PkgBR: qt5-qtpositioning-devel
> Requires: qt5-qtpositioning
>
>
> //start satinfosource.h
> #ifndef SATINFOSOURCE_H
> #define SATINFOSOURCE_H
>
> #include <QObject>
>
> #include <QtPositioning/QGeoSatelliteInfoSource>
>
> class SatInfoSource : public QObject
> {
>     Q_OBJECT
>     Q_PROPERTY(int satsInView READ satsInView NOTIFY
> satellitesInViewChanged)
>     Q_PROPERTY(int satsInUse READ satsInUse NOTIFY satellitesInUseChanged)
>
>
> public:
>     explicit SatInfoSource(QObject *parent = 0);
>     ~SatInfoSource();
>
>     Q_INVOKABLE void startUpdates();
>     Q_INVOKABLE void stopUpdates();
>
>     int satsInView() const;
>     int satsInUse() const;
>
> signals:
>     void satellitesInViewChanged(const int &satsInView);
>     void satellitesInUseChanged(const int &satsInUse);
>
>
> private slots:
>     void onSatsInViewUpdated(const QList<QGeoSatelliteInfo> &list);
>     void onSatsInUseUpdated(const QList<QGeoSatelliteInfo> &list);
>
> private:
>      QGeoSatelliteInfoSource *myGeoSatelliteInfoSource;
>      int _satsInUse;
>      int _satsInView;
>
> };
>
> #endif // SATINFOSOURCE_H
> //end satinfosource.h
>
> //start satinfosource.cpp
> #include "satinfosource.h"
> #include <QDebug>
>
> SatInfoSource::SatInfoSource(QObject *parent) :
>     QObject(parent), _satsInUse(0), _satsInView(0)
> {
>     myGeoSatelliteInfoSource =
> QGeoSatelliteInfoSource::createDefaultSource(0);
>     connect(myGeoSatelliteInfoSource, SIGNAL(satellitesInViewUpdated(const
> QList<QGeoSatelliteInfo> &)), this, SLOT(onSatsInViewUpdated(const
> QList<QGeoSatelliteInfo> &)));
>     connect(myGeoSatelliteInfoSource, SIGNAL(satellitesInUseUpdated(const
> QList<QGeoSatelliteInfo> &)), this, SLOT(onSatsInUseUpdated(const
> QList<QGeoSatelliteInfo> &)));
> }
>
> SatInfoSource::~SatInfoSource()
> {
> }
>
> void SatInfoSource::startUpdates() {
>     myGeoSatelliteInfoSource->startUpdates();
> }
>
> void SatInfoSource::stopUpdates() {
>     myGeoSatelliteInfoSource->stopUpdates();
> }
>
> int SatInfoSource::satsInView() const
> {
>     return _satsInView;
> }
>
> int SatInfoSource::satsInUse() const
> {
>     return _satsInUse;
> }
>
> void SatInfoSource::onSatsInViewUpdated(const QList<QGeoSatelliteInfo>
> &list) {
>     int newInView = list.count();
>     if (newInView != _satsInView) {
>         qDebug() << "satInfoSource.cpp: onSatsinViewUpdated: " <<
> QString::number(newInView, 'g', 2);
>         _satsInView = newInView;
>         emit satellitesInViewChanged(newInView);
>     }
>
> }
>
> void SatInfoSource::onSatsInUseUpdated(const QList<QGeoSatelliteInfo> &list)
> {
>     int newInUse = list.count();
>     if (newInUse != _satsInUse) {
>         qDebug() << "satInfoSource.cpp: onSatsinUseUpdated: " <<
> QString::number(newInUse, 'g', 2);
>         _satsInUse = newInUse;
>         emit satellitesInUseChanged(newInUse);
>     }
> }
> //end satinfosource.cpp
>
> //start SatInfoSourceDemo.qml
> import QtQuick 2.0
> import Sailfish.Silica 1.0
> import "pages"
>
> ApplicationWindow
> {
>     initialPage: Component { FirstPage { } }
>     cover: Qt.resolvedUrl("cover/CoverPage.qml")
> }
> //end SatInfoSourceDemo.qml
>
>
> //start FirstPage.qml
> import QtQuick 2.0
> import Sailfish.Silica 1.0
> import SatInfoSource 1.0 //for info about satellites (in view, in use)
>
> Page {
>     id: page
>
>     SatInfoSource {
>         id: satInfoSource
>
>         onSatellitesInUseChanged: {
>             console.log("GPSBackEnd: SatellitesInUseChanged! " + satsInUse +
> "; " + thisGPSBackEnd.satsInUse);
>         }
>         onSatellitesInViewChanged: {
>             console.log("GPSBackEnd: SatellitesInViewChanged! " + satsInView
> + "; " + thisGPSBackEnd.satsInView);
>         }
>     }
>
>     SilicaFlickable {
>         anchors.fill: parent
>         PullDownMenu {
>             MenuItem {
>                 text: "Start SatInfoSource"
>                 onClicked: {
>                     console.log("turning GPS on")
>                     satInfoSource.startUpdates();
>                 }
>             }
>         }
>     }
> }
> //end FirstPage.qml
>
> //start SatInfoSourceDemo.cpp
> #ifdef QT_QML_DEBUG
> #include <QtQuick>
> #endif
>
> #include <sailfishapp.h>
> #include "satinfosource.h"
>
> int main(int argc, char *argv[])
> {
>     qmlRegisterType<SatInfoSource>("SatInfoSource",1,0,"SatInfoSource");
>     return SailfishApp::main(argc, argv);
> }
> //end SatInfoSourceDemo.cpp
>
> //start SatInfoSourceDemo.pro
> TARGET = SatInfoSourceDemo
>
> CONFIG += sailfishapp
>
> QT += positioning
>
> SOURCES += src/SatInfoSourceDemo.cpp \
>     src/satinfosource.cpp
>
> HEADERS += \
>     satinfosource.h
>
> OTHER_FILES += qml/SatInfoSourceDemo.qml \
>     qml/cover/CoverPage.qml \
>     qml/pages/FirstPage.qml \
>     rpm/SatInfoSourceDemo.spec \
>     rpm/SatInfoSourceDemo.yaml \
>     SatInfoSourceDemo.desktop
> //end SatInfoSourceDemo.pro
>
>
>
>
> Zitat von "Andrey Kozhevnikov" <coderusinbox at gmail.com>:
>
>
>> use gdb, bro 8)
>>
>> On 28.12.2013 22:45, christopher.lamb at thurweb.ch wrote:
>>>
>>> Hi All
>>>
>>> My application quits unexpectedly during startup, apparently due to
>>> "signal 11".
>>>
>>> This seems to be caused by turning the GPS on, as the error occurs
>>> immediately after the app does that.
>>>
>>> I experience this on the Emulator, so it maybe down to the Emulator not
>>> having a real GPS. (my Jolla phone is currently in transit between Vantaa
>>> and Zurich according to Fedex).
>>>
>>> I will create a throwaway demo with just GPS to prove / disprove if the
>>> error is caused by GPS activate (or just bad timing).
>>>
>>> Googling for Signal 11 has revealed little. I have come across some
>>> references to this error on Android related to memory leaks.
>>>
>>> journalctl output is below:
>>>
>>>
>>> Chris
>>>
>>>
>>> Dec 28 18:22:57 SailfishEmul landed25_QT5[721]: [D] onStatusChanged:59 -
>>> MainPage: turning GPS on ...
>>> Dec 28 18:22:57 SailfishEmul landed25_QT5[721]: [D] onGPS:36 - turning
>>> GPS on
>>> Dec 28 18:22:57 SailfishEmul mapplauncherd[594]: Boosted process
>>> (pid=721) was terminated due to signal 11
>>> Dec 28 18:22:57 SailfishEmul invoker[751]: error: Can't send signal 11 to
>>> application [721]: No such process
>>>
>>> _______________________________________________
>>> SailfishOS.org Devel mailing list
>>
>>
>> _______________________________________________
>> SailfishOS.org Devel mailing list
>>
>
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list



-- 
Luciano Montanaro

Anyone who is capable of getting themselves made President should on
no account be allowed to do the job. -- Douglas Adams


More information about the Devel mailing list