email app out of memory

asked 2017-04-22 05:56:31 +0300

Almindor gravatar image

updated 2017-04-22 22:41:26 +0300

Asmir gravatar image

The email app runs out of memory consistently for me when used on my main gmail account. I don't have many unread messages (most of the time 0).

I do have a huge history of read messages tho and I think it's trying to do some very unnecessary indexing operation.

It used to just freeze for almost a minute before but lately it gets OOM killed.

As a side note, I'm an app developer, if you guys finally open source your SW we (the community) could help fix all these bugs.

edit retag flag offensive close delete

Comments

I think https://git.merproject.org/mer-core/nemo-qml-plugin-email/tree/master/ is used in the background…

velox ( 2017-04-22 18:56:47 +0300 )edit

I don't think this is a backend issue. I get new email notifications even with previews in the events list OK.

But when I open the email app itself it freezes up if I go into the specific account. It could still be a backend task but I think it's the main app itself that grows OOM.

Almindor ( 2017-04-22 19:25:39 +0300 )edit
1

I'm waiting also for the email app to be open source, but as a matter of fact, the full stack is readable if not fully open source. The UI part of the email app is almost 100% in QML, so one can read and debug it if one wants. the backend (QMF and nemo plugin) are GPL.

I'm writing without checking the sources, so I may be wrong, but the list of emails is built on a QAbstractListModel in nemo plugin that is taking its data from a QMailListModel in QMF. To investigate your issue, I would try to put some debug in the QAbstractListModel in the nemo plugin in the getData method. But, I agree that's it's tricky to debug. Good luck, don't hesitate to ask on the structure of the email stack if you don't understand something.

Damien Caliste ( 2017-04-22 21:54:20 +0300 )edit
2

So I ran email app in gdb hoping for some luck and whattayaknow got this interesting tidbit:

[W] unknown:0 - ( 28816 ) Failed to prepare query; error:"too many SQL variables Unable to execute statement"; statement:"SELECT COUNT(*) FROM mailmessages WHERE parentaccountid = (?) AND parentfolderid IN (?,?) AND 0 = (status & (?)) AND 0 = (status & (?)) AND 0 = (status & (?)) AND 0 = (status & (?)) AND 0 = (status & (?)) AND 0 = (status & (?)) AND 0 = (status & (?))"

Note that the parentfolderid IN (?,?) contained a HUGE amount of question marks implying a manually built list of folder ids.

Not sure if this is the source of issues or just another bug but it seems this part is very wrong built. The code for this is all the way down in https://git.merproject.org/mer-core/messagingframework inside the qmailstore_p.cpp file using an elaborate (and hard to trace) SQL where condition builder.

I'll see if I can setup mer and get this repeated.

Almindor ( 2017-04-26 07:03:40 +0300 )edit

Maybe you know already, but in case, you can try to run the SQL query by hand on the database also if it may help: sqlite3 ~/.qmf/database/qmailstore.db.

In the SDK, QMF is compiling out of the box with sb2 -t Sailfish-arm -s rpm/qmf-qt5.spec build, maybe you know this also, but in case. The target should be completed with tab key because I typed it from memory and am pretty sure that it's not accurate.

Good luck with debugging and thanks for doing it.

Damien Caliste ( 2017-04-26 09:57:57 +0300 )edit