Issue Description
When I start up either of the affected SDL versions, I can enter my wallet's encryption password and then access my wallet as is expected. The issue happens when instead I hit the "Cancel" button on that "Welcome Back" screen instead of inputting that passwd.
If I run v 1.5.2, it crashes with "Segmentation fault (core dumped)"
If I run v 1.5.3, it instead brings me to the "New Wallet Wizard"
Expected behavior
Start up SDL (either version) with a currently existing wallet on the system.
Have the "Welcome Back" screen appear to the user.
The user then last minute decides to not open their wallet and they instead hit the "Cancel" button.
SDL should close and not open the "New Wallet Wizard".
**SDL Versions affected:**
- 1.5.2 release
- 1.5.3-dev branch (https://git.hush.is/hush/SilentDragonLite/commit/e420c93aa6e99454388fb540364be91525fd70cf)
**Tested on...**
OS: Arch Linux
Kernel: 5.16.10-arch1-1 #1 SMP PREEMPT Wed, 16 Feb 2022 19:35:18 +0000 x86_64 GNU/Linux
Rust version: rustc 1.56.0 (09c42c458 2021-10-18)
QT Version: 5.15.2+kde+r301-1
**Issue Description**
When I start up either of the affected SDL versions, I can enter my wallet's encryption password and then access my wallet as is expected. The issue happens when instead I hit the "Cancel" button on that "Welcome Back" screen instead of inputting that passwd.
* If I run v 1.5.2, it crashes with "Segmentation fault (core dumped)"
* If I run v 1.5.3, it instead brings me to the "New Wallet Wizard"
Expected behavior
1. Start up SDL (either version) with a currently existing wallet on the system.
1. Have the "Welcome Back" screen appear to the user.
1. The user then last minute decides to not open their wallet and they instead hit the "Cancel" button.
1. SDL should close and not open the "New Wallet Wizard".
Unsure if this is related or not, but after drafting up this bug, I started up 1.5.3 for more testing and all of the Hushchats I had were gone. I then closed that and opened 1.5.2 with the same result. This may or may not be related to what is happening when 1.5.3 goes to the "New Wallet Wizard" after hitting Cancel.
I see this somewhere on the CLI
renderChatBox : looking at memos...
No Hush contacts found on disk!
Unsure if this is related or not, but after drafting up this bug, I started up 1.5.3 for more testing and all of the Hushchats I had were gone. I then closed that and opened 1.5.2 with the same result. This may or may not be related to what is happening when 1.5.3 goes to the "New Wallet Wizard" after hitting Cancel.
I see this somewhere on the CLI
```
renderChatBox : looking at memos...
No Hush contacts found on disk!
```
There is some potentially unnecessary code for this that may need to be removed entirely and may be related to #51
I was not experiencing a coredump in testing though.
Might be other weirdness if choosing to create or restore wallet here that I need to test.
I think this is fixed in: https://git.hush.is/hush/SilentDragonLite/commit/7398c70e2b9f592310e8727f5c9542ccbcb933a9
There is some potentially unnecessary code for this that may need to be removed entirely and may be related to https://git.hush.is/hush/SilentDragonLite/issues/51
I was not experiencing a coredump in testing though.
The cancel button first calls this:
https://git.hush.is/hush/SilentDragonLite/src/branch/dev/src/mainwindow.cpp#L377
And then this:
https://git.hush.is/hush/SilentDragonLite/src/branch/dev/src/mainwindow.cpp#L436
Might be other weirdness if choosing to create or restore wallet here that I need to test.
I reverted and will need to look into further. closeEventpw ends up getting called elsewhere if you choose to create a new wallet or restore from seed on welcome back screen. I submit seed and then closeEventpw gets called, so can't call close there.
I reverted and will need to look into further. `closeEventpw` ends up getting called elsewhere if you choose to create a new wallet or restore from seed on welcome back screen. I submit seed and then closeEventpw gets called, so can't call close there.
Seems the proper way to fix this is to use slots/signals with a queued connection. I added in latest commit and seems to work. No crash on new wallet/restore from welcome back, but I did have two loading screens appear while syncing for some reason and have seen that ocassionally on SD too.
My initial commit of just trying to close the app was actually coredumping because of that line prior to adding check, but I thought it was closing properly. When I added a check for rpc, the app still ran when calling close. Documentation had this relevant bit on quitting and exiting:
a signal connected (non-queued) to this slot is emitted before control enters the main event loop (such as before "int main" calls exec()), the slot has no effect and the application never exits. Using a queued connection ensures that the slot will not be invoked until after control enters the main event loop. https://doc.qt.io/qt-5/qcoreapplication.html#quit
Seems the proper way to fix this is to use slots/signals with a queued connection. I added in latest commit and seems to work. No crash on new wallet/restore from welcome back, but I did have two loading screens appear while syncing for some reason and have seen that ocassionally on SD too.
#51 coredumping may have been related to the main close event trying to shutdown rpc and rpc not existing. I added a check that maybe fixes coredump.
https://git.hush.is/hush/SilentDragonLite/src/branch/dev/src/mainwindow.cpp#L392
My initial commit of just trying to close the app was actually coredumping because of that line prior to adding check, but I thought it was closing properly. When I added a check for rpc, the app still ran when calling close. Documentation had this relevant bit on quitting and exiting:
> a signal connected (non-queued) to this slot is emitted before control enters the main event loop (such as before "int main" calls exec()), the slot has no effect and the application never exits. Using a queued connection ensures that the slot will not be invoked until after control enters the main event loop.
https://doc.qt.io/qt-5/qcoreapplication.html#quit
SDL Versions affected:
e420c93aa6
)Tested on...
OS: Arch Linux
Kernel: 5.16.10-arch1-1 #1 SMP PREEMPT Wed, 16 Feb 2022 19:35:18 +0000 x86_64 GNU/Linux
Rust version: rustc 1.56.0 (09c42c458 2021-10-18)
QT Version: 5.15.2+kde+r301-1
Issue Description
When I start up either of the affected SDL versions, I can enter my wallet's encryption password and then access my wallet as is expected. The issue happens when instead I hit the "Cancel" button on that "Welcome Back" screen instead of inputting that passwd.
Expected behavior
Unsure if this is related or not, but after drafting up this bug, I started up 1.5.3 for more testing and all of the Hushchats I had were gone. I then closed that and opened 1.5.2 with the same result. This may or may not be related to what is happening when 1.5.3 goes to the "New Wallet Wizard" after hitting Cancel.
I see this somewhere on the CLI
I think this is fixed in:
7398c70e2b
There is some potentially unnecessary code for this that may need to be removed entirely and may be related to #51
I was not experiencing a coredump in testing though.
The cancel button first calls this:
https://git.hush.is/hush/SilentDragonLite/src/branch/dev/src/mainwindow.cpp#L377
And then this:
https://git.hush.is/hush/SilentDragonLite/src/branch/dev/src/mainwindow.cpp#L436
Might be other weirdness if choosing to create or restore wallet here that I need to test.
I reverted and will need to look into further.
closeEventpw
ends up getting called elsewhere if you choose to create a new wallet or restore from seed on welcome back screen. I submit seed and then closeEventpw gets called, so can't call close there.Seems the proper way to fix this is to use slots/signals with a queued connection. I added in latest commit and seems to work. No crash on new wallet/restore from welcome back, but I did have two loading screens appear while syncing for some reason and have seen that ocassionally on SD too.
#51 coredumping may have been related to the main close event trying to shutdown rpc and rpc not existing. I added a check that maybe fixes coredump.
https://git.hush.is/hush/SilentDragonLite/src/branch/dev/src/mainwindow.cpp#L392
My initial commit of just trying to close the app was actually coredumping because of that line prior to adding check, but I thought it was closing properly. When I added a check for rpc, the app still ran when calling close. Documentation had this relevant bit on quitting and exiting:
Calling this done, re-open if it's not