Going to settings menu while node is rescanning coredumps SD #76

Closed
opened 2 years ago by duke · 4 comments
duke commented 2 years ago
Owner
  • Start SilentDragon with an already running hushd which is currently rescanning
  • Close the initial popup (possible on Linux, not sure about Windows)
  • Attempt to go to Settings
  • SD will coredump

This seems to be related to this line in mainwindow.cpp

QDir hushdir(rpc->getConnection()->config->hushDir);                                                                                  
(gdb) bt
#0  0x000000000046af9c in std::__shared_ptr<ConnectionConfig, (__gnu_cxx::_Lock_policy)2>::get() const (this=0x10) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/shared_ptr_base.h:1310
#1  0x000000000046af85 in std::__shared_ptr_access<ConnectionConfig, (__gnu_cxx::_Lock_policy)2, false, false>::_M_get() const (this=0x10) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/shared_ptr_base.h:1021
#2  0x0000000000467735 in std::__shared_ptr_access<ConnectionConfig, (__gnu_cxx::_Lock_policy)2, false, false>::operator->() const (this=0x10) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/shared_ptr_base.h:1015
#3  0x00000000004314f4 in MainWindow::setupSettingsModal()::$_6::operator()() const (this=0x1b13bf0) at src/mainwindow.cpp:459
#4  0x0000000000430c49 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, MainWindow::setupSettingsModal()::$_6>::call(MainWindow::setupSettingsModal()::$_6&, void**) (f=..., arg=0x7ffe475c5700) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:146
#5  0x0000000000430c21 in QtPrivate::Functor<MainWindow::setupSettingsModal()::$_6, 0>::call<QtPrivate::List<>, void>(MainWindow::setupSettingsModal()::$_6&, void*, void**) (f=..., arg=0x7ffe475c5700) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:256
#6  0x0000000000430bcd in QtPrivate::QFunctorSlotObject<MainWindow::setupSettingsModal()::$_6, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x1b13be0, r=0x19d5be0, a=0x7ffe475c5700, ret=0x0)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:439
#7  0x00007fdc3ebdc458 in QMetaObject::activate(QObject*, int, int, void**) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007fdc3f7ba3e6 in QAction::triggered(bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9  0x00007fdc3f7bcaa2 in QAction::activate(QAction::ActionEvent) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007fdc3f942d12 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
* Start SilentDragon with an already running hushd which is currently rescanning * Close the initial popup (possible on Linux, not sure about Windows) * Attempt to go to Settings * SD will coredump This seems to be related to this line in mainwindow.cpp ``` QDir hushdir(rpc->getConnection()->config->hushDir); ``` ``` (gdb) bt #0 0x000000000046af9c in std::__shared_ptr<ConnectionConfig, (__gnu_cxx::_Lock_policy)2>::get() const (this=0x10) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/shared_ptr_base.h:1310 #1 0x000000000046af85 in std::__shared_ptr_access<ConnectionConfig, (__gnu_cxx::_Lock_policy)2, false, false>::_M_get() const (this=0x10) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/shared_ptr_base.h:1021 #2 0x0000000000467735 in std::__shared_ptr_access<ConnectionConfig, (__gnu_cxx::_Lock_policy)2, false, false>::operator->() const (this=0x10) at /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/shared_ptr_base.h:1015 #3 0x00000000004314f4 in MainWindow::setupSettingsModal()::$_6::operator()() const (this=0x1b13bf0) at src/mainwindow.cpp:459 #4 0x0000000000430c49 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, MainWindow::setupSettingsModal()::$_6>::call(MainWindow::setupSettingsModal()::$_6&, void**) (f=..., arg=0x7ffe475c5700) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:146 #5 0x0000000000430c21 in QtPrivate::Functor<MainWindow::setupSettingsModal()::$_6, 0>::call<QtPrivate::List<>, void>(MainWindow::setupSettingsModal()::$_6&, void*, void**) (f=..., arg=0x7ffe475c5700) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:256 #6 0x0000000000430bcd in QtPrivate::QFunctorSlotObject<MainWindow::setupSettingsModal()::$_6, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x1b13be0, r=0x19d5be0, a=0x7ffe475c5700, ret=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:439 #7 0x00007fdc3ebdc458 in QMetaObject::activate(QObject*, int, int, void**) () at /lib/x86_64-linux-gnu/libQt5Core.so.5 #8 0x00007fdc3f7ba3e6 in QAction::triggered(bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #9 0x00007fdc3f7bcaa2 in QAction::activate(QAction::ActionEvent) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #10 0x00007fdc3f942d12 in () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5 ```
Collaborator

I experienced this and was able to reproduce while testing changes for #93

Will see if I can fix.

I experienced this and was able to reproduce while testing changes for https://git.hush.is/hush/SilentDragon/issues/93 Will see if I can fix.
Poster
Owner

@fekt my guess is that either rpc->getConnection() or rpc->getConnection()->config is NULL before the rescan finishes, so you just need to check for valid objects before chaining method calls on it

@fekt my guess is that either `rpc->getConnection()` or `rpc->getConnection()->config` is NULL before the rescan finishes, so you just need to check for valid objects before chaining method calls on it
Collaborator

@duke This is fixed in latest commit. Add nullptr check:
6fc4e3731c/src/mainwindow.cpp (L469)

@duke This is fixed in latest commit. Add nullptr check: https://git.hush.is/hush/SilentDragon/src/commit/6fc4e3731c7ab2e426d9412ad343afd0a55735cf/src/mainwindow.cpp#L469
Poster
Owner

@fekt awesome, thanks!

@fekt awesome, thanks!
duke closed this issue 2 years ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.