Repository navigation
Don't crash when a fetch outlives the map screen that started it - #296
Merged
Merged
Conversation
Leaving Settings after a theme change rebuilds MapsActivity. The new one
restores a fresh account and closes the old one under PythonLock. The
old screen's fetch, queued on that lock, then ran on the closed account
("HttpSession has been closed"). Its subscription was already disposed,
so the error had nowhere to go, and RxJava's default handler killed the
process.
- PythonAppleService reads the account once it holds the lock: the
current one if it was replaced meanwhile, nothing after a sign-out.
HistoryViewActivity keeps an instance too, so this covers it as well.
- An UndeliverableException is logged instead of crashing. Anything else
reaching RxJavaPlugins is a bug and still crashes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
parawanderer
temporarily deployed
to
Android Build
November 21, 2026 13:19 — with
GitHub Actions
Inactive
parawanderer
temporarily deployed
to
Android Build
November 21, 2026 13:19 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The app crashed on leaving Settings after a theme change. Found while testing #273, but
mainhas it too: #273 only changes comments inPythonLock.What happens:
MapsActivity. The new one restores a fresh account, andPythonAppleService.setupcloses the old one underPythonLock.HttpSession has been closed and cannot be used.UndeliverableException).Changes
PythonAppleService.getLastReports/getReportsBetweenpick the account after taking the lock. If the service was replaced while the fetch waited, they use the current account; after a sign-out, they return an empty result.HistoryViewActivityalso holds an instance, so this covers it.OpenAirTagApplicationinstallsUndeliverableErrors.handler()as RxJava's error handler. AnUndeliverableExceptionis logged; anything else still goes to the thread's uncaught-exception handler, so real bugs still crash.Testing
UndeliverableErrorsTest(JVM): a fetch whose subscriber is disposed mid-call and then fails doesn't crash; a bug type still does. With the handler removed, the first test fails.testDebugUnitTest: 522 pass. The 20 that fail are the existing Windows-only failures inEmulatedMacAnisetteTest/UnicornNoticeTest(File.renameToover an existing file, and CRLF), unrelated.🤖 Generated with Claude Code