assert failed. cond="m_mainAddress != Ipv4Address ()", file=../src/olsr/model/olsr-routing-protocol.cc, line=292 terminate called without an active exception

319 views
Skip to first unread message

Sabniveesu Shashank

unread,
Jul 21, 2014, 4:14:58 PM7/21/14
to ns-3-...@googlegroups.com
Hi!

I am new to NS3. I am implementing 'mobility' and 'OLSR' in a 200 node network. I modified first.cc and in the process, removed PointToPointHelper and everything that used it. (NetDeviceContainer, Ipv4Helper etc. too are removed)

If I receive the following error, what does it mean?

assert failed. cond="m_mainAddress != Ipv4Address ()", file=../src/olsr/model/olsr-routing-protocol.cc, line=292
terminate called without an active exception

Please respond

-- Shashank

Tommaso Pecorella

unread,
Jul 21, 2014, 5:28:54 PM7/21/14
to ns-3-...@googlegroups.com
Hi,

it means that you should read the tutorial (and perhaps also some networking books, I'd suggest this).
You just tried to use an IP routing protocol without giving any IP address to the nodes.  
Success probability: unlikely.

T.

Sabniveesu Shashank

unread,
Jul 21, 2014, 10:00:14 PM7/21/14
to ns-3-...@googlegroups.com
Haha! Thanks for the feedback. I'd go through books as suggested.

When the program started, it showed some address as "102.102.102.102 for node1" or the likes. How did that come up when I didn't assign any?

 
 
S.V.R.S.N. Shashank
 

We’ve created the greatest collection of shared knowledge in history. Help protect Wikipedia. Donate now: https://donate.wikimedia.org



--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/TQbnH-JvGdU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Sabniveesu Shashank

unread,
Jul 21, 2014, 10:06:37 PM7/21/14
to ns-3-...@googlegroups.com
I'm sorry for top-posting in my previous response.

Tommaso Pecorella

unread,
Jul 22, 2014, 2:48:42 AM7/22/14
to ns-3-...@googlegroups.com, shas...@linux.com


On Tuesday, July 22, 2014 4:00:14 AM UTC+2, Sabniveesu Shashank wrote:
Haha! Thanks for the feedback. I'd go through books as suggested.

When the program started, it showed some address as "102.102.102.102 for node1" or the likes. How did that come up when I didn't assign any?

Hi,

"102.102.102.102" is the default address (i.e., the one used for non-initialized addresses).
Any not initialized Ipv4Adress object will have this number.

Again, please complete the tutorials (and be sure to understand them).

T.

Sabniveesu Shashank

unread,
Jul 22, 2014, 1:13:44 PM7/22/14
to ns-3-...@googlegroups.com, shas...@linux.com


On Tuesday, 22 July 2014 02:48:42 UTC-4, Tommaso Pecorella wrote:


On Tuesday, July 22, 2014 4:00:14 AM UTC+2, Sabniveesu Shashank wrote:
Haha! Thanks for the feedback. I'd go through books as suggested.

When the program started, it showed some address as "102.102.102.102 for node1" or the likes. How did that come up when I didn't assign any?

Hi,

"102.102.102.102" is the default address (i.e., the one used for non-initialized addresses).
Any not initialized Ipv4Adress object will have this number.
Thanks, this answers my last question.

Again, please complete the tutorials (and be sure to understand them).
Sure, I'll be here again if I could not fix that Ipv4Address part, as you mentioned.

T.

Sabniveesu Shashank

unread,
Jul 22, 2014, 3:58:26 PM7/22/14
to ns-3-...@googlegroups.com, shas...@linux.com
Thanks T,

I solved my issue this way:

// Assigning IP addresses...                                                   
  Ipv4AddressHelper ip;
  ip.SetBase("192.168.1.0", "255.255.255.0", "0.0.0.1");
  ip.Assign(staDevice);                                                           // 'staDevice' os of type 'NetDeviceContainer'
Reply all
Reply to author
Forward
0 new messages