https://bugs.kde.org/show_bug.cgi?id=376563

            Bug ID: 376563
           Summary: Kleopatra crashes with segmentation fault on startup
                    after importing PEM file
           Product: kleopatra
           Version: 2.3.0
          Platform: Gentoo Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: crash
          Priority: NOR
         Component: general
          Assignee: aheine...@intevation.de
          Reporter: guido-kdeb...@unknownsite.de
                CC: kdepim-b...@kde.org, m...@kde.org
  Target Milestone: ---

Kleopatra crashes on startup after briefly showing its main window with
"Loading certificate cache..." superimposed on it.

This happens reproducibly every time. No crash manager will appear.

This is the console output:
====
$ kleopatra 
'-xnack' is not a recognized feature for this target (ignoring feature)
'-xnack' is not a recognized feature for this target (ignoring feature)
'-xnack' is not a recognized feature for this target (ignoring feature)
'-xnack' is not a recognized feature for this target (ignoring feature)
'-xnack' is not a recognized feature for this target (ignoring feature)
'-xnack' is not a recognized feature for this target (ignoring feature)
'-xnack' is not a recognized feature for this target (ignoring feature)
'-xnack' is not a recognized feature for this target (ignoring feature)
'-xnack' is not a recognized feature for this target (ignoring feature)
'-xnack' is not a recognized feature for this target (ignoring feature)
'-xnack' is not a recognized feature for this target (ignoring feature)
'-xnack' is not a recognized feature for this target (ignoring feature)
'-xnack' is not a recognized feature for this target (ignoring feature)
'-xnack' is not a recognized feature for this target (ignoring feature)
'-xnack' is not a recognized feature for this target (ignoring feature)
QObject(0x0)
QObject(0x0)
QObject(0x0)
Segmentation fault
====

Running kleopatra in gdb produces a backtrace with 18421 frames. (Maybe an out
of control recursive loop somewhere? 18000 stack frames seems a excessive, even
for a complex C++ application...)
The start of that backtrace looks like this:

====
#0  QString::multiArg (this=this@entry=0x7fffff7ff430, numArgs=numArgs@entry=2,
args=args@entry=0x7fffff7ff440) at tools/qstring.cpp:7956
#1  0x00007ffff791d594 in QString::arg (a2=..., a1=..., this=0x7fffff7ff430) at
/usr/include/qt5/QtCore/qstring.h:931
#2  Kleo::Formatting::prettyName (proto=<optimized out>,
id=id@entry=0x7fffc0031080 "Thilo Weber (SmartCard)",
name_=name_@entry=0x7fffc0031098 "Thilo Weber",
comment_=comment_@entry=0x7fffc00310a4 "SmartCard")
    at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/utils/formatting.cpp:69
#3  0x00007ffff79201bb in Kleo::Formatting::prettyName (uid=...) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/utils/formatting.cpp:170
#4  0x00007ffff79202ae in Kleo::Formatting::prettyName (key=...) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/utils/formatting.cpp:165
#5  0x00007ffff790376e in Kleo::AbstractKeyListModel::data (this=0xb7ddd0,
index=..., role=<optimized out>) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:310
#6  0x00007ffff3d23ca5 in QSortFilterProxyModel::lessThan (this=<optimized
out>, source_left=..., source_right=...) at
itemmodels/qsortfilterproxymodel.cpp:2655
#7  0x00007ffff3d25364 in
QSortFilterProxyModelPrivate::proxy_intervals_for_source_items_to_add
(this=this@entry=0xd4e970, proxy_to_source=..., source_items=...,
source_parent=..., orient=orient@entry=Qt::Vertical)
    at itemmodels/qsortfilterproxymodel.cpp:640
#8  0x00007ffff3d275af in QSortFilterProxyModelPrivate::insert_source_items
(this=this@entry=0xd4e970, source_to_proxy=..., proxy_to_source=...,
source_items=..., source_parent=..., orient=orient@entry=Qt::Vertical,
emit_signal=true)
    at itemmodels/qsortfilterproxymodel.cpp:698
#9  0x00007ffff3d2b69f in QSortFilterProxyModelPrivate::source_items_inserted
(this=this@entry=0xd4e970, source_parent=..., start=<optimized out>,
end=<optimized out>, orient=orient@entry=Qt::Vertical) at
itemmodels/qsortfilterproxymodel.cpp:832
#10 0x00007ffff3d2b9bf in QSortFilterProxyModelPrivate::_q_sourceRowsInserted
(this=0xd4e970, source_parent=..., start=<optimized out>, end=<optimized out>)
at itemmodels/qsortfilterproxymodel.cpp:1407
#11 0x00007ffff3d2daa9 in QSortFilterProxyModel::qt_static_metacall
(_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized
out>) at .moc/moc_qsortfilterproxymodel.cpp:209
#12 0x00007ffff3d7a09f in QMetaObject::activate (sender=sender@entry=0xb7ddd0,
signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=10,
argv=argv@entry=0x7fffff7ffb60) at kernel/qobject.cpp:3740
#13 0x00007ffff3d7aca7 in QMetaObject::activate (sender=sender@entry=0xb7ddd0,
m=m@entry=0x7ffff3f8d3c0 <QAbstractItemModel::staticMetaObject>,
local_signal_index=local_signal_index@entry=10, argv=argv@entry=0x7fffff7ffb60)
at kernel/qobject.cpp:3602
#14 0x00007ffff3de6f24 in QAbstractItemModel::rowsInserted
(this=this@entry=0xb7ddd0, _t1=..., _t2=140, _t3=140) at
.moc/moc_qabstractitemmodel.cpp:601
#15 0x00007ffff3d0abcd in QAbstractItemModel::endInsertRows
(this=this@entry=0xb7ddd0) at itemmodels/qabstractitemmodel.cpp:2661
#16 0x00007ffff790274f in (anonymous
namespace)::HierarchicalKeyListModel::addTopLevelKey (this=this@entry=0xb7ddd0,
key=...) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:746
#17 0x00007ffff7906118 in (anonymous
namespace)::HierarchicalKeyListModel::addKeyWithoutParent (key=...,
issuer_fpr=<optimized out>, this=<optimized out>) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:728
#18 (anonymous namespace)::HierarchicalKeyListModel::doAddKeys (this=<optimized
out>, keys=std::vector of length 1, capacity 1 = {...}) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:856
#19 0x00007ffff790414d in Kleo::AbstractKeyListModel::addKeys
(this=this@entry=0xb7ddd0, keys=std::vector of length 1, capacity 1 = {...}) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:248
#20 0x00007ffff79062d7 in (anonymous
namespace)::HierarchicalKeyListModel::doAddKeys (this=<optimized out>,
keys=std::vector of length 1, capacity 1 = {...})
    at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:869
#21 0x00007ffff790414d in Kleo::AbstractKeyListModel::addKeys
(this=this@entry=0xb7ddd0, keys=std::vector of length 1, capacity 1 = {...}) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:248
#22 0x00007ffff79062d7 in (anonymous
namespace)::HierarchicalKeyListModel::doAddKeys (this=<optimized out>,
keys=std::vector of length 1, capacity 1 = {...})
    at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:869
#23 0x00007ffff790414d in Kleo::AbstractKeyListModel::addKeys
(this=this@entry=0xb7ddd0, keys=std::vector of length 1, capacity 1 = {...}) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:248
#24 0x00007ffff79062d7 in (anonymous
namespace)::HierarchicalKeyListModel::doAddKeys (this=<optimized out>,
keys=std::vector of length 1, capacity 1 = {...})
    at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:869
#25 0x00007ffff790414d in Kleo::AbstractKeyListModel::addKeys
(this=this@entry=0xb7ddd0, keys=std::vector of length 1, capacity 1 = {...}) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:248
#26 0x00007ffff79062d7 in (anonymous
namespace)::HierarchicalKeyListModel::doAddKeys (this=<optimized out>,
keys=std::vector of length 1, capacity 1 = {...})
    at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:869
#27 0x00007ffff790414d in Kleo::AbstractKeyListModel::addKeys
(this=this@entry=0xb7ddd0, keys=std::vector of length 1, capacity 1 = {...}) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:248
#28 0x00007ffff79062d7 in (anonymous
namespace)::HierarchicalKeyListModel::doAddKeys (this=<optimized out>,
keys=std::vector of length 1, capacity 1 = {...})
    at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:869
====

The end of that backtrace looks like this:

====

#18377 0x00007ffff790414d in Kleo::AbstractKeyListModel::addKeys
(this=this@entry=0xb7ddd0, keys=std::vector of length 1, capacity 1 = {...}) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:248
#18378 0x00007ffff79062d7 in (anonymous
namespace)::HierarchicalKeyListModel::doAddKeys (this=<optimized out>,
keys=std::vector of length 1, capacity 1 = {...})
    at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:869
#18379 0x00007ffff790414d in Kleo::AbstractKeyListModel::addKeys
(this=this@entry=0xb7ddd0, keys=std::vector of length 1, capacity 1 = {...}) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:248
#18380 0x00007ffff79062d7 in (anonymous
namespace)::HierarchicalKeyListModel::doAddKeys (this=<optimized out>,
keys=std::vector of length 1, capacity 1 = {...})
    at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:869
#18381 0x00007ffff790414d in Kleo::AbstractKeyListModel::addKeys
(this=this@entry=0xb7ddd0, keys=std::vector of length 1, capacity 1 = {...}) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:248
#18382 0x00007ffff79062d7 in (anonymous
namespace)::HierarchicalKeyListModel::doAddKeys (this=<optimized out>,
keys=std::vector of length 1, capacity 1 = {...})
    at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:869
#18383 0x00007ffff7901d56 in Kleo::AbstractKeyListModel::addKey (this=0xb7ddd0,
key=...) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keylistmodel.cpp:227
#18384 0x000000000047f91c in Kleo::KeyListController::Private::slotAddKey
(this=0xb2f120, key=...) at
/var/tmp/portage/kde-apps/kleopatra-16.12.2/work/kleopatra-16.12.2/src/view/keylistcontroller.cpp:212
#18385 0x000000000048631d in Kleo::KeyListController::qt_static_metacall
(_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized
out>)
    at
/var/tmp/portage/kde-apps/kleopatra-16.12.2/work/kleopatra-16.12.2_build/src/moc_keylistcontroller.cpp:168
#18386 0x00007ffff3d7a09f in QMetaObject::activate
(sender=sender@entry=0xa2ea30, signalOffset=<optimized out>,
local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffffffc8c0)
at kernel/qobject.cpp:3740
#18387 0x00007ffff3d7aca7 in QMetaObject::activate
(sender=sender@entry=0xa2ea30, m=m@entry=0x7ffff7b83940
<Kleo::KeyCache::staticMetaObject>,
local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffffffc8c0)
at kernel/qobject.cpp:3602
#18388 0x00007ffff78e8805 in Kleo::KeyCache::added (this=this@entry=0xa2ea30,
_t1=...) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2_build/src/moc_keycache.cpp:201
#18389 0x00007ffff78ef694 in Kleo::KeyCache::insert (this=0xa2ea30, keys=...)
at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keycache.cpp:932
#18390 0x00007ffff78ef822 in Kleo::KeyCache::refresh (this=<optimized out>,
keys=...) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keycache.cpp:788
#18391 0x00007ffff78f2c2d in
Kleo::KeyCache::RefreshKeysJob::Private::updateKeyCache
(this=this@entry=0xafc130) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keycache.cpp:1071
#18392 0x00007ffff78f32f8 in Kleo::KeyCache::RefreshKeysJob::Private::jobDone
(this=0xafc130, result=...) at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keycache.cpp:1008
#18393 0x00007ffff78f342c in
Kleo::KeyCache::RefreshKeysJob::Private::listAllKeysJobDone
(nextKeys=std::vector of length 281, capacity 281 = {...}, res=...,
this=0xafc130)
    at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keycache.cpp:968
#18394 Kleo::KeyCache::RefreshKeysJob::Private::<lambda(const
GpgME::KeyListResult&, const std::vector<GpgME::Key, std::allocator<GpgME::Key>
>&)>::operator() (keys=std::vector of length 281, capacity 281 = {...},
res=..., __closure=<optimized out>)
    at
/var/tmp/portage/kde-apps/libkleo-16.12.2/work/libkleo-16.12.2/src/models/keycache.cpp:1086
#18395 QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>,
QtPrivate::List<const GpgME::KeyListResult&, const std::vector<GpgME::Key,
std::allocator<GpgME::Key> >&>, void,
Kleo::KeyCache::RefreshKeysJob::Private::startKeyListing(GpgME::Protocol)::<lambda(const
GpgME::KeyListResult&, const std::vector<GpgME::Key, std::allocator<GpgME::Key>
>&)> >::call (arg=<optimized out>, f=...) at
/usr/include/qt5/QtCore/qobjectdefs_impl.h:135
#18396
QtPrivate::Functor<Kleo::KeyCache::RefreshKeysJob::Private::startKeyListing(GpgME::Protocol)::<lambda(const
GpgME::KeyListResult&, const std::vector<GpgME::Key, std::allocator<GpgME::Key>
>&)>, 2>::call<QtPrivate::List<GpgME::KeyListResult const&,
std::vector<GpgME::Key, std::allocator<GpgME::Key> > const&>, void>
(arg=<optimized out>, f=...) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:192
#18397
QtPrivate::QFunctorSlotObject<Kleo::KeyCache::RefreshKeysJob::Private::startKeyListing(GpgME::Protocol)::<lambda(const
GpgME::KeyListResult&, const std::vector<GpgME::Key, std::allocator<GpgME::Key>
>&)>, 2, QtPrivate::List<const GpgME::KeyListResult&, const
std::vector<GpgME::Key, std::allocator<GpgME::Key> >&>, void>::impl(int,
QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=<optimized
out>, this_=<optimized out>, r=<optimized out>, a=<optimized out>,
ret=<optimized out>)
    at /usr/include/qt5/QtCore/qobject_impl.h:169
#18398 0x00007ffff3d7a72a in QtPrivate::QSlotObjectBase::call
(a=0x7fffffffcd80, r=0xa2a100, this=0xd70740) at
../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:101

#18399 QMetaObject::activate (sender=sender@entry=0xb70b30,
signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0,
argv=argv@entry=0x7fffffffcd80) at kernel/qobject.cpp:3723
#18400 0x00007ffff3d7aca7 in QMetaObject::activate
(sender=sender@entry=0xb70b30, m=m@entry=0x7ffff5f1f0a0
<QGpgME::ListAllKeysJob::staticMetaObject>,
local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fffffffcd80)
    at kernel/qobject.cpp:3602


#18401 0x00007ffff5c79e34 in QGpgME::ListAllKeysJob::result
(this=this@entry=0xb70b30, _t1=..., _t2=std::vector of length 281, capacity 281
= {...}, _t3=std::vector of length 4, capacity 4 = {...}, _t4=..., _t5=...) at
listallkeysjob.moc:147
#18402 0x00007ffff5cba782 in
QGpgME::_detail::ThreadedJobMixin<QGpgME::ListAllKeysJob,
std::tuple<GpgME::KeyListResult, std::vector<GpgME::Key,
std::allocator<GpgME::Key> >, std::vector<GpgME::Key,
std::allocator<GpgME::Key> >, QString, GpgME::Error>
>::doEmitResult<GpgME::KeyListResult, std::vector<GpgME::Key>,
std::vector<GpgME::Key>, QString, GpgME::Error> (tuple=std::tuple containing =
{...}, this=0xb70b30) at threadedjobmixin.h:267
#18403 QGpgME::_detail::ThreadedJobMixin<QGpgME::ListAllKeysJob,
std::tuple<GpgME::KeyListResult, std::vector<GpgME::Key,
std::allocator<GpgME::Key> >, std::vector<GpgME::Key,
std::allocator<GpgME::Key> >, QString, GpgME::Error> >::slotFinished (
    this=0xb70b30) at threadedjobmixin.h:216


#18404 0x00007ffff3d7b68a in QObject::event (this=0xb70b30, e=<optimized out>)
at kernel/qobject.cpp:1263

#18405 0x00007ffff4594dfc in QApplicationPrivate::notify_helper
(this=<optimized out>, receiver=0xb70b30, e=0x7fffc005cd60) at
kernel/qapplication.cpp:3799

#18406 0x00007ffff459c2e0 in QApplication::notify (this=0x7fffffffd8b0,
receiver=0xb70b30, e=0x7fffc005cd60) at kernel/qapplication.cpp:3556
#18407 0x00007ffff3d540e0 in QCoreApplication::notifyInternal2
(receiver=0xb70b30, event=event@entry=0x7fffc005cd60) at
kernel/qcoreapplication.cpp:988
#18408 0x00007ffff3d56463 in QCoreApplication::sendEvent (event=0x7fffc005cd60,
receiver=<optimized out>) at kernel/qcoreapplication.h:231

#18409 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0,
event_type=event_type@entry=0, data=0x90a510) at
kernel/qcoreapplication.cpp:1649
#18410 0x00007ffff3d569c8 in QCoreApplication::sendPostedEvents
(receiver=receiver@entry=0x0, event_type=event_type@entry=0) at
kernel/qcoreapplication.cpp:1503
---Type <return> to continue, or q <return> to quit---

#18411 0x00007ffff3d9f633 in postEventSourceDispatch (s=0x96e1b0) at
kernel/qeventdispatcher_glib.cpp:276
#18412 0x00007fffee68cd5d in g_main_dispatch (context=0x7fffe00016f0) at
/var/tmp/portage/dev-libs/glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3154
#18413 g_main_context_dispatch (context=context@entry=0x7fffe00016f0) at
/var/tmp/portage/dev-libs/glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3769
#18414 0x00007fffee68d040 in g_main_context_iterate
(context=context@entry=0x7fffe00016f0, block=block@entry=1,
dispatch=dispatch@entry=1, self=<optimized out>) at
/var/tmp/portage/dev-libs/glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3840
#18415 0x00007fffee68d0ec in g_main_context_iteration (context=0x7fffe00016f0,
may_block=1) at
/var/tmp/portage/dev-libs/glib-2.48.2/work/glib-2.48.2/glib/gmain.c:3901
#18416 0x00007ffff3d9f6a7 in QEventDispatcherGlib::processEvents
(this=0x98a740, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#18417 0x00007ffff3d52dba in QEventLoop::exec (this=this@entry=0x7fffffffd3a0,
flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#18418 0x00007ffff3d5a8ec in QCoreApplication::exec () at
kernel/qcoreapplication.cpp:1261
#18419 0x00007ffff408113c in QGuiApplication::exec () at
kernel/qguiapplication.cpp:1633
#18420 0x00007ffff4594d55 in QApplication::exec () at
kernel/qapplication.cpp:2975
#18421 0x00000000004479c8 in main (argc=1, argv=<optimized out>) at
/var/tmp/portage/kde-apps/kleopatra-16.12.2/work/kleopatra-16.12.2/src/main.cpp:247
====

I have not included the middle of the backtrace, since it would be excessively
large and seemingly all lines in there look exactly like #27 and #28 anyway.

This problem started immediately after importing a PEM-file with a free S/MIME
certificate by Comodo. (Without the private key. Importing the certificate with
the private key was not possible either because of various errors, but since
Kleopatra now won't start up successfully for me anymore, I cannot reproduce
these problems at the moment.) Kleopatra crashed immediately after importing
the PEM file (i.e. not just after a manual restart).

gpgme is at version 1.8.0
gpgmepp is at version 16.08.3
qt is at version 5.7.1
gpg is at version 2.1.15

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to