Commit Graph
12 Commits
Author SHA1 Message Date
Edouard Griffiths 62ce6c7b88 Merge pull request #2955 from rgetz/rgetz-fix-message-queue-leaks
tree wide: Fix message ownership and reporting for unhandled queue messages
2026-09-27 00:56:58 +02:00
Robin Getz c2b30d4fa8 tree wide: Fix message ownership and reporting for unhandled queue messages
MessageQueue::pop() transfers ownership of the popped message to the
caller, but many handleInputMessages() implementations only deleted
the message when handleMessage() returned true. When a message was not
handled, ownership had already been transferred from the queue and the
message was leaked.

This was identified while investigating an ASAN leak in the audio
subsystem.

Update the applicable handleInputMessages() implementations to always
delete messages after handleMessage() returns. Unhandled messages are
also logged with the component and message identifier so unexpected
message routing is visible during debugging.

This change:
- Ensures every message popped from a queue has its ownership resolved.
- Prevents leaks when handleMessage() returns false.
- Makes unhandled messages visible instead of silently discarding them.
- Preserves the existing message handling logic and does not require
  components to handle message types that are legitimately irrelevant
  to them.

The changes are intentionally mechanical and limited to the common
message queue ownership and diagnostic pattern.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-09-25 23:49:05 -04:00
Jon BenistonandClaude Opus 5 71d8650c6d Drive feature state from a signal rather than polling it
Every feature GUI ran its own one second QTimer, read getState(), compared
it against a remembered m_lastFeatureState and restyled its start/stop
button when the two differed. The same twenty five lines appeared in each
of them.

Feature now keeps m_state private behind setState(), which emits
stateChanged() when it actually changes, and FeatureGUI grows a shared
updateStartStopButton() that restyles the button and reports an error
state. A GUI connects to the signal and calls that, so the state is
reflected as soon as it changes rather than up to a second later, and the
per feature timers and m_lastFeatureState members are gone.

FeatureUISet disconnects the feature from its GUI before the feature is
deleted: QObject emits destroyed() before dropping its connections, so a
stateChanged() emitted from the feature's destructor could otherwise reach
a GUI that has already deleted its ui object.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 17:49:02 +01:00
f4exb fedade27dd Morse decoder: set text intensity according to decoding cost factor 2026-01-17 05:52:41 +01:00
f4exb 22a8f160f0 Update channel list upon Morse Decoder and Demod Analyzer GUI creation. Fixes #2263 2024-10-05 17:13:03 +02:00
f4exb 5d0fa7fa67 Removed destroy method leftovers and Sonar lint 2024-08-27 09:54:09 +02:00
f4exb 4d5958f630 Morse Decoder: added option to show decoder thershold trace or not 2024-05-23 18:51:54 +02:00
f4exb 1edaa0d98a Morse Decoder: adeed scope and set bytes block size appropriately plus minor changes 2024-05-20 22:49:48 +02:00
f4exb 8e9661f011 Morse Decoder: added scope 2024-05-20 22:49:48 +02:00
f4exb 112cd4cac4 Morse Decoder: added scope from RTTY decoder 2024-05-20 22:49:48 +02:00
f4exb 39bc799509 Morse Decoder: basic functionality 2024-05-20 22:49:48 +02:00
f4exb 4387f54f0d Morse Decoder: initial commit 2024-05-20 22:49:48 +02:00