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>
Both overrode showEvent for the QTBUG-100333 redraw workaround without
calling the base class, so the window state FeatureGUI publishes on show
never ran and the windows API reported the windows hidden while they
were on screen.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Previously, geoReply() combined the sender null check with the reply error
check, allowing a null pQGeoCode to reach the error handling and subsequent
deleteLater() call.
Check for a null sender first and return immediately when dynamic_cast()
fails. Valid replies then proceed through the existing error handling and
cleanup safely.
pointed out by cppcheck's nullPointerRedundantCheck.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
MapGUI owns the Aurora instance and the IonosondeStation objects stored in
m_ionosondeStations, but neither was released when MapGUI was destroyed.
AddressSanitizer reported:
Direct leak of 3232 byte(s) in 101 object(s)
#1 MapGUI::giroDataUpdated(...) mapgui.cpp:852
It also reported an indirect leak originating from the QNetworkAccessManager
created by Aurora:
Indirect leak of 376 byte(s) in 1 object(s)
#1 QNetworkAccessManager::QNetworkAccessManager(...)
#2 Aurora::create(...) aurora.cpp:314
Delete the Aurora instance and all stored IonosondeStation objects when
destroying MapGUI so their owned resources are released with the GUI.
Found by AddressSanitizer.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Add support for public list of SDRangel servers that can be displayed on Map.
Add FLAC and zlib IQ compression.
Add IQ squelch for compression.
Add remote device/antenna position and direction reporting.
Add text messaging.
Add left double click to add marker to 3D map.
Add support for alititudeReference for polygon and polyline.
Add support for plugins to set color of polygons.
Allow OpenSkyNetwork DB, OpenAIP and OurAirports DB stuctures to be
shared by different plugins, to speed up loading.
Perform map anti-aliasing on the whole map, rather than just info boxes,
to improve rendering speed when there are many items. Add map
multisampling as a preference.
Add plotting of airspaces, airports, navaids on Map feature.
Add support for polylines and polygons to be plotted on Map feature.
Add support for images to 2D Map feature.
Add distance and name filters to Map feature.
Filter map items when zoomed out or if off screen, to improve rendering
performance.
Add UK DAB, FM and AM transmitters to Map feature.
Use labelless maps for 2D transmit maps in Map feature (same as in ADS-B
demod).