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

Dice roll failure after seed words displayed #434

Closed
hax0rbana-adam opened this issue Aug 14, 2023 · 0 comments · Fixed by #435
Closed

Dice roll failure after seed words displayed #434

hax0rbana-adam opened this issue Aug 14, 2023 · 0 comments · Fixed by #435

Comments

@hax0rbana-adam
Copy link

When trying to add a new, 12-word seed using the dice rolling, it prints an error on the screen (photograph below).

IMG_20230813_175840_734

This is 100% reproducible on the current dev branch: b68a5e2

Steps to reproduce

Seeds -> Load a seed -> Create a seed -> New seed (dice icon) -> 12 words

Mash buttons for a while.

I understand -> next (x3) -> get error message pictured above

Stacktrace

Full stacktrace

Aug 13 23:57:04 raspberrypi python3[400]: Executing ToolsMenuView()
Aug 13 23:57:04 raspberrypi python3[400]: Appending next destination: ToolsDiceEntropyMnemonicLengthView()
Aug 13 23:57:04 raspberrypi python3[400]: ------------------------------
Aug 13 23:58:00 raspberrypi python3[400]: Traceback (most recent call last):
Aug 13 23:58:00 raspberrypi python3[400]:   File "/home/pi/seedsigner/src/seedsigner/controller.py", line 301, in start
Aug 13 23:58:00 raspberrypi python3[400]:     next_destination = next_destination.run()
Aug 13 23:58:00 raspberrypi python3[400]:   File "/home/pi/seedsigner/src/seedsigner/views/view.py", line 160, in run
Aug 13 23:58:00 raspberrypi python3[400]:     return self._run_view()
Aug 13 23:58:00 raspberrypi python3[400]:   File "/home/pi/seedsigner/src/seedsigner/views/view.py", line 153, in _run_view
Aug 13 23:58:00 raspberrypi python3[400]:     if self.view.has_redirect:
Aug 13 23:58:00 raspberrypi python3[400]:   File "/home/pi/seedsigner/src/seedsigner/views/view.py", line 80, in has_redirect
Aug 13 23:58:00 raspberrypi python3[400]:     raise Exception(f"{self.__class__.__name__} did not call super().__init__()")
Aug 13 23:58:00 raspberrypi python3[400]: Exception: SeedWordsBackupTestPromptView did not call super().__init__()
Aug 13 23:58:00 raspberrypi python3[400]: SeedWordsBackupTestPromptView did not call super().__init__()
Aug 13 23:58:00 raspberrypi python3[400]: Traceback (most recent call last):
Aug 13 23:58:00 raspberrypi python3[400]:   File "/home/pi/seedsigner/src/seedsigner/controller.py", line 301, in start
Aug 13 23:58:00 raspberrypi python3[400]:     next_destination = next_destination.run()
Aug 13 23:58:00 raspberrypi python3[400]:   File "/home/pi/seedsigner/src/seedsigner/views/view.py", line 160, in run
Aug 13 23:58:00 raspberrypi python3[400]:     return self._run_view()
Aug 13 23:58:00 raspberrypi python3[400]:   File "/home/pi/seedsigner/src/seedsigner/views/view.py", line 153, in _run_view
Aug 13 23:58:00 raspberrypi python3[400]:     if self.view.has_redirect:
Aug 13 23:58:00 raspberrypi python3[400]:   File "/home/pi/seedsigner/src/seedsigner/views/view.py", line 80, in has_redirect
Aug 13 23:58:00 raspberrypi python3[400]:     raise Exception(f"{self.__class__.__name__} did not call super().__init__()")
Aug 13 23:58:00 raspberrypi python3[400]: Exception: SeedWordsBackupTestPromptView did not call super().__init__()
Aug 14 00:01:41 raspberrypi python3[400]: back_stack: [
Aug 14 00:01:41 raspberrypi python3[400]:      2: ToolsDiceEntropyMnemonicLengthView()
Aug 14 00:01:41 raspberrypi python3[400]:      1: ToolsMenuView()
Aug 14 00:01:41 raspberrypi python3[400]:      0: LoadSeedView() | clear_history: True
Aug 14 00:01:41 raspberrypi python3[400]: ]
Aug 14 00:01:41 raspberrypi python3[400]: Executing ToolsDiceEntropyMnemonicLengthView()
Aug 14 00:01:41 raspberrypi python3[400]: Appending next destination: ToolsDiceEntropyEntryView({'total_rolls': 50})
Aug 14 00:01:41 raspberrypi python3[400]: ------------------------------
Aug 14 00:01:41 raspberrypi python3[400]: back_stack: [
Aug 14 00:01:41 raspberrypi python3[400]:      3: ToolsDiceEntropyEntryView({'total_rolls': 50})
Aug 14 00:01:41 raspberrypi python3[400]:      2: ToolsDiceEntropyMnemonicLengthView()
Aug 14 00:01:41 raspberrypi python3[400]:      1: ToolsMenuView()
Aug 14 00:01:41 raspberrypi python3[400]:      0: LoadSeedView() | clear_history: True
Aug 14 00:01:41 raspberrypi python3[400]: ]

Code reference

Indeed, this view doesn't call the super class's initialization method, unlike all the others.

https://github.com/hax0rbana-adam/seedsigner/blob/432-manual-install-instructions/src/seedsigner/views/seed_views.py#L1115

The question is: why? Was it an error, or was there a good reason to omit it and the code that is checking this and raising the exception the thing that needs to change?

Adding the call to super().__init__() does avoid the exception and thus the error, but I'm not sure if this fix is going to have unintended consequences later down the road.

hax0rbana-adam pushed a commit to hax0rbana-adam/seedsigner that referenced this issue Aug 14, 2023
hax0rbana-adam pushed a commit to hax0rbana-adam/seedsigner that referenced this issue Aug 14, 2023
hax0rbana-adam pushed a commit to hax0rbana-adam/seedsigner that referenced this issue Aug 14, 2023
newtonick added a commit that referenced this issue Aug 14, 2023
…-crash

fix: avoid execption by calling parent class's constructor #434
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant