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

Fixed: Xapian crash scenarios. #3885

Merged
merged 8 commits into from
Jun 20, 2024
Merged

Fixed: Xapian crash scenarios. #3885

merged 8 commits into from
Jun 20, 2024

Commits on Jun 18, 2024

  1. Fixed: Xapian crash scenarios.

    * Enhanced retrieval of suggestion lists from libzim.
    * Implemented task cancellation if the fragment is not visible.
    * Refactored getVisibleResults into a suspend method to ensure efficient job cancellation.
    * Handled exceptions thrown by coroutines.
    * Transitioned to Kotlin Flow instead of Flowable after making getVisibleResults suspend.
    * Employed lifecycleScope for coroutine launch to prevent unnecessary calls when the fragment is hidden.
    MohitMaliDeveloper committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    8865aac View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2024

  1. Improved the getVisibleResults method to check if the current job i…

    …s cancelled before requesting suggestion results from libzim.
    
    * Enhanced the loadMoreSearchResults method to accommodate this modification.
    * Refined the render method to effectively cancel any previously running tasks upon its subsequent execution.
    MohitMaliDeveloper committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    c405025 View commit details
    Browse the repository at this point in the history
  2. Moved the global mutex to the SearchResultsWithTerm class to prevent …

    …concurrency issues.
    
    * Applied mutex locking in the SearchState class to ensure safe access to search results when users search for different terms.
    MohitMaliDeveloper committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    9875ad5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1dfac37 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e993437 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    eb95bdd View commit details
    Browse the repository at this point in the history
  6. Added instrumentation test cases to test the search functionality.

    * Testing the render method with different scenarios to ensure that libzim do not crash due to broken call stack.
    MohitMaliDeveloper committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    1fcbe67 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    193c0d1 View commit details
    Browse the repository at this point in the history