-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure during CFE_ES_ExitApp if app calls CFE_TBL_Unregister #741
Comments
It seems by default the tables are being cleaned up automatically as shown below which is part of the CFE_ES_CleanUpApp function: cFE/fsw/cfe-core/src/es/cfe_es_apps.c Lines 1083 to 1085 in d217ca3
This clean up call eventually calls: cFE/fsw/cfe-core/src/tbl/cfe_tbl_internal.c Line 1429 in 95f34d2
Which is the same function in CFE_TBL_Unregister: cFE/fsw/cfe-core/src/tbl/cfe_tbl_api.c Line 641 in d217ca3
Seems like a bug since an already unregistered table shouldn't be cleaned up again by CFE_ES_CleanUpApp -> CFE_TBL_CleanUpApp. |
Agreed. Updated title and marked as bug. |
Tested this today - It may have been fixed by other changes, possibly the transition to ES background task and the better locking ES that was implemented with that. To test - what I did was modify SAMPLE_APP (which registers a table) to only run for 5 seconds, then exit. As part of exiting, I added a call to The only (minor) issue I observed is that there is an extra "unknown state" event after the app exits itself: But otherwise everything seemed to work just fine. |
@pcooksey can you check if this issue still exists in the current main branch? |
If it's fixed we should still fix the documentation, table will be unregistered during cleanup so this is only needed if the App wants to unregister explicitly. |
Fix #741, Document CFE_TBL_Unregister use-case
Describe the bug
Should an app call CFE_TBL_Unregister?
On CFE_ES_ExitApp I get:
The documentation no longer says anything about it so I'm starting to think it shouldn't be used. The sample_app in the cFS repo also doesn't call CFE_TBL_Unregister either.
The code seems to say we should though:
cFE/fsw/cfe-core/src/inc/cfe_tbl.h
Lines 334 to 339 in 95f34d2
To Reproduce
Expected behavior
No errors on exit
Code snips
N/A
System observed on:
Additional context
N/A
Reporter Info
Philip Cooksey, NASA Ames
The text was updated successfully, but these errors were encountered: