SIGSEGV error without a solution as yet

153 views
Skip to first unread message

André Gama

unread,
Jul 27, 2013, 5:49:35 PM7/27/13
to ns-3-...@googlegroups.com
I worked for a long time to fix this error code, but it still fails. Can anyone help me with this? I already checked the wiki, but without success.


Errors:

Starting program: /home/andre/repos/ns-3-
allinone/ns-3-dev/build/scratch/pm-ex21r 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0225845c in std::vector<ns3::Ptr<ns3::Application>, std::allocator<ns3::Ptr<ns3::Application> > >::size (this=0x28)
    at /usr/include/c++/4.6/bits/stl_vector.h:571
571          { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }

Can you help me? 

Thank you all.

Regards,

---
André

Konstantinos

unread,
Jul 27, 2013, 6:31:57 PM7/27/13
to ns-3-...@googlegroups.com
Hi Andre,

From the wiki page I answered you before, you could get information why you receive this error. Or you can look at the GDB tutorial online to get more info about using it.

So after you run the program in the debug mode, and you get the error, you run the command "backtrace" (or "bt" is the same) to see where this problem originated. For example:

0x000000010409c714 in std::vector<ns3::Ptr<ns3::Application>, std::allocator<ns3::Ptr<ns3::Application> > >::size (this=0x40) at stl_vector.h:400
400      { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }
(gdb) bt
#0  0x000000010409c714 in std::vector<ns3::Ptr<ns3::Application>, std::allocator<ns3::Ptr<ns3::Application> > >::size (this=0x40) at stl_vector.h:400
#1  0x0000000103f3dcf1 in ns3::Node::AddApplication (this=0x0, application=@0x7fff5fbfd4a0) at node.cc:144
#2  0x000000010211021b in ns3::OnOffHelper::InstallPriv (this=0x7fff5fbfd758, node=@0x7fff5fbfd520) at on-off-helper.cc:74
#3  0x00000001021106c9 in ns3::OnOffHelper::Install (this=0x7fff5fbfd758, node=@0x7fff5fbfe828) at on-off-helper.cc:48
#4  0x0000000100009db9 in main (argc=2, argv=0x7fff5fbffa20) at andre.cc:197

So if you go to line 197 in your code (at least the copy I made) you will see where it all starts. It's a problem with the install of an application.
You have 5 wifi nodes (  uint32_t nWifi = 5; ) and you install the application on the node 8th ( ApplicationContainer apps = onoff.Install(wifiStaNodes.Get(7)); ) 

Regards,
K.

André

unread,
Jul 27, 2013, 6:55:21 PM7/27/13
to ns-3-...@googlegroups.com
Hi.

Thank you, Konstantinos.

I'll check this and then report the result. Thank you very much.

Regards.

André


2013/7/27 Konstantinos <dinos.k...@gmail.com>
--
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/S2phd-WTGrs/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/groups/opt_out.
 
 



--

André
"The things that you don´t wish for yourself, don´t wish them for others"
Reply all
Reply to author
Forward
0 new messages