<div dir="ltr">Hi,<div><br></div><div>I have finished the porting of Last.fm service to Kf5. However I have been having a crash which I can't identify the cause.</div><div><br></div><div>At the end of LastServer destructor, controller->unregisterScrobblingService() is invoked. The parameter is a QSharedPointer<ScrobblingService>, which encapsulates the ScrobbleAdapter pointer to the LastFm service. unregisterScrobblingService() removes the QSharedPointer fom a QList of scrobbler services.<br><br>I noticed that the ScrobbleAdapter destructor is invoked after being removed from the list, meaning that QSharePoint's reference counter is zero. However, the invoking destructor method still has a reference to the QSharedPointer. Thus, when it gets out of scope (after the if block ends), QSharedPointer tries to delete the ScrobbleAdapter again, causing a segmentation fault.</div><div><br></div><div>Any help to understand why the pointer is being deleted after invoking QList.removeAll() is welcome.</div><div><br></div><div>Pedro</div><div><br></div><div><br></div><div><br></div></div>