help to solve debuger error

1,298 views
Skip to first unread message

Yacin Mhammed

unread,
Oct 8, 2023, 1:21:34 PM10/8/23
to ns-3-users
hi everyone,

i ran may program with (gdb), and i use different methods but the same error occur.
in this case i use (gdb) run --numSensors=10 --simulationTime=20 --sensorSpeed=2.0
this is the message of error :

Starting program: ~/ns-allinone-3.29/ns-3.29/build/scratch/sensor-network --numSensors=10 --simulationTime=20 --sensorSpeed=2.0
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
assert failed. cond="uid <= m_information.size () && uid != 0", file=../src/core/model/type-id.cc, line=458
terminate called without an active exception

Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737242314560) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.

Tom Henderson

unread,
Oct 8, 2023, 4:38:07 PM10/8/23
to ns-3-...@googlegroups.com, Yacin Mhammed
Have you searched the error string "uid <= m_information.size () && uid
!= 0" to see what types of problems trigger it?

I just did and found this past message, which should give you an idea of
something to look at:

https://groups.google.com/g/ns-3-users/c/Szd1PlvOMwo
> 44./nptl/pthread_kill.c: No such file or directory.
>
> --
> Posting to this group should follow these guidelines
> https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
> <https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting>
> ---
> You received this message because you are subscribed to the Google
> Groups "ns-3-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ns-3-users+...@googlegroups.com
> <mailto:ns-3-users+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ns-3-users/c748d968-c0f3-4679-bb6f-78745e1c1a9fn%40googlegroups.com <https://groups.google.com/d/msgid/ns-3-users/c748d968-c0f3-4679-bb6f-78745e1c1a9fn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Yacin Mhammed

unread,
Oct 9, 2023, 4:36:32 AM10/9/23
to ns-3-users

I'm trying to compile my code with this command:
g++ -g -o sensor-network sensor-network.cc to find details.and displays the following message:
     fatal error: ns3/core-module.h: No such file or directory
        4 | #include "ns3/core-module.h"
          | ^~~~~~~~~~~~~~~~~~~
compilation finished.
knowing that I compile other programs in ./examples and they worked correctly
i don't understand why  own code not working

Yacin Mhammed

unread,
Oct 9, 2023, 6:00:02 AM10/9/23
to ns-3-...@googlegroups.com
The error occurs with another program like :
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Failed to get Ipv4 object from sink node.
Failed to get Ipv4 object from sink node.
Failed to get Ipv4 object from sink node.
Failed to get Ipv4 object from sink node.
Failed to get Ipv4 object from sink node.
Failed to get Ipv4 object from sink node.
Failed to get Ipv4 object from sink node.
Failed to get Ipv4 object from sink node.
Failed to get Ipv4 object from sink node.
Failed to get Ipv4 object from sink node.
assert failed. cond="socketFactory != 0", +0.000000000s -1 file=../src/network/model/socket.cc, line=77

terminate called without an active exception

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.

To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/563c00cb-25d0-45fe-84bf-ab6a7df7ae96n%40googlegroups.com.

Gabriel Ferreira

unread,
Oct 9, 2023, 3:32:15 PM10/9/23
to ns-3-users
This is not the correct line to compile and link your program. You would need at least -I/path/to/ns-3-dev/build/include -L/path/to/ns-3-dev/build/lib -lns3-dev-core (and other modules you use).
Reply all
Reply to author
Forward
0 new messages