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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: LateInitializationError in AnnouncementWorkflowNotifier #1192

Merged

Conversation

YassinNouh21
Copy link
Contributor

馃摑 Summary

This PR for issue #1158

Description

This pull request addresses a critical issue where a LateInitializationError occurs in the AnnouncementWorkflowNotifier class. The error is caused by accessing the '_timer' field before it has been properly initialized, leading to app crashes on Android TV devices.

Key changes:

  1. Modified AnnouncementWorkflowNotifier to ensure '_timer' is correctly initialized before use.
  2. Implemented null checks and error handling to prevent crashes if initialization fails.
  3. Refactored timer logic to be more robust and less susceptible to race conditions.

These changes aim to resolve the high-priority crash affecting users on Android TV devices, improving app stability and overall user experience.

Tests

馃И Use case 1: Normal app flow

馃挰 Description:

  1. Launch the app on an Android TV device
  2. Navigate through various screens that utilize the AnnouncementWorkflowNotifier
  3. Verify that no crashes occur and the announcement workflow functions as expected

馃摲 Screenshots or GIFs (if applicable):
[No screenshots provided as this is a backend fix without visual changes]

Checklist:

  • Coding Standards: I have reviewed my code to ensure it follows the project's coding standards.
  • Testing: I have tested the changes and they work as expected.
  • Merge Conflicts: I have resolved any merge conflicts with the latest main/development branch.
  • Branch Status: The branch is up-to-date with the target branch (main/development).

@YassinNouh21 YassinNouh21 self-assigned this Jun 24, 2024
@YassinNouh21 YassinNouh21 added the bug Something isn't working label Jun 24, 2024
Copy link
Contributor

@ghassenbenzahra123 ghassenbenzahra123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ibrahim-zehhaf-mawaqit ibrahim-zehhaf-mawaqit merged commit e0c18f4 into main Jul 11, 2024
1 check passed
@ibrahim-zehhaf-mawaqit ibrahim-zehhaf-mawaqit deleted the fix/late_announcement_initialization_error branch July 11, 2024 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LateError: LateInitializationError: Field '_timer@1293098853' has not been initialized.
3 participants