Bug 814 - Function logging causing assert in wireless examples
Function logging causing assert in wireless examples
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wifi
ns-3-dev
All All
: P5 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-13 14:57 EST by Josh Pelkey
Modified: 2010-02-18 14:55 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Pelkey 2010-02-13 14:57:21 EST
Try export 'NS_LOG=*=function|prefix_func|prefix_time'. Then try to run  examples/wireless/wifi-simple-adhoc.  I am getting an assert.  I tried this on a few other examples outside of the wireless directory, and it seemed to run fine.  I also tried other logging levels on the wireless examples (info, debug, warn) but these ran fine.
Comment 1 Josh Pelkey 2010-02-18 14:07:51 EST
I've tracked this down to a recent change in dca-txop.cc, http://code.nsnam.org/ns-3-dev/diff/dba5c9b69c3b/src/devices/wifi/dca-txop.cc

Specifically, the issue is with #define NS_LOG_APPEND_CONTEXT std::clog << "[mac=" << m_low->GetAddress () << "] ";  That m_low looks to be null at some point and is causing a seg. fault.  I'm not 100% sure what is trying to be accomplished, so I can't really make a patch.  I've CC'd the author of the change though, so that hopefully this bug can be resolved.
Comment 2 Mirko Banchi 2010-02-18 14:26:00 EST
Thank you very much Josh!I'll try to fix it very soon.
Comment 3 Mirko Banchi 2010-02-18 14:43:10 EST
I have made a new changeset for this bug in ns-3-dev. Now all should run fine. Let me know Josh. Thank you again.