Reading symbols from /root/桌面/ndnsim2/ns-3-dev-ndnSIM-ns-3.35/build/scratch/sumo-ndn-SegSub...
(gdb) r
Starting program: /root/桌面/ndnsim2/ns-3-dev-ndnSIM-ns-3.35/build/scratch/sumo-ndn-SegSub
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00005555555912a9 in ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter>::Ref (this=0x3ff0000000000000) at ./ns3/simple-ref-count.h:107
107 NS_ASSERT (m_count < std::numeric_limits::max ());
(gdb) bt
0 0x00005555555912a9 in ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter>::Ref (
this=0x3ff0000000000000) at ./ns3/simple-ref-count.h:107
1 0x000055555559107d in ns3::Ptr::Acquire (this=0x7fffffffab38) at ./ns3/ptr.h:579
2 0x000055555558f507 in ns3::Ptr::Ptr (this=0x7fffffffab38, o=...) at ./ns3/ptr.h:609
3 0x00007ffff2975311 in ns3::NodeContainer::Get (this=0x7fffffffdab0, i=2) at ../src/network/helper/node-container.cc:128
4 0x000055555557c069 in ns3::updateMobilityInfo (CurrentConsumerHelper=..., nodes=..., k=2)
at ../scratch/sumo-ndn-SegSub.cc:55
5 0x0000555555581487 in ns3::main (argc=1, argv=0x7fffffffe5c8) at ../scratch/sumo-ndn-SegSub.cc:375
6 0x0000555555584c70 in main (argc=1, argv=0x7fffffffe5c8) at ../scratch/sumo-ndn-SegSub.cc:455
(gdb)
sumo-ndn-SegSub.cc
line 53,函数缺少static,且nodes.Get(k)越界。
Reading symbols from /root/桌面/ndnsim2/ns-3-dev-ndnSIM-ns-3.35/build/scratch/sumo-ndn-SegSub... (gdb) r Starting program: /root/桌面/ndnsim2/ns-3-dev-ndnSIM-ns-3.35/build/scratch/sumo-ndn-SegSub [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault. 0x00005555555912a9 in ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter>::Ref (this=0x3ff0000000000000) at ./ns3/simple-ref-count.h:107 107 NS_ASSERT (m_count < std::numeric_limits::max ());
(gdb) bt
0 0x00005555555912a9 in ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter>::Ref (
1 0x000055555559107d in ns3::Ptr::Acquire (this=0x7fffffffab38) at ./ns3/ptr.h:579
2 0x000055555558f507 in ns3::Ptr::Ptr (this=0x7fffffffab38, o=...) at ./ns3/ptr.h:609
3 0x00007ffff2975311 in ns3::NodeContainer::Get (this=0x7fffffffdab0, i=2) at ../src/network/helper/node-container.cc:128
4 0x000055555557c069 in ns3::updateMobilityInfo (CurrentConsumerHelper=..., nodes=..., k=2)
5 0x0000555555581487 in ns3::main (argc=1, argv=0x7fffffffe5c8) at ../scratch/sumo-ndn-SegSub.cc:375
6 0x0000555555584c70 in main (argc=1, argv=0x7fffffffe5c8) at ../scratch/sumo-ndn-SegSub.cc:455
(gdb)
sumo-ndn-SegSub.cc line 53,函数缺少static,且nodes.Get(k)越界。