Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kivy GUI loaded with wallet equal to None #6796

Closed
ecdsa opened this issue Nov 30, 2020 · 8 comments
Closed

Kivy GUI loaded with wallet equal to None #6796

ecdsa opened this issue Nov 30, 2020 · 8 comments
Assignees

Comments

@ecdsa
Copy link
Member

ecdsa commented Nov 30, 2020

Several crashes are caused by a Kivy app loaded with self.wallet equal to None.

I'm opening this issue to centralize information:

#6662 (password_dialog)
#6427 (get_invoices)
#6397 (historyscreen show_item)
#6389 (get_sorted_requests)
#6346
#6184
#5863
#4548
#4525
#4527
#4506
#4502
#4501

from the reports it seems that in some cases wallet is set to None after the wallet has been normally loaded.
maybe on_stop is called by the system in an unexpected way

@ecdsa ecdsa self-assigned this Nov 30, 2020
@ecdsa
Copy link
Member Author

ecdsa commented Nov 30, 2020

also, in on_open_wallet, an early return is executed if StorageReadWriteError is raised.
This would result in a GUI loaded with wallet == None

edit: this early return is removed in d3b3426

@ecdsa
Copy link
Member Author

ecdsa commented Dec 1, 2020

maybe relevant: https://github.com/akshayaurora/electrum/blob/trezorlib_integration/electrum/gui/kivy/main_window.py#L707

edit: not relevant; if a thread prevents the app from terminating, the GUI is closed.

@ecdsa
Copy link
Member Author

ecdsa commented Dec 1, 2020

Maybe relevant: if the on_wizard_complete event is not caught for some reason, then we would end up in the situation described above. That event was removed in 2923c00

@ecdsa
Copy link
Member Author

ecdsa commented Dec 4, 2020

I found another execution path that leads to this: if the wizard terminates with aborted=True and the GUI has no wallet, a popup is shown with the question "Do you want to launch the wizard again?". If instead of tapping "No" the user taps the Back button, then the wizard terminates but the GUI is not stopped. This was introduced in cf80952

ecdsa added a commit that referenced this issue Dec 4, 2020
@ecdsa
Copy link
Member Author

ecdsa commented Dec 4, 2020

I think the previous execution path explains most of these bugs, and 5058cf9 fixes it.
I will leave this issue open to see whether new reports are coming

@SomberNight
Copy link
Member

another execution path is to get an exception raised in the kivy wizard, have a crash reporter window open, and then dismiss the crash reporter window --> now the app does not stop and we have wallet=None

@ecdsa
Copy link
Member Author

ecdsa commented Dec 9, 2020

another execution path is to get an exception raised in the kivy wizard, have a crash reporter window open, and then dismiss the crash reporter window --> now the app does not stop and we have wallet=None

actually, you don't even need to dismiss the crash reporter window. it happens whatever you choose to do :-)

edit: handled in 07bc4c4

@ecdsa
Copy link
Member Author

ecdsa commented Dec 17, 2020

closing, I expect these issues to be fixed in 4.0.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants