You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
sample_app does not actually check the status returned by the call to CFE_TBL_Load(). As a result, if the filename is wrong or missing, it is not obvious that the app has not initialized itself fully, because it still prints the "SAMPLE App Initialized" message as usual.
To Reproduce
Start CFE framework as normal but without the sample app table file present in the /cf directory. The sample app still starts "successfully" as reported in the message but the table is not loaded.
Expected behavior
The app shouldn't report that it initialized if the table didn't load.
Code snips
The status is saved to a local variable here, but nothing is done with it:
Additional context
Surprising that this is not reported by static analysis, as it seems to be a case of variable assignment without use.
Also worth noting that table services itself does send an event about the failure to load the table, but it doesn't have much detail: EVS Port1 66/1/CFE_TBL 53: SAMPLE_APP: Unable to open file (FileDescriptor=-1)
If OSAL debug is enabled (OSAL_CONFIG_DEBUG_PRINTF) then the user does get a message on the console, at least on Linux, with more detail ("No such file or directory").
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered:
Describe the bug
sample_app does not actually check the status returned by the call to
CFE_TBL_Load()
. As a result, if the filename is wrong or missing, it is not obvious that the app has not initialized itself fully, because it still prints the "SAMPLE App Initialized" message as usual.To Reproduce
Start CFE framework as normal but without the sample app table file present in the /cf directory. The sample app still starts "successfully" as reported in the message but the table is not loaded.
Expected behavior
The app shouldn't report that it initialized if the table didn't load.
Code snips
The status is saved to a local variable here, but nothing is done with it:
sample_app/fsw/src/sample_app.c
Lines 210 to 220 in 1c32ed4
System observed on:
Ubuntu 20.04
Additional context
Surprising that this is not reported by static analysis, as it seems to be a case of variable assignment without use.
Also worth noting that table services itself does send an event about the failure to load the table, but it doesn't have much detail:
EVS Port1 66/1/CFE_TBL 53: SAMPLE_APP: Unable to open file (FileDescriptor=-1)
If OSAL debug is enabled (OSAL_CONFIG_DEBUG_PRINTF) then the user does get a message on the console, at least on Linux, with more detail ("No such file or directory").
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: