Bug 454678 - Kalendar immediately crashed upon starting
Summary: Kalendar immediately crashed upon starting
Status: VERIFIED UPSTREAM
Alias: None
Product: Merkuro
Classification: Applications
Component: general (show other bugs)
Version: 1.0.0
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Claudio Cambra
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2022-05-31 22:28 UTC by Techokami
Modified: 2022-06-14 11:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Techokami 2022-05-31 22:28:59 UTC
Application: kalendar (1.0.0)

Qt Version: 5.15.3
Frameworks Version: 5.93.0
Operating System: Linux 5.17.11-300.fc36.x86_64 x86_64
Windowing System: X11
Distribution: Fedora Linux 36 (KDE Plasma)
DrKonqi: 5.24.5 [KCrashBackend]

-- Information about the crash:
- What I was doing when the application crashed:
I was just starting the software. Every single time, it just crashes. I have no idea why this is occuring, as I am using the KDE spin of Fedora 36 and installing the official RPMs from Fedora's repositories. I am not compiling any of KDE or Qt manually from sources here.

The crash can be reproduced every time.

-- Backtrace:
Application: Kalendar (kalendar), signal: Segmentation fault

[KCrash Handler]
#4  0x00007fb2c13992e4 in Akonadi::IncidenceChanger::history() const () from /lib64/libKF5AkonadiCalendar.so.5
#5  0x000056129fa1b8c7 in CalendarManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
#6  0x00007fb2c0a111ac in loadProperty(QV4::ExecutionEngine*, QObject*, QQmlPropertyData const&) () from /lib64/libQt5Qml.so.5
#7  0x00007fb2c0b67669 in QV4::QQmlTypeWrapper::lookupSingletonProperty(QV4::Lookup*, QV4::ExecutionEngine*, QV4::Value const&) () from /lib64/libQt5Qml.so.5
#8  0x00007fb2c0b69160 in QV4::QQmlTypeWrapper::virtualResolveLookupGetter(QV4::Object const*, QV4::ExecutionEngine*, QV4::Lookup*) () from /lib64/libQt5Qml.so.5
#9  0x00007fb2c0a3208a in QV4::Moth::VME::interpret(QV4::CppStackFrame*, QV4::ExecutionEngine*, char const*) () from /lib64/libQt5Qml.so.5
#10 0x00007fb2c0a36a97 in QV4::Moth::VME::exec(QV4::CppStackFrame*, QV4::ExecutionEngine*) () from /lib64/libQt5Qml.so.5
#11 0x00007fb2c09c80f6 in QV4::Function::call(QV4::Value const*, QV4::Value const*, int, QV4::ExecutionContext const*) () from /lib64/libQt5Qml.so.5
#12 0x00007fb2c0b55888 in QQmlJavaScriptExpression::evaluate(QV4::CallData*, bool*) () from /lib64/libQt5Qml.so.5
#13 0x00007fb2c0b5bcd8 in QQmlBinding::evaluate(bool*) () from /lib64/libQt5Qml.so.5
#14 0x00007fb2c0b5fee7 in QQmlNonbindingBinding::doUpdate(QQmlJavaScriptExpression::DeleteWatcher const&, QFlags<QQmlPropertyData::WriteFlag>, QV4::Scope&) () from /lib64/libQt5Qml.so.5
#15 0x00007fb2c0b5d9e4 in QQmlBinding::update(QFlags<QQmlPropertyData::WriteFlag>) () from /lib64/libQt5Qml.so.5
#16 0x00007fb2c0b6b02b in QQmlObjectCreator::finalize(QQmlInstantiationInterrupt&) () from /lib64/libQt5Qml.so.5
#17 0x00007fb2c0afa79c in QQmlComponentPrivate::complete(QQmlEnginePrivate*, QQmlComponentPrivate::ConstructionState*) () from /lib64/libQt5Qml.so.5
#18 0x00007fb2c0afc7a9 in QQmlComponentPrivate::completeCreate() () from /lib64/libQt5Qml.so.5
#19 0x00007fb2c0afc941 in QQmlComponent::create(QQmlContext*) () from /lib64/libQt5Qml.so.5
#20 0x00007fb2c0b61498 in QQmlApplicationEnginePrivate::finishLoad(QQmlComponent*) () from /lib64/libQt5Qml.so.5
#21 0x00007fb2c0b61b91 in QQmlApplicationEngine::load(QUrl const&) () from /lib64/libQt5Qml.so.5
#22 0x000056129fa17a80 in main ()
[Inferior 1 (process 7040) detached]

The reporter indicates this bug may be a duplicate of or related to bug 446747.

Possible duplicates by query: bug 446747.

Reported using DrKonqi
Comment 1 Claudio Cambra 2022-06-01 23:44:18 UTC
Do you have kdepim-runtime installed? Other users have described similar crashes due to this:

https://bugs.kde.org/show_bug.cgi?id=453016
Comment 2 Techokami 2022-06-04 02:45:58 UTC
(In reply to Claudio Cambra from comment #1)
> Do you have kdepim-runtime installed? Other users have described similar
> crashes due to this:
> 
> https://bugs.kde.org/show_bug.cgi?id=453016

I do, in fact, have this package installed.
Comment 3 Max Pastushkov 2022-06-11 23:25:25 UTC
Experiencing the same issue on Arch Linux.

Qt Version: 5.15.4
Frameworks Version: 5.94.0
Operating System: Linux 5.18.3-arch1-1 (64-bit)
Windowing System: X11
Distribution: Arch Linux

Backtrace (from gdb):
#0  0x00007ffff76e9858 in Akonadi::IncidenceChanger::history (this=0x5555556675b0) at /usr/include/c++/12.1.0/bits/unique_ptr.h:191
#1  0x00005555555844bf in CalendarManager::undoRedoData (this=0x7fffffffd410)
    at /usr/src/debug/kalendar-22.04.2/src/calendarmanager.cpp:655
#2  CalendarManager::qt_static_metacall (_o=0x7fffffffd410, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>)
    at /usr/src/debug/build/src/kalendar_autogen/EWIEGA46WW/moc_calendarmanager.cpp:431
#3  0x00007ffff6d714bb in QQmlPropertyData::readProperty (property=<optimized out>, target=0x7fffffffd410, this=0x555556156f48)
    at ../../include/QtQml/5.15.4/QtQml/private/../../../../../../qtdeclarative/src/qml/qml/qqmlpropertydata_p.h:357
#4  loadProperty (v4=0x555555843af0, object=0x7fffffffd410, property=...)
    at /usr/src/debug/qtdeclarative/src/qml/jsruntime/qv4qobjectwrapper.cpp:204
#5  0x00007ffff6ea04c7 in QV4::QObjectWrapper::lookupGetterImpl<QV4::QQmlTypeWrapper::lookupSingletonProperty(QV4::Lookup*, QV4::ExecutionEngine*, const QV4::Value&)::<lambda()> > (useOriginalProperty=true, revertLookup=..., object=..., engine=0x555555843af0, 
    lookup=0x555555e7dda0)
    at ../../include/QtQml/5.15.4/QtQml/private/../../../../../../qtdeclarative/src/qml/jsruntime/qv4qobjectwrapper_p.h:262
#6  QV4::QQmlTypeWrapper::lookupSingletonProperty (l=0x555555e7dda0, engine=0x555555843af0, object=...)
    at /usr/src/debug/qtdeclarative/src/qml/qml/qqmltypewrapper.cpp:547
#7  0x00007ffff6ea0898 in QV4::QQmlTypeWrapper::virtualResolveLookupGetter (object=0x7fffec9c0510, engine=0x555555843af0, 
    lookup=0x555555e7dda0) at /usr/src/debug/qtdeclarative/src/qml/qml/qqmltypewrapper.cpp:467
#8  0x00007ffff6d8db1a in QV4::Moth::VME::interpret (frame=0x7fffffffcd00, engine=0x555555843af0, code=0x7fffdebb39dd ";\317\001")
    at /usr/src/debug/qtdeclarative/src/qml/jsruntime/qv4vme_moth.cpp:641
#9  0x00007ffff6d97d64 in QV4::Moth::VME::exec (frame=<optimized out>, engine=<optimized out>)
    at /usr/src/debug/qtdeclarative/src/qml/jsruntime/qv4vme_moth.cpp:466
#10 0x00007ffff6d3b7a6 in QV4::Function::call (this=<optimized out>, thisObject=<optimized out>, argv=<optimized out>, 
    argc=<optimized out>, context=<optimized out>) at /usr/src/debug/qtdeclarative/src/qml/jsruntime/qv4function.cpp:69
#11 0x00007ffff6e8fb0d in QQmlJavaScriptExpression::evaluate (this=0x555555a11770, callData=0x7fffec9c04d0, isUndefined=0x7fffffffcec7)
    at /usr/src/debug/qtdeclarative/src/qml/qml/qqmljavascriptexpression.cpp:212
#12 0x00007ffff6e96699 in QQmlBinding::evaluate (this=this@entry=0x555555a11770, isUndefined=isUndefined@entry=0x7fffffffcec7)
    at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlbinding.cpp:218
#13 0x00007ffff6e98c8a in QQmlNonbindingBinding::doUpdate (this=0x555555a11770, watcher=..., flags=..., scope=...)
    at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlbinding.cpp:254
#14 0x00007ffff6e98813 in QQmlBinding::update (this=0x555555a11770, flags=...)
    at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlbinding.cpp:194
#15 0x00007ffff6ea4cbd in QQmlObjectCreator::finalize (this=0x55555587dd10, interrupt=...)
    at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlobjectcreator.cpp:1393
#16 0x00007ffff6e486ad in QQmlComponentPrivate::complete (state=0x555555855ce8, enginePriv=0x555555687b00)
    at /usr/include/qt/QtCore/qscopedpointer.h:116
#17 QQmlComponentPrivate::complete (enginePriv=0x555555687b00, state=state@entry=0x555555855ce8)
    at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlcomponent.cpp:983
#18 0x00007ffff6e4887b in QQmlComponentPrivate::completeCreate (this=0x555555855c60)
    at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlcomponent.cpp:1079
#19 0x00007ffff6e48933 in QQmlComponent::completeCreate (this=0x555555855b40)
    at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlcomponent.cpp:1062
#20 QQmlComponent::create (this=0x555555855b40, context=<optimized out>) at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlcomponent.cpp:820
#21 0x00007ffff6e9a17a in QQmlApplicationEnginePrivate::finishLoad (this=0x555555687b00, c=0x555555855b40)
    at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlapplicationengine.cpp:148
#22 0x00007ffff6e9a61b in QQmlApplicationEnginePrivate::startLoad (this=<optimized out>, url=..., data=..., dataFlag=<optimized out>)
    at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlapplicationengine.cpp:132
#23 0x00007ffff6e9a6d2 in QQmlApplicationEngine::load (this=this@entry=0x7fffffffd330, url=...)
    at /usr/src/debug/qtdeclarative/src/qml/qml/qqmlapplicationengine.cpp:287
#24 0x0000555555580de2 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kalendar-22.04.2/src/main.cpp:154
Comment 4 Max Pastushkov 2022-06-12 00:30:42 UTC
After further debugging, I found that the crash was actually due to Akonadi not being able to start. It complained about an error with MySQL.

~/.local/share/akonadi/db_data/mysql.err:
2022-06-11 17:21:39 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
2022-06-11 17:21:39 0 [Note] InnoDB: Completed initialization of buffer pool
2022-06-11 17:21:39 0 [ERROR] InnoDB: File ./ib_logfile0 was not found
2022-06-11 17:21:39 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2022-06-11 17:21:39 0 [Note] InnoDB: Starting shutdown...
2022-06-11 17:21:39 0 [ERROR] Plugin 'InnoDB' init function returned error.
2022-06-11 17:21:39 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2022-06-11 17:21:39 0 [ERROR] Unknown/unsupported storage engine: innodb
2022-06-11 17:21:39 0 [ERROR] Aborting

However, running "touch ~/.local/share/akonadi/db_data/ib_logfile0" seems to fix it, and Kalendar works without errors.

Techokami, could you you paste the output of kalendar when running it from the console?
Comment 5 Techokami 2022-06-14 01:06:58 UTC
So I tried running this in the terminal, and I also tried what Max did, but to no avail. The console output is pretty long so I put it into a pastebin for convenience: https://pastebin.com/WyyuKmys
Also, here is the contents of ~/.local/share/akonadi/Akonadi.error:

2022-06-13T20:59:44 [INFO ] org.kde.pim.akonadiserver: Starting up the Akonadi Server...
2022-06-13T20:59:45 [INFO ] org.kde.pim.akonadiserv2022-06-13T20:59:48 [INFO ] org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...
i.SchemaVersionTable' doesn't exist QMYSQL: Unable to execute query\nQuery: ALTER TABLE SchemaVersionTable ADD COLUMN version INTEGER NOT NULL DEFAULT 0"
2022-06-13T20:59:45 [CRITICAL] org.kde.pim.akonadiserver: Unable to initialize database.
2022-06-13T20:59:48 [INFO ] org.kde.pim.akonadiserver: Shutting down AkonadiServer...
Comment 6 Max Pastushkov 2022-06-14 01:21:01 UTC
(In reply to Techokami from comment #5)
> So I tried running this in the terminal, and I also tried what Max did, but
> to no avail. The console output is pretty long so I put it into a pastebin
> for convenience: https://pastebin.com/WyyuKmys
> Also, here is the contents of ~/.local/share/akonadi/Akonadi.error:
> 
> 2022-06-13T20:59:44 [INFO ] org.kde.pim.akonadiserver: Starting up the
> Akonadi Server...
> 2022-06-13T20:59:45 [INFO ] org.kde.pim.akonadiserv2022-06-13T20:59:48 [INFO
> ] org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited
> normally...
> i.SchemaVersionTable' doesn't exist QMYSQL: Unable to execute query\nQuery:
> ALTER TABLE SchemaVersionTable ADD COLUMN version INTEGER NOT NULL DEFAULT 0"
> 2022-06-13T20:59:45 [CRITICAL] org.kde.pim.akonadiserver: Unable to
> initialize database.
> 2022-06-13T20:59:48 [INFO ] org.kde.pim.akonadiserver: Shutting down
> AkonadiServer...

So it seems that both of our issues were caused by Akonadi not being able to communicate with its database. It is possible that the issue you are experiencing could be fixed using the commands mentioned in Bug 439769, Comment 3.
Comment 7 Techokami 2022-06-14 04:19:13 UTC
Well after using those commands and getting scared that everything violently broke, Kalendar is now functional again! Thank you Max!

I changed the status to reflect that WHY DID THIS EVEN HAPPEN IN THE FIRST PLACE?! This was a clean install of Kalendar onto a clean install of the KDE spin of Fedora 36! I was expecting everything to work out of the box, but instead I had to do a ton of MySQL necromancy using outdated commands (did you know that the -Q parameter for mysqladmin no longer exists?) which is just... not good for normal users that aren't comfortable with the terminal. I really want to know why there wasn't a more graceful failover here, or even why the Akonadi database wasn't properly initialized. Like, when it tries to do ALTER TABLE to set up the database, but it's not initialized so the table isn't there, why not first issue a SQL command to check if the table exists in the first place, and if it doesn't, make Akonadi initialize the database then try again?

Welp, now I have a headache, but at least now I got a proper calendar program to sync my Outlook calendar with, so I can get back all my appointments.