[Ns-bugs] [Bug 1002] Segment fault in Ipv4L3Protocol::Send() if no route to host
code at nsnam.ece.gatech.edu
Wed Oct 6 13:28:24 PDT 2010
--- Comment #2 from Bill Roome <wdr at bell-labs.com> 2010-10-06 16:28:24 EDT ---
I don't have a simple test case, but here's some additional info. The problem
happened when I closed the TCP socket. Thanks to a few print statements, I
discovered that something called the Ipv3L3Protocol object's DoDispose() method
before I called the socket's Close() method. And DoDispose() sets m_node to 0,
so Send() croaked.
Then I realized I'd been calling Close() from my app's DoDispose() method, so I
moved the Close() to my app's StopApplication(). When I did that, the
simulation terminated cleanly, without crashing.
So I guess this is "pilot error." But I think it's a pretty subtle one, and it
wasn't a problem in 3.7 and earlier. I'll let y'all decide if it's worth
checking for this kind of error. Or maybe you could just spell out the rules
about what to do in StopApplication() vs DoDispose().
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Ns-bugs