Skip to content

Fix issues on JoinedRoom / BaseRoom #4724

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

Merged
merged 6 commits into from
May 15, 2025
Merged

Fix issues on JoinedRoom / BaseRoom #4724

merged 6 commits into from
May 15, 2025

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented May 15, 2025

Content

This PR fixes issue detected in the code that could lead to leak.
It may fixes issue related to incoming call not cancelled when answered else where, as well as other issues where the room state was observed.

Motivation and context

Stable code.

Screenshots / GIFs

Tests

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@bmarty bmarty requested a review from a team as a code owner May 15, 2025 07:08
@bmarty bmarty requested review from ganfra and removed request for a team May 15, 2025 07:08
@bmarty bmarty added the PR-Bugfix For bug fix label May 15, 2025
Copy link
Contributor

github-actions bot commented May 15, 2025

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/ZWcgfk

sessionCoroutineScope = this
)
rustBaseRoom.destroy()
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: this test is failing if roomCoroutineScope (child of sessionCoroutineScope) is not cancelled.

Copy link
Member

Choose a reason for hiding this comment

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

You could also probably double check rustBaseRoom.roomCoroutineScope.isActive.

Copy link

codecov bot commented May 15, 2025

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 80.12%. Comparing base (9c69718) to head (1c80aa6).
Report is 8 commits behind head on develop.

Files with missing lines Patch % Lines
...android/libraries/matrix/impl/room/RustBaseRoom.kt 60.00% 2 Missing ⚠️
...roid/libraries/matrix/impl/room/RustRoomFactory.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4724      +/-   ##
===========================================
+ Coverage    80.09%   80.12%   +0.03%     
===========================================
  Files         2129     2129              
  Lines        56416    56413       -3     
  Branches      7052     7052              
===========================================
+ Hits         45188    45203      +15     
+ Misses        8811     8793      -18     
  Partials      2417     2417              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes!

The test would fail anyway if roomCoroutineScope was still active, but it's more explicit with these assertions.
@bmarty bmarty enabled auto-merge (squash) May 15, 2025 15:42
Copy link

@bmarty bmarty merged commit 0817da9 into develop May 15, 2025
28 of 29 checks passed
@bmarty bmarty deleted the feature/bma/cleanup branch May 15, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Bugfix For bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants