assert in kservicetypefactory.cpp

Boudewijn Rempt boud at valdyas.org
Tue Aug 18 08:45:00 UTC 2015


On Tue, 18 Aug 2015, David Faure wrote:

> On Tuesday 18 August 2015 08:49:10 Boudewijn Rempt wrote:
>> I've attached the stderr log.
>
> Very strange, nothing about sycoca in there apart from the assert.
>
> I am going to need your help on this one.
>
> 0) do you have a file called ~/.cache/ksycoca5 ?

No -- before starting krita to test whether it works, I remove the
cache, config and local directories, so I can be sure I'm testing from a
clean setup. After running krita, all three folders are created, but no
ksycoca5 file.

> 1) please apply this patch to kio/tests/previewtest.cpp and run ./previewtest, does it work?
> http://www.davidfaure.fr/2015/previewtest.diff

Same assert.

> 2) if it fails just like krita, please put a breakpoint in KSycocaPrivate::checkDatabase
> (which is being called with parameter IfNotFoundRecreate from KSycoca::findFactory,
> just before the assert) and check what happens in there. Also break on KSycocaPrivate::closeDatabase
> to check if it's called (other than the very first time before opening).

What happens is this:

checkDatabase() is called with IfNotFoundRecreate
closeDatabase() is called
kdedRunning is set to false
if (!bus->isServiceRegistered(KDED_SERVICE_NAME)) { evaluates to false
if (QStandardPaths::isTestModeEnabled()) { evaluates to false
kdeRunning is still false
closeDatabase is called()
if (!openDatabase(ifNotFound & IfNotFoundOpenDummy)) { evaluates to true


kded is running, though:

ud at linux:~/kde/src/2.9> ps ax | grep kded
  1452 ?        Sl     0:05 kdeinit4: kded4 [kdeinit]
  1514 ?        Sl     0:02 /usr/bin/kded5


> Oh wait, could it be that you're hitting the bug that I fixed in kservice.git bf3f25f27406984a4,
> after KF 5.13? Please try cherry-picking that commit.

That doesn't seem to help either... But I'm not sure how much of your
time I should take with this problem -- I might be better off porting
away from kio since I cannot ship something that needs a running daemon
or background process :-(

Boudewijn


More information about the Kde-frameworks-devel mailing list