NetAnim Assert failed

948 views
Skip to first unread message

EdgeOfSanity

unread,
Jul 18, 2012, 7:18:47 PM7/18/12
to ns-3-...@googlegroups.com
hi,

I'm using ns-3.14.1 My model consists of 300 nodes in dumbbell topology (created with dumbbel helper) and each dumbbell node is attached to 10 CSMA or WIFI nodes (incase wifi the dumbbell node acts as an AP). For the dumbbell I set a bounding using DumbbellHelper::BoundingBox, for the csma/wifi nodes I manually set their location using AnimationHelper::SetPosition . Before starting the simulation, I make the following two calls:
  AnimationInterface anim ("p2p.xml");
  anim.EnablePacketMetadata (true);

However, when I run I get the error:
assert failed. cond="uid != 0", msg="Assert in TypeId::LookupByName: ns3::WimaxNetDevice not found", file=../src/core/model/type-id.cc, line=388

My model has no relation with wimax, yet it is somehow included? Any help in correcting is appreciated.
Message has been deleted

John Abraham

unread,
Jul 18, 2012, 8:02:47 PM7/18/12
to ns-3-...@googlegroups.com
Well the "netanim" module carries the  Wimax module automatically.
Can you post the wscript file where you placed the filename of your code your running?
Did you mean you used AnimationInterface::SetConstantPosition?

On Wed, Jul 18, 2012 at 4:20 PM, EdgeOfSanity <cir...@gmail.com> wrote:
Note that the same program runs without errors when I remove all the references to netanim-module.
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/i_IMYV3hR8IJ.

To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.

Hassan

unread,
Nov 6, 2012, 5:08:46 PM11/6/12
to ns-3-...@googlegroups.com
I am having the same assertion fail:

assert failed. cond="uid != 0", msg="Assert in TypeId::LookupByName: ns3::WimaxNetDevice not found", file=../src/core/model/type-id.cc, line=388

The problem is not limited to my own code. Even following the netanim tutorial and running the examples in netanim/examples results in the same assertion fail. Any suggestion would be greatly appreciated.

Thanks.

John Abraham

unread,
Nov 6, 2012, 5:43:22 PM11/6/12
to ns-3-...@googlegroups.com
1. so which version of ns-3 is this?
2. also what does gdb give?
./waf --run "dumbbell-animation" --command-template="gdb --args %s
(gdb) run
(gdb) bt



To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/UcDoDTas9XcJ.

John Abraham

unread,
Nov 6, 2012, 5:55:12 PM11/6/12
to ns-3-...@googlegroups.com
looks similar to the problem in the thread below


The solution in that case seemed to be something adding the below in your example file.

#include "ns3/wimax-module.h"
to the includes and
  {WimaxNetDevice w;}

But we haven't seen this problem for a few releases now, until today.

Hassan

unread,
Nov 6, 2012, 7:31:16 PM11/6/12
to ns-3-...@googlegroups.com
Thanks John for your reply.

I am using ns-3.15 on cygwin. Running the debugger I get:

(gdb) bt
#0  0x00000000 in ?? ()
#1  0x77e4f8c1 in ntdll!RtlUpdateClonedSRWLock () from /cygdrive/c/Windows/system32/ntdll.dll
#2  0x77530816 in WaitForSingleObjectEx () from /cygdrive/c/Windows/syswow64/KERNELBASE.dll
#3  0x00000110 in ?? ()
#4  0x75a61194 in KERNEL32!GetPrivateProfileStructA () from /cygdrive/c/Windows/syswow64/kernel32.dll
#5  0x00000110 in ?? ()
#6  0x75a61148 in KERNEL32!GetPrivateProfileStructA () from /cygdrive/c/Windows/syswow64/kernel32.dll
#7  0x00000110 in ?? ()
#8  0x610dc559 in sig_send(_pinfo*, siginfo_t&, _cygtls*) () from /usr/bin/cygwin1.dll
#9  0x610d9913 in _pinfo::kill(siginfo_t&) () from /usr/bin/cygwin1.dll
#10 0x610d9dee in kill0(int, siginfo_t&) () from /usr/bin/cygwin1.dll
#11 0x610d9f40 in kill () from /usr/bin/cygwin1.dll
#12 0x610d9f6c in raise () from /usr/bin/cygwin1.dll
#13 0x610da233 in abort () from /usr/bin/cygwin1.dll
#14 0x5abce945 in cygstdc++-6!_ZN9__gnu_cxx27__verbose_terminate_handlerEv () from /usr/bin/cygstdc++-6.dll
#15 0x5abc8e49 in cygstdc++-6!_ZN10__cxxabiv111__terminateEPFvvE () from /usr/bin/cygstdc++-6.dll
#16 0x5ac1df53 in cygstdc++-6!_ZSt9terminatev () from /usr/bin/cygstdc++-6.dll
#17 0x6fc4f4b7 in _fu123___ZSt4cerr () at ../src/core/model/type-id.cc:388
#18 0x6fc722bd in _fu786___ZSt4clog () at ../src/core/model/config.cc:365
#19 0x6fc737ac in _fu239___ZSt4cerr () at ../src/core/model/config.cc:456
#20 0x6fc72dce in _fu810___ZSt4clog () at ../src/core/model/config.cc:419
#21 0x6fc737ac in _fu239___ZSt4cerr () at ../src/core/model/config.cc:456
#22 0x6fc72dce in _fu810___ZSt4clog () at ../src/core/model/config.cc:419
#23 0x6fc7167d in ns3::Resolver::Resolve (this=0x289ff8, root=...) at ../src/core/model/config.cc:266
#24 0x6fc746fa in _fu837___ZSt4clog () at ../src/core/model/config.cc:555
#25 0x6fc74159 in ns3::ConfigImpl::Connect (this=0x6fcb5180, path=..., cb=...) at ../src/core/model/config.cc:524
#26 0x6fc75014 in ns3::Config::Connect (path=..., cb=...) at ../src/core/model/config.cc:680
#27 0x68b8551a in ns3::AnimationInterface::ConnectCallbacks (this=0x28a5f8) at ../src/netanim/model/animation-interface.cc:574
#28 0x68b84077 in _fu184___ZSt4clog () at ../src/netanim/model/animation-interface.cc:488
#29 0x68b81285 in ns3::AnimationInterface::AnimationInterface (this=0x28a5f8, fn=..., maxPktsPerFile=100000, usingXML=true)
    at ../src/netanim/model/animation-interface.cc:74
#30 0x0040214c in main (argc=1, argv=0x28ac10) at ../src/netanim/examples/dumbbell-animation.cc:96

Adding the wimax-module.h to the includes doesn't fix the problem. When adding {WimaxNetDevic w;} I get the following:

../scratch/second.v2.cc: In function ‘int main(int, char**)’:
../scratch/second.v2.cc:48:18: error: cannot declare variable ‘w’ to be of abstract type ‘ns3::WimaxNetDevice’
./ns3/wimax-net-device.h:70:1: note:   because the following virtual functions are pure within ‘ns3::WimaxNetDevice’:
./ns3/wimax-net-device.h:178:16: note:  virtual void ns3::WimaxNetDevice::Start()
./ns3/wimax-net-device.h:179:16: note:  virtual void ns3::WimaxNetDevice::Stop()
./ns3/wimax-net-device.h:185:16: note:  virtual bool ns3::WimaxNetDevice::Enqueue(ns3::Ptr<ns3::Packet>, const ns3::MacHeaderType&, ns3::Ptr<ns3::WimaxConnection>)
./ns3/wimax-net-device.h:241:16: note:  virtual bool ns3::WimaxNetDevice::DoSend(ns3::Ptr<ns3::Packet>, const ns3::Mac48Address&, const ns3::Mac48Address&, uint16_t)
./ns3/wimax-net-device.h:245:16: note:  virtual void ns3::WimaxNetDevice::DoReceive(ns3::Ptr<ns3::Packet>)

Thanks again for your help. 

John Abraham

unread,
Nov 6, 2012, 7:40:22 PM11/6/12
to ns-3-...@googlegroups.com
can you try
1. #include "ns3/wimax-module.h"


using namespace ns3;
BaseStationNetDevice b;
SubscriberStationNetDevice s;

int main (int argc, char *argv[])


2. Or you could comment out the lines
  Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WimaxNetDevice/Tx",
                   MakeCallback (&AnimationInterface::WimaxTxTrace, this));
  Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WimaxNetDevice/Rx",
                   MakeCallback (&AnimationInterface::WimaxRxTrace, this));

in src/netanim/model/animation-interface.cc



To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/7YutK6tsFfgJ.

Hassan

unread,
Nov 6, 2012, 7:44:24 PM11/6/12
to ns-3-...@googlegroups.com
Ok. Trying your first suggestion gives me a:

assert failed. cond="uid != 0", msg="Assert in TypeId::LookupByName: ns3::CsmaNetDevice not found", file=../src/core/model/type-id.cc, line=388

Hassan Sinky

unread,
Nov 6, 2012, 7:59:29 PM11/6/12
to ns-3-...@googlegroups.com
Thanks John for your help.

It appears your first suggestion worked however I would be getting different errors depending on the netdevice. So to fix this:

#include "ns3/wimax-module.h"
#include "ns3/csma-module.h"
#include "ns3/uan-module.h"

using namespace ns3;
BaseStationNetDevice b;
SubscriberStationNetDevice s;
CsmaNetDevice c;
UanNetDevice u;

int main



To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/xI0ShphCa-8J.

John Abraham

unread,
Nov 6, 2012, 8:00:24 PM11/6/12
to ns-3-...@googlegroups.com
looks like the wimax issue got solved and now the Csma netdevices are being searched.
The environment apparently has problems with NS_OBJECT_ENSURE_REGISTERED. Which means you might occasionally have problems in other components too even if you don't use NetAnim.
From my perspective you may not get too far with this situation. I can only recommend using ubuntu if using NetAnim.


On Tue, Nov 6, 2012 at 4:44 PM, Hassan <sin...@gmail.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/xI0ShphCa-8J.

Hassan

unread,
Nov 6, 2012, 8:23:33 PM11/6/12
to ns-3-...@googlegroups.com
Another issue coming up. Compiling NetAnim I get:
$ cd netanim
$ qmake-qt4 NetAnim.pro
$ make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/cygwin-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I. -o mobilitymanager.o animator/mobilitymanager.cpp
In file included from animator/mobilitymanager.cpp:20:0:
animator/mobilitymanager.h:29:24: fatal error: QTableWidget: No such file or directory
compilation terminated.
Makefile:286: recipe for target `mobilitymanager.o' failed
make: *** [mobilitymanager.o] Error 1

Suggestions?

John Abraham

unread,
Nov 6, 2012, 10:23:09 PM11/6/12
to ns-3-...@googlegroups.com
well, I don't know about the cygwin environment, but NetAnim can be built under native windows (using minGW or Visual studio 2010. I think there is a a free version of visual studio 2010 express).
However you need to use QtCreator to open "NetAnim.pro" and click build.
 
QtCreator and Qt libraries for windows (non-cygwin) can be found under
 


 
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/FBnPrUzE2ggJ.

costa

unread,
Aug 20, 2013, 1:42:01 PM8/20/13
to ns-3-...@googlegroups.com
Hi,

I tried but it is not possible.

I used Qtcreatot and compiler MGWIN and Qt version 4.8.5

The problem I got was

D:\Cygwin\home\costa\tarballs\NetAnim.tar\NetAnim\NetAnim\NetAnim.cc:7: 
error: sys/socket.h: No such file or directory

BR,
Costa

John Abraham

unread,
Aug 20, 2013, 1:44:30 PM8/20/13
to ns-3-...@googlegroups.com
sounds like you are using an old version,
please clone NetAnim again
hg clone http://code.nsnam.org/netanim


To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.

To post to this group, send email to ns-3-...@googlegroups.com.

joao costa

unread,
Aug 20, 2013, 5:43:48 PM8/20/13
to ns-3-...@googlegroups.com
Hi,

I did the clone and the problem is equal


D:\Cygwin\home\costa\tarballs\NetAnim.tar\NetAnim\NetAnim\NetAnim.cc:7: error: sys/socket.h: No such file or directory



BR,
Costa


2013/8/20 John Abraham <john.ab...@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/j3eg1cFx8Qo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.

John Abraham

unread,
Aug 20, 2013, 6:09:30 PM8/20/13
to ns-3-...@googlegroups.com
hi Costa,
there is no such file in NetAnim.
http://code.nsnam.org/netanim/file/3ff51fed9b57/main

You are using a very old version
-john

joao costa

unread,
Aug 20, 2013, 6:35:51 PM8/20/13
to ns-3-...@googlegroups.com
Hi Abraham,

After making the correct clone run the NetAnim.

Thanks for your help.
Reply all
Reply to author
Forward
0 new messages