Error "uid<=m_information.size()&&uid!=0" in NS3-SUMO integration

845 views
Skip to first unread message

liangy...@126.com

unread,
Dec 18, 2016, 12:10:31 AM12/18/16
to ns-3-users
Hello groupers,

I want to integrate NS3 with SUMO with wifi used for VANETs simulation (the executed command was shown below). 

There was an error  "uid<=m_information.size()&&uid!=0, file type-id.cc, line 430" (see the figure below). 

I have checked the line 430 of file type-id.cc (see the figure below). I still can't solve this problem.


Could you please help me solve this problem? The codes is attached. Your help would be appreciated.

Best regards

Adil Alsuhaim

unread,
Dec 18, 2016, 5:06:00 AM12/18/16
to ns-3-users
It's better to simply copy the text from the console and paste it here instead of screenshots, because that makes it searchable. You can use click on the { } icon and paste code or console output.

You also want to use a debugger like gdb. You can do this:

  1. sudo apt-get install gdb
  2.  ./waf --run ProgramName --command-template"gdb --args %s"
  3. You're now in the debugger (gdb) run <arguments> in my case I tried:

    run --traceFile=src/mobility/examples/default.ns_movements --nodeNum=2 --duration=100.0 --logFile=ns2-mob.log

  4. then you can type "bt" to backtrack and see if the debugger points you to your error line.
It seems that you have a few issues. I usually initialize my wifi with default settings and then set the attributes I need. 

 YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default();

 wifiChannel.SetPropagationDelay("ns3::ConstantSpeedPropagationDelayModel");

 wifiChannel.AddPropagationLoss("ns3::FriisPropagationLossModel","MinLoss",DoubleValue(250));


YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();;

wifiPhy.SetChannel(wifiChannel.Create());


Also ,you have a potential problem with your TypeId, I'd do something like this to have a UDP socket, for example. 

  TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");


and for the target address, don't put the IP string, the IP string might be off. A more reliable way to do this is

  //InetSocketAddress remote=InetSocketAddress(("10.1.1.72"),Port);

  InetSocketAddress remote=InetSocketAddress( i.GetAddress(sink_index) ,Port);


I hope this help. 

You gave me a hint to how to determine the node's position! I'll need that for my own work and I was looking for it and missed this example in NS3.

liangy...@126.com

unread,
Dec 19, 2016, 6:31:09 PM12/19/16
to ns-3-users
Hello Adil,

Thank you very much! The problem is solved.

Best regards

在 2016年12月18日星期日 UTC+8下午6:06:00,Adil Alsuhaim写道:

S.M Paranaditha

unread,
Mar 22, 2019, 3:12:00 AM3/22/19
to ns-3-users
Hi liangy,
I face same problem here as you, here's the log :

'build' finished successfully (0.593s)
assert failed. cond="uid <= m_information.size () && uid != 0", file=../src/core/model/type-id.cc, line=430
terminate called without an active exception
Command ['/home/ubuntu16/IEEE-802.11ah-ns-3/build/scratch/mipv6-single'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").

I would like to know how you solve this problem.

Regards,
Paranaditha

Michał Piech

unread,
Mar 30, 2019, 4:29:54 PM3/30/19
to ns-3-users
Hi S.M.

I see that you use EEE-802.11ah-ns-3 module.
Did you by any chance use the RAW config interface for dynamic parameter tuning ?

Br,
Michał
Reply all
Reply to author
Forward
0 new messages