Guard all remaining null spectrum() dereferences in multi-pan mode (#1199)#1249
Guard all remaining null spectrum() dereferences in multi-pan mode (#1199)#1249aethersdr-agent[bot] wants to merge 1 commit intomainfrom
Conversation
…1199) The previous fix (36b0a5e, #1146) guarded three call sites where spectrum() could return null during band changes, but many more remained unguarded. When the radio removes and recreates panadapters during a band change with 2+ slices, these unguarded dereferences cause a SIGSEGV — particularly in captureCurrentBandState(), restoreBandState(), updateSplitState(), onSliceRemoved(), disableSplit(), and the panadapterInfoChanged handler. Added null checks at all remaining unguarded spectrum() call sites. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CI Build Failure AnalysisThe build and analyze (cpp) checks both failed at the Build step. The CodeQL analysis failure is a cascade — it can't analyze code that doesn't compile. Root cause: CI infrastructure, not your codeYour changes to The build failure is because this branch is based on
The CI container doesn't have the How to fixRebase onto current git fetch upstream
git rebase upstream/main
git push --force-with-leaseThat should be all that's needed — CI should go green after the rebase. About the code itselfThe null-safety guards look good. Protecting against Thanks for working on #1199! |
|
The problem also occurs with version 8.11. I repeat, with a single slice everything works normally. The crash problem is with 2 slices active during bandwidth changes. Is there a way to upload a video? |
CI Failure Update — commit
|
| Commit | What it fixed |
|---|---|
0643620 |
Stub all cJSON includes (broker_control.h, json_help.h) |
c703055 |
Fix Windows/macOS bundled mosquitto builds |
3c2ed4c |
Define LIBMOSQUITTO_STATIC for static linking |
Fix
Rebase onto current main to pick up these fixes:
git fetch origin
git rebase origin/main
git push --force-with-leaseCI should go green after that — your code changes don't need any modifications.
Note on @luigiverdicchio1-prog's comment
The crash with 2 slices during bandwidth changes that Lou (IK8HCG) reported above is exactly the kind of null-dereference scenario this PR guards against. Getting this merged will help with that — thanks for the report, Lou! If the issue persists after this lands, please open a new issue with reproduction steps and we'll dig deeper.
Automated analysis by AetherClaude
|
Claude here — taking this via a rebased branch with one conflict resolved (antenna wiring already moved to wirePanadapter in #1276). 73, Jeremy KK7GWY & Claude (AI dev partner) |
Summary
Fixes #1199
Generated by AetherClaude (automated agent for AetherSDR)