strace give the following log :
futex(0x9cb120, FUTEX_WAIT, 2, NULL
With my system default Qt version (5.4.1) I have no issue, but with Qt 5.4.3 for Raspberry PI (built with Yocto), the application seems to be blocked after having discovering one UPnP device.
The code I use to produce this issue :
#include <QCoreApplication>
#include <QDebug>
#include <HUpnpCore/HControlPoint>
#include <HUpnpCore/HControlPointConfiguration>
#include <HUpnpCore/HDeviceInfo>
#include <HUpnpCore/HClientService>
#include <HUpnpCore/HServiceInfo>
#include <HUpnpCore/HServiceId>
#include <HUpnpAv/HMediaBrowser>
using namespace Herqq::Upnp;
using namespace Herqq::Upnp::Av;
class Browser :public QObject {
Q_OBJECT
public:
Browser(QObject * parent = 0) : QObject(parent), browser(new HMediaBrowser(this)) {
connect(browser,
SIGNAL(objectsBrowsed(Herqq::Upnp::Av::HMediaBrowser*,QSet<QString>)),
this,
SLOT(onObjectsBrowsed(Herqq::Upnp::Av::HMediaBrowser*,QSet<QString>)));
connect(browser,
SIGNAL(browseComplete(Herqq::Upnp::Av::HMediaBrowser*)),
this,
SLOT(onBrowseComplete(Herqq::Upnp::Av::HMediaBrowser*)));
connect(browser,
SIGNAL(browseFailed(Herqq::Upnp::Av::HMediaBrowser*)),
this,
SLOT(onBrowseFailed(Herqq::Upnp::Av::HMediaBrowser*)));
}
public slots:
void browseDevice(Herqq::Upnp::HClientDevice* device) {
qDebug() << Q_FUNC_INFO << "Device" << device->info().friendlyName();
HClientServices servs = device->services();
HClientService * cds = NULL;
foreach(HClientService* serv, servs) {
qDebug() << " " << serv->info().serviceId().toString();
if(QString::compare(serv->info().serviceId().toString(),
"urn:upnp-org:serviceId:ContentDirectory") == 0)
cds = serv;
}
if (cds) {
browser->reset(cds);
browser->browseRoot();
}
else {
qDebug() << "No Content Directory Service in" << device->info().friendlyName();
}
}
private slots:
void onObjectsBrowsed(Herqq::Upnp::Av::HMediaBrowser*,QSet<QString>) {
qDebug() << Q_FUNC_INFO;
}
void onBrowseFailed (Herqq::Upnp::Av::HMediaBrowser *) {
qDebug() << Q_FUNC_INFO;
}
void onBrowseComplete (Herqq::Upnp::Av::HMediaBrowser *) {
qDebug() << Q_FUNC_INFO;
}
private:
HMediaBrowser * browser;
};
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
HControlPointConfiguration ctrPtConf;
HControlPoint ctrPt(ctrPtConf);
Browser browser;
QObject::connect(&ctrPt,
SIGNAL(rootDeviceOnline(Herqq::Upnp::HClientDevice*)),
&browser,
SLOT(browseDevice(Herqq::Upnp::HClientDevice*))
);
ctrPt.init();
return a.exec();
}
#include "main.moc"
stracegive the following log :With my system default Qt version (
5.4.1) I have no issue, but with Qt5.4.3for Raspberry PI (built withYocto), the application seems to be blocked after having discovering oneUPnPdevice.The code I use to produce this issue :