assert in kservicetypefactory.cpp
Boudewijn Rempt
boud at valdyas.org
Mon Aug 17 08:05:05 UTC 2015
On Mon, 17 Aug 2015, David Faure wrote:
> On Monday 17 August 2015 09:37:52 Boudewijn Rempt wrote:
>> Is it really necessary to assert here:
>>
>> krita(3310)/(default) unknown: ASSERT failure in
>> KServiceTypeFactory::KServiceTypeFactory(): "Could not open sycoca
>> database, you must run kbuildsycoca first!", file
>> /home/boud/kf5/src/frameworks/kservice/src/services/kservicetypefactory.cpp,
>> line 38
>>
>> And take the whole application down, just because the sycoca is missing?
>> Is there anything mandator stored in there, and which frameworks should I
>> stop using if so?
>
> It's an assert because it's not supposed to happen, i.e. at that point kbuildsycoca
> should have been triggered already, so either it failed or something really equally
> bad happened. It would be interesting to get more output from the app.
>
> If you can port away from KServiceTypeTrader (to use json in the plugins and
> load them with KPluginLoader), I recommend doing so in any case.
> This isn't yet possible for all types of plugins (e.g. KParts).
>
> In any case, I am starting to work on a change in the way ksycoca is
> rebuilt right now, so this should change for the better in the very short term.
>
>> I can't ship an application that needs a separate cache
>> builder app to run...
>
> That's a misrepresentation of the issue. kbuildsycoca is part of the kservice
> framework where you hit the issue. So it's not separate, it's there. Somehow
> it failed to built the cache though. Feel free to email me the stderr of the app
> if you can reproduce this.
>
The frameworks branch of calligra uses KService::Ptr and
KServiceType::serviceType, but doesn't use the trader part, so it doesn't
need the sycoca. We already ported to our own KoServiceLocator in the
kdelibs4 days so we didn't need a sycoca.
This assert isn't triggered from our own code, but from kio's previewjob,
and either kdelibs4 didn't have the assert, or kio didn't need the
cache. This is what happens in the frameworks branch, which doesn't
happen in the kdelibs4 branch.
#2 0x00007fffee39d15e in qt_message_fatal (context=..., message=<synthetic pointer>) at global/qlogging.cpp:1578
#3 QMessageLogger::fatal (this=this at entry=0x7fffffffb9f0, msg=msg at entry=0x7fffee65aae0 "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qlogging.cpp:781
#4 0x00007fffee3986c1 in qt_assert_x (where=<optimized out>, what=<optimized out>, file=<optimized out>, line=<optimized out>) at global/qglobal.cpp:2974
#5 0x00007fffef5799ad in KServiceTypeFactory::KServiceTypeFactory (this=0x2196640) at /home/boud/kf5/src/frameworks/kservice/src/services/kservicetypefactory.cpp:37
#6 0x00007fffef57a38b in KSycocaFactorySingleton<KServiceTypeFactory>::self (this=0x7fffef7cb764 <(anonymous namespace)::Q_QGS_kServiceTypeFactoryInstance::innerFunction()::holder>)
at /home/boud/kf5/src/frameworks/kservice/src/sycoca/ksycocafactory_p.h:212
#7 0x00007fffef579b14 in KServiceTypeFactory::self () at /home/boud/kf5/src/frameworks/kservice/src/services/kservicetypefactory.cpp:68
#8 0x00007fffef57af6a in KServiceTypeProfiles::ensureParsed (this=0x7fffef7cb790 <(anonymous namespace)::Q_QGS_s_serviceTypeProfiles::innerFunction()::holder>)
at /home/boud/kf5/src/frameworks/kservice/src/services/kservicetypeprofile.cpp:75
#9 0x00007fffef57c0ff in KServiceTypeProfiles::KServiceTypeProfiles (this=0x7fffef7cb790 <(anonymous namespace)::Q_QGS_s_serviceTypeProfiles::innerFunction()::holder>)
at /home/boud/kf5/src/frameworks/kservice/src/services/kservicetypeprofile.cpp:40
#10 0x00007fffef57ae98 in (anonymous namespace)::Q_QGS_s_serviceTypeProfiles::Holder::Holder (this=0x7fffef7cb790 <(anonymous namespace)::Q_QGS_s_serviceTypeProfiles::innerFunction()::holder>)
at /home/boud/kf5/src/frameworks/kservice/src/services/kservicetypeprofile.cpp:65
#11 0x00007fffef57af05 in (anonymous namespace)::Q_QGS_s_serviceTypeProfiles::innerFunction () at /home/boud/kf5/src/frameworks/kservice/src/services/kservicetypeprofile.cpp:65
#12 0x00007fffef57be4a in QGlobalStatic<KServiceTypeProfiles, (* (anonymous namespace)::Q_QGS_s_serviceTypeProfiles::innerFunction), (* & (anonymous namespace)::Q_QGS_s_serviceTypeProfiles::guard)>::operator()(void) (this=0x7fffef7cb780 <s_serviceTypeProfiles>) at /home/boud/kf5/qt5/qtbase/src/corelib/global/qglobalstatic.h:129
#13 0x00007fffef57b68a in KServiceTypeProfile::hasProfile (serviceType=...) at /home/boud/kf5/src/frameworks/kservice/src/services/kservicetypeprofile.cpp:174
#14 0x00007fffef57e1ba in KServiceTypeTrader::query (this=0x7fffef7cb7c0 <(anonymous namespace)::Q_QGS_s_globalServiceTypeTrader::innerFunction()::holder>, serviceType=..., constraint=...)
at /home/boud/kf5/src/frameworks/kservice/src/services/kservicetypetrader.cpp:152
#15 0x00007ffff25cfb6d in KIO::PreviewJob::availablePlugins () at /home/boud/kf5/src/frameworks/kio/src/widgets/previewjob.cpp:713
#16 0x00007ffff78c5851 in KisRecentDocumentsPane::KisRecentDocumentsPane (this=0x217bed0, parent=<optimized out>, _componentData=..., header=...)
at /home/boud/kf5/src/calligra/krita/ui/KisRecentDocumentsPane.cpp:128
#17 0x00007ffff78b56de in KisOpenPane::initRecentDocs (this=this at entry=0x215ba70) at /home/boud/kf5/src/calligra/krita/ui/KisOpenPane.cpp:225
#18 0x00007ffff78b7e30 in KisOpenPane::KisOpenPane (this=0x215ba70, parent=<optimized out>, componentData=..., mimeFilter=..., templatesResourcePath=...)
at /home/boud/kf5/src/calligra/krita/ui/KisOpenPane.cpp:159
#19 0x00007ffff78c1585 in KisPart::showStartUpWidget (this=0x1121e10, mainWindow=0x10a7130, alwaysShow=alwaysShow at entry=true) at /home/boud/kf5/src/calligra/krita/ui/KisPart.cpp:556
#20 0x00007ffff789f8da in KisMainWindow::slotFileNew (this=<optimized out>) at /home/boud/kf5/src/calligra/krita/ui/KisMainWindow.cpp:1204
#21 0x00007ffff78b168a in KisMainWindow::qt_static_metacall (_o=0x10a7130, _c=<optimized out>, _id=<optimized out>, _a=0x7fffffffc500) at /home/boud/kf5/build/calligra/krita/ui/moc_KisMainWindow.cpp:297
#22 0x00007fffee5ba276 in QMetaObject::activate (sender=sender at entry=0x1ebc680, signalOffset=<optimized out>, local_signal_index=local_signal_index at entry=1, argv=argv at entry=0x7fffffffc500)
at kernel/qobject.cpp:3713
#23 0x00007fffee5ba897 in QMetaObject::activate (sender=sender at entry=0x1ebc680, m=m at entry=0x7fffeff536c0 <QAction::staticMetaObject>, local_signal_index=local_signal_index at entry=1,
argv=argv at entry=0x7fffffffc500) at kernel/qobject.cpp:3578
#24 0x00007fffefa777d2 in QAction::triggered (this=this at entry=0x1ebc680, _t1=false) at .moc/moc_qaction.cpp:365
#25 0x00007fffefa79ca8 in QAction::activate (this=0x1ebc680, event=<optimized out>) at kernel/qaction.cpp:1162
#26 0x00007fffefa79dbc in QAction::event (this=<optimized out>, e=<optimized out>) at kernel/qaction.cpp:1090
#27 0x00007fffefa80d7c in QApplicationPrivate::notify_helper (this=this at entry=0x98a660, receiver=receiver at entry=0x1ebc680, e=e at entry=0x7fffffffc840) at kernel/qapplication.cpp:3717
#28 0x00007fffefa85c98 in QApplication::notify (this=0x7fffffffcdd0, receiver=receiver at entry=0x1ebc680, e=e at entry=0x7fffffffc840) at kernel/qapplication.cpp:3500
#29 0x00007ffff7866227 in KisApplication::notify (this=<optimized out>, receiver=0x1ebc680, event=0x7fffffffc840) at /home/boud/kf5/src/calligra/krita/ui/KisApplication.cpp:551
#30 0x00007fffee58a5c5 in QCoreApplication::notifyInternal (this=0x7fffffffcdd0, receiver=0x1ebc680, event=event at entry=0x7fffffffc840) at kernel/qcoreapplication.cpp:965
#31 0x00007fffee903421 in sendEvent (event=0x7fffffffc840, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:224
#32 QShortcutMap::dispatchEvent (this=this at entry=0x98a738, e=e at entry=0x7fffffffc910) at kernel/qshortcutmap.cpp:687
#33 0x00007fffee90353c in QShortcutMap::tryShortcutEvent (this=0x98a738, o=<optimized out>, e=e at entry=0x7fffffffc910) at kernel/qshortcutmap.cpp:358
#34 0x00007fffee8c04be in QWindowSystemInterface::tryHandleShortcutOverrideEvent (w=w at entry=0x1ee0860, ev=ev at entry=0x7fffffffc910) at kernel/qwindowsysteminterface.cpp:236
#35 0x00007fffee8d7250 in QGuiApplicationPrivate::processKeyEvent (e=0x21580a0) at kernel/qguiapplication.cpp:1892
#36 0x00007fffee8dba95 in QGuiApplicationPrivate::processWindowSystemEvent (e=e at entry=0x21580a0) at kernel/qguiapplication.cpp:1588
#37 0x00007fffee8c0b58 in QWindowSystemInterface::sendWindowSystemEvents (flags=..., flags at entry=...) at kernel/qwindowsysteminterface.cpp:624
#38 0x00007fffe02645b6 in QUnixEventDispatcherQPA::processEvents (this=<optimized out>, flags=...) at eventdispatchers/qunixeventdispatcher.cpp:63
#39 0x00007fffee588493 in QEventLoop::exec (this=this at entry=0x7fffffffcab0, flags=..., flags at entry=...) at kernel/qeventloop.cpp:204
#40 0x00007fffee58fff6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229
#41 0x00007fffee8d219c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1528
#42 0x00007fffefa7d505 in QApplication::exec () at kernel/qapplication.cpp:2977
#43 0x0000000000402e27 in main (argc=<optimized out>, argv=<optimized out>) at /home/boud/kf5/src/calligra/krita/main.cc:206
More information about the Kde-frameworks-devel
mailing list