Comment 8 for bug 1380736

Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote : Re: Unlocking sim while dash is not loaded leads to a system lockup

looking at the report mterry posted it looks like coming from qtubuntu-media. I'm not familiar with that code base but after having a quick look these caught my eye:

http://bazaar.launchpad.net/~phablet-team/qtubuntu-media/trunk/view/head:/src/aal/aalmediaplayerservice.cpp:

AalMediaPlayerService::AalMediaPlayerService(QObject *parent):
...
m_service = this;
---
    m_hubPlayerSession->playback_status_changed().connect(
            std::bind(&AalMediaPlayerService::onPlaybackStatusChanged, this, _1));
...

First m_service is static, so if ever more than one instance of AalMediaPlayerService is created things will brobably break. Should that be a singleton instead?

secondly, there is is connection made to m_hubPlayerSession, but it is not disconnected in

void
AalMediaPlayerService::setPlayer(const std::shared_ptr<core::ubuntu::media::Player> &player)
{
    m_hubPlayerSession = player;
}

nor in the destructor ~AalMediaPlayerService() even though the (static) m_service might get descructed as it's parent is relayed to it's parent QObject class.