View Single Post
Posts: 72 | Thanked: 53 times | Joined on Jan 2012 @ Berlin, Germany
#666
Originally Posted by Scorpius View Post
I would like to help you but I can't. It's not Yappari that crashes, it's Qt Mobility. If you use another Qt application that use contacts, like Waze, you'll see it crashes too.

Yappari does something like this (not the exact code but similar)
Code:
manager = new QContactManager("maemo5",QMap<QString,QString>(),this);

QContactDetailFilter phoneFilter;
    phoneFilter.setDetailDefinitionName(QContactPhoneNumber::DefinitionName,QContactPhoneNumber::FieldNumber);

phoneFilter.setValue("+");
phoneFilter.setMatchFlags(QContactFilter::MatchContains);

QList<QContact> list = manager->contacts(phoneFilter);
The last line is where the crash occurs. As you can see, Yappari can't do anything about it but trust QContactManager::contacts that it will work. It shouldn't crash, but Qt Mobility is very buggy in Maemo, and it will always will, since its development has been dropped for Maemo, as everything for Maemo. It's an abandoned OS which will never be updated anymore.

The only way to find a fix is exactly what you're doing and find out what makes Qt Mobility crash.

Another solution would be not using Qt Mobility for the contacts and use native Maemo libraries, but that's a problem since everything is already implemented around Qt Mobility. I could do it, but after a version 1.0.0 where everything else is already done, since it would take weeks or months.
Thanks for the feedback. I made a new and completely bizarre finding that produces a crash.

I have a contact registered with Jabber. When I remove all the contacts from my address book, contacts registered in any IM protocol survive, so this one survives too. When I reimport it, it works fine, but I get two contacts for the same person, one with just the (registered) Jabber ID and one with all the other details plus an UNregistered Jabber ID. When I merge both, I get the crash.

It would be really nice if there is a less buggy way to import the maemo contacts. Any advice on how to get my address book correctly imported is highly appreciated too. Thanks!