Commit Graph
26 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 ddedd59568 Add MessageDialog and use it in place of the QMessageBox static functions
QMessageBox::information() and friends build the box on the stack, parent
it to the calling widget and run a nested event loop in exec(). If the
parent is closed while the box is open, which the Web API can do at any
time, the parent deletes the box and its children and the heap is
corrupted.

MessageDialog offers the same calls, but the box is heap allocated, given
Qt::WA_DeleteOnClose and shown rather than exec'd, so nothing runs a
nested event loop and the box owns its own lifetime. A box with the same
text as one already up is raised instead of a second being created.

The trade off is that information(), warning() and critical() return
immediately and cannot report which button was pressed. question() takes
a callback for the cases that need the answer.

Converts the call sites in the device, channel and feature GUIs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 17:16:49 +01:00
f4exb 63348eeee1 Make device title editable in the basic device settings. Fixes #2292 2026-01-28 03:05:39 +01:00
Daniele Forsi 8c3f7e3775 Remove unused includes and use more direct includes 2024-04-11 23:31:34 +02:00
srcejon 46c7206b42 Start file browser in directory of last file selected. 2023-12-13 13:33:31 +00:00
f4exb b6c4d10b62 Rewriting of copyright notices for plugins/samplesource. Part of #1893 2023-11-18 10:07:41 +01:00
Jon Beniston e799e5eb72 Fix resize cursor not being cleared when mouse moves over child widgets 2023-11-13 20:51:03 +00:00
Jon Beniston d574e74908 Support FileInput plugin on Android, by using QFile rather istream 2023-01-02 15:42:34 +00:00
Jon Beniston ee8b8ade88 Device GUIs: Constain window size via minimumSize/maximumSize, rather than handling resizeEvent. Add maximum button. Hide size buttons when window size is fixed 2022-11-09 15:53:44 +00:00
f4exb 90cab1dfda FileInput: Make settings assignments atomic. Part of #1329 2022-10-23 20:33:51 +02:00
Jon Beniston d6a02f659a Device GUIs: Stop timers in destructors. 2022-10-05 15:40:09 +01:00
f4exb 9e5c629473 v7: API: added workspace handling for device, spectrum, feature and channel. Implements #1242 2022-05-13 22:24:48 +02:00
f4exb 218237c466 Massive UI revamping (v7): Devices: set the border on the outer side of the window. Part of #1213 2022-04-24 02:13:18 +02:00
f4exb 90d331675a Massive UI revamping (v7): fixed widget size handling: sample sources. Part ofs #1209 2022-04-21 07:53:36 +02:00
f4exb 40e34bdebd Massive UI revamping (v7): implemented device common settings from top bar and added documentation on device windows top and bottom bars 2022-04-17 01:31:50 +02:00
f4exb 32973132d9 Massive UI revamping (v7): unify custom widget borders 2022-04-10 02:19:26 +02:00
f4exb aad90aeabc Massive UI revamping (v7): devices basic 2022-04-07 16:32:03 +02:00
f4exb d471f09cc2 Replaced frequency dials by labels for unmodifiable frequency displays 2021-12-16 00:18:11 +01:00
Andreas Baulig e8a8ef6f3d Switch FileRecord timestamp resolution to milliseconds 2021-08-04 14:12:24 +00:00
Jon Beniston 80fe6cb096 Add signed 16-bit PCM 2 channel .wav file support to File Input and File Record plugins 2021-05-21 10:06:10 +01:00
Jon Beniston bf9d5501b0 Allow filename to be restored from settings.
Allow filename to be set via API.
2021-03-05 15:55:44 +00:00
f4exb 841a8fe242 Morph PluginInstanceGUI in DeviceGUI and single line inheritance from QWidget 2020-10-05 19:48:05 +02:00
f4exb d085b4eb7d Removed undesirable methods from PluginInstanceGUI and related common plugins 2020-10-04 22:16:09 +02:00
f4exb 47a1eeaedc FileInput: calculate file record length down to the microsecond. Implements #614 2020-08-26 00:12:30 +02:00
f4exb d0c2b73d99 Full renaming of FileSource device to FileInput 2019-07-08 00:59:04 +02:00