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

Rework FAUcardPaymentThread: add type annotations, fix crash #176

Merged
merged 13 commits into from
Mar 8, 2024

Conversation

mgmax
Copy link
Member

@mgmax mgmax commented Jan 23, 2024

  • Support checking FAUcardPaymentThread.py with mypy for type errors
  • Fix crash after connection loss
  • Remove the feature that allowed the user to "force terminate" the thread 60 seconds after pressing "abort"
  • Rework and refactoring that makes the code better but should not change user-visible behavior
  • Hopefully fixed some hidden bugs during the rework

If an Exception occured outside the main thread, then the app crashed hard and didn't show any error message to the user.
@mgmax mgmax changed the title REFACTOR FAUcardPaymentThread: add type annotations Rework FAUcardPaymentThread: add type annotations, fix crash Feb 16, 2024
…uring payment

1. FAUCard payment started
2. user presents card
3. user removes card just before the decrease command
4. user presses cancel
5. --> Bug: FAUCardPayment sent ACK twice
mcx16 and others added 3 commits March 1, 2024 20:57
In summary, the code that handles the end of a payment is now improved, but still does the same as before. Probably a few bugs were fixed on the way.

Remove the possibility to force-terminate the thread.
Program behavior of QThread terminate() is not well-defined and may leave the program/memory in an undefined state, so we must not allow this.

Remove confusing dialog box about user abortion.

Remove confusing set_finish_log. Make clear that finish_log may only be used outside FAUCardThread.

Rework thread closing.

Remove some unused functions.
@mgmax mgmax merged commit c7a0d6b into development Mar 8, 2024
4 checks passed
@mgmax mgmax deleted the faucard-typing branch March 8, 2024 23:41
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 this pull request may close these issues.

2 participants