Gnome client crashes when disabling all accounts.
Issue generated from Tuleap's migration script. Originally submitted by: Maxim Cournoyer (mcournoyer)
* Environment:
Latest Gnome client (commit cfeffc36) tested on Ubuntu 16.04.
* Reproduce steps:
In the account settings, disable all the present accounts by unticking their checkbox. Notice a crash.
* Expected result:
There should be no crash.
* Actual result:
The gnome client crashes:
[New Thread 0x7fffd0a1a700 (LWP 16292)]
Thread 1 "gnome-ring" received signal SIGSEGV, Segmentation fault.
0x00000000004e92ec in details::CppImpl::changeView (this=0x958010, type=17598320, conversation=...)
at /home/mcournoyer/src/ring-project/client-gnome/src/ringmainwindow.cpp:783
783 auto hasPendingRequests = accountContainer_->info.contactModel->hasPendingRequests();
(gdb)
(gdb) bt
#0 0x00000000004e92ec in details::CppImpl::changeView (this=0x958010, type=17598320, conversation=...)
at /home/mcournoyer/src/ring-project/client-gnome/src/ringmainwindow.cpp:783
#1 0x00000000004ebc47 in details::CppImpl::slotAccountStatusChanged (this=0x958010, id="e9231d5a09971a51")
at /home/mcournoyer/src/ring-project/client-gnome/src/ringmainwindow.cpp:1241
#2 0x00000000004e7c42 in details::CppImpl::::operator()(const std::__cxx11::string &) const (
__closure=0x7fffffffce50, id="e9231d5a09971a51") at /home/mcournoyer/src/ring-project/client-gnome/src/ringmainwindow.cpp:568
#3 0x00000000004f18fb in QtPrivate::FunctorCall, QtPrivate::List_cxx11::basic_string_traits, std::allocator >&>, void, details::CppImpl::init():: >::call(details::CppImpl::, void **) (f=..., arg=0x7fffffffd000) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:495
#4 0x00000000004f16ea in QtPrivate::Functor, 1>::call_cxx11::basic_string_traits, std::allocator > const&>, void>(details::CppImpl::<lambda(const string&)> &, void *, void **) (
f=..., arg=0x7fffffffd000) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:552
#5 0x00000000004f0ebf in QtPrivate::QFunctorSlotObject, 1, QtPrivate::List_cxx11::basic_string_traits, std::allocator >&>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=1, this_=0xf65d70, r=0xd90820, a=0x7fffffffd000, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject_impl.h:192
#6 0x00007ffff5950baf in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7 0x00007ffff7a8c0b2 in lrc::api::NewAccountModel::accountStatusChanged (this=, _t1="e9231d5a09971a51")
at /home/mcournoyer/src/ring-project/lrc/build/api/moc_newaccountmodel.cpp:159
#8 0x00007ffff7a904e7 in lrc::NewAccountModelPimpl::slotAccountStatusChanged (this=0xf44d10, accountID="e9231d5a09971a51",
status=lrc::api::account::Status::UNREGISTERED) at /home/mcournoyer/src/ring-project/lrc/src/newaccountmodel.cpp:160
#9 0x00007ffff5950baf in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007ffff7af79f6 in lrc::CallbacksHandler::accountStatusChanged (this=this@entry=0x91d0a0, _t1="e9231d5a09971a51",
_t2=_t2@entry=lrc::api::account::Status::UNREGISTERED) at /home/mcournoyer/src/ring-project/lrc/build/moc_callbackshandler.cpp:441
#11 0x00007ffff7a92d48 in lrc::CallbacksHandler::slotRegistrationStateChanged (this=0x91d0a0, accountId=..., registration_state=...,
detail_code=, detail_str=...) at /home/mcournoyer/src/ring-project/lrc/src/callbackshandler.cpp:212
#12 0x00007ffff5950baf in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007ffff7ae2950 in ConfigurationManagerInterface::registrationStateChanged (this=, _t1=..., _t2=..., _t3=0, _t4=...)
at /home/mcournoyer/src/ring-project/lrc/build/configurationmanager_dbus_interface.moc:1255
#14 0x00007ffff7ae51aa in ConfigurationManagerInterface::qt_static_metacall (_o=_o@entry=0xd3d980, _c=_c@entry=QMetaObject::InvokeMetaMethod,
_id=_id@entry=20, _a=_a@entry=0x7fffffffd5c0) at /home/mcournoyer/src/ring-project/lrc/build/configurationmanager_dbus_interface.moc:638
#15 0x00007ffff7ae6605 in ConfigurationManagerInterface::qt_metacall (this=0xd3d980, _c=QMetaObject::InvokeMetaMethod, _id=20,
_a=0x7fffffffd5c0) at /home/mcournoyer/src/ring-project/lrc/build/configurationmanager_dbus_interface.moc:1103
#16 0x00007ffff7f6b913 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#17 0x00007ffff5951c01 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007ffff592236c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007ffff5924786 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007ffff59783c3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007ffff5bbc197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ffff5bbc3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007ffff5bbc49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ffff6183d7d in g_application_run () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#25 0x00000000004b65ee in main (argc=2, argv=0x7fffffffda78) at /home/mcournoyer/src/ring-project/client-gnome/src/main.cpp:37