|
Bugzilla – Full Text Bug Listing |
| Summary: | Config::Connect should throw warnings when trace is not found | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Tommaso Pecorella <tommaso.pecorella> |
| Component: | core | Assignee: | Peter Barnes <pdbarnes> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | ns-bugs, tomh |
| Priority: | P3 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://www.nsnam.org/bugzilla/show_bug.cgi?id=2447 | ||
| Attachments: |
proposed patch
test program |
||
Created attachment 2947 [details]
test program
This patch logs unconditionally when a trace path doesn't exist. We also provide FailSafe versions of Config::Connect and Config::ConnectWithoutContext. These should be used when you can't be sure that a trace path exists in the current model. This resolves the warnings from AnimationInterface::ConnectCallbacks() Credit to "InquisitivePenguin (GCI 2019) <>" for diagnosing this issue, opening the way to a solution. Upstream merge request https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/201 merged on May 1, commit 5879700a |
Created attachment 2946 [details] proposed patch Well, this is a long-standing issue. Users misspell something and a trace is not fired. My solution: add a NS_LOG_UNCOND warning when the target is not found. The patch is attached, but... it fires too much. If one runs he examples (attached), the result is: No trace found for fancoil No trace found for TxRxPointToPoint No trace found for Tx No trace found for Rx No trace found for Tx No trace found for Rx No trace found for PhyTxBegin No trace found for PhyRxBegin No trace found for RemainingEnergy No trace found for Enqueue No trace found for Enqueue No trace found for Dequeue No trace found for Dequeue No trace found for Drop No trace found for Drop No trace found for PhyTxBegin No trace found for PhyRxBegin No trace found for MacTx No trace found for MacTxDrop No trace found for MacRx No trace found for MacRxDrop No trace found for PhyTxBegin No trace found for PhyRxBegin The first is my test - I called a non-existent thing. The others are artifacts, it seems that in our codebase WE are calling bogus stuff. What's the source? Mystery (to be solved).