The database is opened in the main thread. ResourceScoreCache::update runs in another thread. This is not supported and crashes all over the place. Database does seem to try and have a per thread thing, but debug shows it doesn't work and even if it did would be working around a problem that shouldn't exist in the first place. We probably don't see many reports as kactivitymanagerd doesn't link KCrash.
Yes, the sqlite driver in Qt was changed not to serialize the database access. Will see what to do...
Didn't realise it was a recent change. Thats kinda good news. I'm on 5.11 beta here. Personally I'd just drop the thread. Your events come from either dbus which has its own thread and queue, or the xcb qpa which has its own thread and queue. Even if the query takes ages it won't cause a noticable problem. But we can do whatever. Let me know if I can help with anything.
Yes, they removed a flag they used to pass to sqlite which made sqlite behave well in a multi-threaded environment (was almost ready to fork the driver like akonadi ppl did when I heard this :) ). IIRC, it was in 5.10. Anyhow: https://phabricator.kde.org/D12576
Patch from comment #3 was committed. Did it resolve this issue?
yep