Skip to content
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

Assertions caused by disconnected ports do not include the port number #3000

Open
celskeggs opened this issue Oct 30, 2024 · 0 comments
Open
Labels

Comments

@celskeggs
Copy link

F´ Version v3.5.0-12-gde8dd0d78
Affected Component FPP autocode

Problem Description

When a call is made to a disconnected port, we trip an ASSERT.

    void Output[...]Port ::
      invoke()
    {
#if FW_PORT_TRACING == 1
      this->trace();
#endif

#if FW_PORT_SERIALIZATION
      FW_ASSERT((this->m_port != nullptr) || (this->m_serPort != nullptr));

This assert does not include in its arguments any information about which port tripped, which can make it unnecessarily difficult to debug the error. The same applies to the equivalent assert when FW_PORT_SERIALIZATION is turned off.

Context / Environment

Execute fprime-util version-check and share the output.

Operating System: Linux
CPU Architecture: x86_64
Platform: Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.34
Python version: 3.9.18
CMake version: 3.26.5
Pip version: 21.2.3
Pip packages:
    fprime-tools==3.5.0
    fprime-gds==3.5.0
    fprime-fpp-*==2.2.0

How to Reproduce

  1. Call a disconnected port.
  2. Observe the resulting assert.

Expected Behavior

Assertions that can be triggered in a variety of different code paths should include arguments that identify the circumstance in which it occurred.

@celskeggs celskeggs added the bug label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant