Systematically resolved 30 identified potential crash vectors and established automated regression testing to prevent strict reoccurrence.
Key Changes:
- Fixed 11 instances of unsafe `QObject::connect` calls (missing context object) in srd/Charts/AgendaWindow.cpp, FixSpikes.cpp, src/FileIO/FixSpikes.cpp, src/Gui/Agenda.cpp, src/Gui/BatchProcessingDialog.cpp, and src/Gui/IconManager.cpp. This prevents crashes caused by signals firing after the receiver has been destroyed.
- Fixed 19 instances of unsafe `QTreeWidgetItem` child access in src/Charts/LTMChartParser.cpp, src/Gui/ColorButton.cpp, src/Gui/AthletePages.cpp, and src/Gui/Pages.cpp by adding defensive `nullptr` checks before dereferencing.
- Added Python detection scripts util/check_unsafe_connects.py and util/check_unsafe_tree_child.py to statically analyze the codebase for these specific unsafe patterns.
- Integrated detection scripts into the regression test suite under `unittests/Core/signalSafety`, verifying the fixes and enforcing a strict zero-tolerance policy for future regressions.
- Added `testSplineCrash` to cover edge cases with empty spline lookups.
GENERIC SUPPORT FOR PARSING INTO XDATA
.. Generically parse FIT file messages into XDATA. The current
implementation does this for session, lap and totals messages
but could very easily be extended to any other message type
.. Generic parsing uses metadata rather than hard coding the
message and field types and so on
.. The FIT metadata (FITmetadata.json) has been expanded to
include definitions of message types and all the standard
fields within the message types
.. The existing hard-coded parsing remains to extract data
and apply directly to ridefile samples and metadata. The
generic parser simply adds additional tabs on the data
view as XDATA so users can access it.
CODE REFACTORING, COMMENTS AND BUG FIXES
.. At some point the code needs to be refactored as it is
janky and needs to align with the rest of the codebase
.. Includes a mild refactor renaming some of the classes/structs
and variables to reflect what they actually are, for example:
FitFileReadState -> FitFileParser
FitDefinition -> FitMessage
.. Added lots of code comments and re-organised the code
into clear sections to help navigate what is a very
cumbersome source file, this breaks git blame history
but is worth the loss (you can checkout an earlier commit
to do a full blame)
.. Changed debugging levels to be more helpful
.. Generally I did not change any code, but there were a
couple of serious bugs that needed to be corrected:
Field definitions gets the type wrong in a couple of
places since the type is stored in the low 4 bits:
type = value & 0x1F
The decodeDeveloperFieldDescription function did not
check for NA_VALUEs for scale, offset, native field
.. For less serious bugs I added FIXME comments throughout the code
Fixes#4416
.. clarify how to make updates in the README
.. replace the fit_example.h from the current SDK
.. added Garmin devices not yet supported in the SDK to
the nongarmin.json file
.. updated the makefile to use python3 and update when
the python program is changed.
.. first part just to get the configuration ready to
build out a chart for the trend and activity view
.. src.pro and gcconfig.pri are updated to link in with
the RInside/Rcpp package install (new dependency)
.. there is a script in util called install-packages.R
which can be run to install the packages so long as
R is available:
$ R CMD BATCH util/install-packages.R