Bug in TmPacketStoredPusC #478
Labels
No Label
API Change
Breaking API Change
bug
build
cosmetics
Documentation
duplicate
feature
help wanted
hotfix
invalid
question
Refactor
Tests
wontfix
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fsfw/fsfw#478
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I found a bug which causes the FSFW to crash.
If
getFreeElement
fails, anullptr
is passed intoinitializeTmPacket
.The problem is, this is a constructor.. Im investigating whether returning prematurely solves the issue
Returning prematurely fixes the issue for the specific call here where an event was generated. The subsequent
serialize
call failed. However, the object is still invalid and other methods might cause issues.Hm this is one of those examples were a Constructor is able to fail and the object is in an invalid state. Calling
initializeTmPacket
ifgetFreeElement
failed is a bug (and the serialize calls as well). We could change that to be an initialize function which is able to return instead of doing all this stuff in the constructor. This will make the API less clear unfortunately.But one could argue that this should never happen as the TmStore needs to be large enough. This would be a risky argument because this might happen on very special occasions which are difficult to test.
I think failing here should not result in a crash. The TmPacket will be lost but that is reported.
Ok I have checked the old FLP Implementation and the current fsfw:
As long as the child implementation returns a nullptr for getAllTmData() this is safe to call. However, we should think about resolving the SHOULDDO.
PusA and PusC share a lot of Code in TmPacketStoredPusX. This seems unreasonable to me.
@muellerr checked that combining A and C is not reasonable atm, so we're staying with the duality for now.