Bug 12

Summary: onoff-application can't wait to send first packet
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: coreAssignee: Tom Henderson <tomh>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P1    
Version: pre-release   
Hardware: All   
OS: All   

Description Tom Henderson 2007-03-30 18:14:26 UTC
Cannot undo the following in onoff-application.cc:

// Event handlers
void OnOffApplication::StartSending()
{ 
  m_startStopScheduled = true;
// commented out by tomh-- I think you want to start sending immediately
//  ScheduleNextTx();  // Schedule the send packet event
  SendPacket();
}     


causes run-time error


simple-p2p(1676) malloc: *** error for object 0x1602d90: incorrect 
checksum for freed object - object was probably modified after being 
freed, break at szone_error to debug
simple-p2p(1676) malloc: *** set a breakpoint in szone_error to debug

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000005
0x900070a8 in szone_free ()
(gdb) bt
#0  0x900070a8 in szone_free ()
#1  0x90007074 in szone_free ()
#2  0x003a1820 in ns3::SmartSet<ns3::Application*>::~SmartSet 
(this=0x1601c38) at build-dir/dbg-shared/include/ns3/smartset.h:51
#3  0x00379680 in ns3::ApplicationList::~ApplicationList 
(this=0x1601c30) at src/node/application-list.cc:43
#4  0x0036c540 in ns3::InternetNode::~InternetNode (this=0x1601c10) at 
src/node/internet-node.cc:83
#5  0x0039130c in ns3::SmartVector<ns3::Node*>::~SmartVector 
(this=0x3c78f0) at build-dir/dbg-shared/include/ns3/smartvector.h:50
#6  0x00369b30 in __tcf_2 () at src/node/node.cc:31
#7  0x00368d7c in cxa_atexit_wrapper ()
#8  0x90014edc in __cxa_finalize ()
#9  0x90014dc4 in exit ()
#10 0x00002ac4 in _start ()
#11 0x000027c4 in start ()
Comment 1 Tom Henderson 2007-06-19 19:37:36 UTC
Fixed by George