Repository navigation
Problem reports show the run before a crash, on every Android version - #195
Merged
Merged
Conversation
Report CB-4K36FJ (Xiaomi TV, Android 6) couldn't tell why CastBay had restarted three times: its logs were in memory and died with the process, and Android 6 doesn't say why an app ended (Android 11+ do). - Every build now keeps its log on disk: logs/castbay.log (Kotlin) and logs/protocol.log (native, previously only in debug builds, and sharing one file). Each starts afresh past a size, keeping the one before as .old, so the newest lines survive. Release builds keep 128 KB per file in internal storage; debug builds 10 MB, on external storage when they can. A new process keeps the previous one's as .1. - While the receiver runs, a marker file records the boot. If the next process finds it from the same boot, the previous run ended without CastBay stopping it (a crash, or Android ending it): that is noted among the Diagnostics events, and a problem report adds that run's last lines (both logs, merged in time order), scrubbed like the rest. - The privacy policy describes the on-device log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Report CB-4K36FJ showed three restarts but no cause. The logs lived only in memory, and Android 6 has no exit reasons.
Changes
logs/castbay.log(Kotlin) andlogs/protocol.log(native)..oldpast a cap: 128 KB in release (internal storage), 10 MB in debug..1./proc/sys/kernel/random/boot_id).Tests
kill -9on the process, restarted. The event was recorded, and uploaded report CB-EX1H6J contains the previous run's app and protocol lines in time order.🤖 Generated with Claude Code