fix: bug bash — FlexRadio crashes, TCP hang, dead audio pad, charset#97
Closed
patrickrb wants to merge 1 commit into
Closed
fix: bug bash — FlexRadio crashes, TCP hang, dead audio pad, charset#97patrickrb wants to merge 1 commit into
patrickrb wants to merge 1 commit into
Conversation
Four independent fixes found during a sweep of FlexRadio, the Flex TCP client, the FT8 TX path, and the QRZ/Cloudlog HTTP client. None are regressions from a recent change; all are latent bugs. - FlexRadio.getHeadAndContent: the old guard checked line.length() before accessing temp[1], but a no-delimiter response produces a length-1 split[]. Crashed the CAT parser thread with AIOOBE. - FlexRadio command dispatch: FlexCommand.values()[seq_number % 1000] assumed the enum had >=1000 entries; an out-of-range sequence number crashed with AIOOBE. Now bounds-checked, unknown commands are logged and skipped. - RadioTcpClient: replaced new Socket(addr, port) with timeout-bounded connect(InetSocketAddress, 5000) + setSoTimeout(15000). An unreachable Flex used to hang the connect thread up to ~75 s with no UI feedback. - FT8TransmitSignal.float2Short: dropped the +8 zero-pad that the 16-bit AudioTrack.write never actually included (playLength caps at buffer.length - skipSamples), and that the 32-bit path didn't have at all. The comment claiming QP-7C RP2040 compatibility was misleading on both paths. - ThirdPartyService.sendGetRequest: pass StandardCharsets.UTF_8 to the InputStreamReader for parity with the sibling reader near line 443. Prevents QRZ/Cloudlog responses with non-ASCII content from decoding wrong on non-UTF-8 default locales. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
Four independent latent bugs surfaced during a bug-bash sweep across FlexRadio, the Flex TCP client, the FT8 TX path, and the QRZ/Cloudlog HTTP client. None are regressions from a recent change.
Test plan
Related
Companion fixes that touch POTA-only files (DatabaseOpr migration repair, POTA self-spot frequency, POTA ADIF exporter UTF-8 length) were pushed to PR #96 since they only apply where the POTA branch's files exist.
🤖 Generated with Claude Code