Skip to content

Fix a few crashes#1933

Merged
SessionHero01 merged 5 commits into
release/1.31.1from
fix-crash-anr
Feb 13, 2026
Merged

Fix a few crashes#1933
SessionHero01 merged 5 commits into
release/1.31.1from
fix-crash-anr

Conversation

@SessionHero01

Copy link
Copy Markdown
Collaborator
  • Add stack to API exception and catches a few exceptions
  • Try catch PathManager
  • Cancellation handling

)
)
} catch (e: Exception) {
if (e !is CancellationException) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Won't you be swallowing the CancellationException now though?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yep, will update

)
)
} catch (e: Throwable) {
if (e !is CancellationException) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same here? Is it ok to absorb the cancellationException?

@@ -177,6 +178,7 @@ class SnodeDirectory @Inject constructor(
}.onFailure { e ->
lastError = e

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I wonder if semantically we should move lastError = e after the CancellationException? I don't think we need to remember CancellationException as the lastException in this case, don't you think?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yep happy to update this

@SessionHero01
SessionHero01 merged commit b59848a into release/1.31.1 Feb 13, 2026
4 checks passed
@SessionHero01
SessionHero01 deleted the fix-crash-anr branch February 13, 2026 00:59
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