ChannelControl Module Error

92 views
Skip to first unread message

Francisco Estevez

unread,
Jun 8, 2015, 3:30:21 AM6/8/15
to omn...@googlegroups.com
Hi to everybody, 

I am trying to run omnet via terminal in order to develop automatic simulations, but i can not. When i use the IDE, everything works fine but via terminal i always receive the same message "<!> Error in module (cCompoundModule) DarpTestNet (id=1) during network setup: Class "ChannelControl" not found -- perhaps its code was not linked in, or the class wasn't registered with Register_Class(), or in the case of modules and channels, with Define_Module()/Define_Channel()"

I was looking for a solution and most of them are focused on the omnetpp version. I am using omnetpp-4.4.1 with inetmanet-2.0 under Xubuntu 14.04-64 bits. I am using an omnetpp.ini file with only the general configuration. 

The debugger gives me the following trace: 
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
You should now probably be running the simulation under gdb or another
debugger. The simulation kernel will now raise a SIGABRT signal which will
get you into the debugger. If you are not running under a debugger, you can
still use the core dump for post-mortem debugging. Once in the debugger,
view the call stack (in gdb: "bt" command) to see the context of the
runtime error.

<!> Error in module (cCompoundModule) DarpTestNet (id=1) during network setup: Class "ChannelControl" not found -- perhaps its code was not linked in, or the class wasn't registered with Register_Class(), or in the case of modules and channels, with Define_Module()/Define_Channel().

TRAPPING on the exception above, due to a debug-on-errors=true configuration option. Is your debugger ready?

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff6f8d482 in cRuntimeError::breakIntoDebuggerIfRequested (this=0x18741f0) at cexception.cc:296
296             DEBUG_TRAP;
(gdb) bt
#0  0x00007ffff6f8d482 in cRuntimeError::breakIntoDebuggerIfRequested (this=0x18741f0) at cexception.cc:296
#1  0x00007ffff6f8d16a in cRuntimeError::cRuntimeError (this=0x18741f0, 
    msgformat=0x7ffff705a098 "Class \"%s\" not found -- perhaps its code was not linked in, or the class wasn't registered with Register_Class(), or in the case of modules and channels, with Define_Module()/Define_Channel()") at cexception.cc:242
#2  0x00007ffff6f62126 in cObjectFactory::get (classname=0x1847c28 "ChannelControl") at cobjectfactory.cc:55
#3  0x00007ffff6f6221e in cObjectFactory::createOne (classname=0x1847c28 "ChannelControl") at cobjectfactory.cc:68
#4  0x00007ffff6f71471 in cModuleType::instantiateModuleClass (this=0x18490a0, classname=0x1847c28 "ChannelControl") at ccomponenttype.cc:359
#5  0x00007ffff703aa02 in cDynamicModuleType::createModuleObject (this=0x18490a0) at netbuilder/cdynamicmoduletype.cc:69
#6  0x00007ffff6f71169 in cModuleType::create (this=0x18490a0, modname=0xe2db08 "channelControl", parentmod=0x186b720, vectorsize=-1, index=0) at ccomponenttype.cc:298
#7  0x00007ffff6f70fdb in cModuleType::create (this=0x18490a0, modname=0xe2db08 "channelControl", parentmod=0x186b720) at ccomponenttype.cc:270
#8  0x00007ffff703efde in cNEDNetworkBuilder::addSubmodule (this=0x7fffffffd360, modp=0x186b720, submod=0xe2d9d0) at netbuilder/cnednetworkbuilder.cc:792
#9  0x00007ffff703d272 in cNEDNetworkBuilder::addSubmodulesAndConnections (this=0x7fffffffd360, modp=0x186b720) at netbuilder/cnednetworkbuilder.cc:496
#10 0x00007ffff703d20f in cNEDNetworkBuilder::buildRecursively (this=0x7fffffffd360, modp=0x186b720, decl=0x17f16f0) at netbuilder/cnednetworkbuilder.cc:488
#11 0x00007ffff703d076 in cNEDNetworkBuilder::buildInside (this=0x7fffffffd360, modp=0x186b720, decl=0x17f16f0) at netbuilder/cnednetworkbuilder.cc:461
#12 0x00007ffff703ab81 in cDynamicModuleType::buildInside (this=0x17f18e0, module=0x186b720) at netbuilder/cdynamicmoduletype.cc:87
#13 0x00007ffff6f79e31 in cCompoundModule::doBuildInside (this=0x186b720) at ccompoundmodule.cc:50
#14 0x00007ffff6fa92d8 in cModule::buildInside (this=0x186b720) at cmodule.cc:1161
#15 0x00007ffff6fccd9e in cSimulation::setupNetwork (this=0x6663b0, network=0x17f18e0) at csimulation.cc:351
#16 0x00007ffff783bee4 in EnvirBase::setupNetwork (this=0x666100, network=0x17f18e0) at envirbase.cc:839
#17 0x00007ffff7300efb in Cmdenv::run (this=0x666100) at cmdenv.cc:262
#18 0x00007ffff78380e5 in EnvirBase::run (this=0x666100, argc=5, argv=0x7fffffffdb08, configobject=0x634790) at envirbase.cc:261
#19 0x00007ffff78352c0 in setupUserInterface (argc=5, argv=0x7fffffffdb08) at startup.cc:239
#20 0x00007ffff783625f in evMain (argc=5, argv=0x7fffffffdb08) at evmain.cc:38
#21 0x0000000000401c2d in main (argc=5, argv=0x7fffffffdb08) at opp_run.cc:294

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Any help would be very appreciated.

Thanks in advance,
Fran

Alfonso Ariza Quintana

unread,
Jun 8, 2015, 4:06:42 AM6/8/15
to omn...@googlegroups.com

There are two possibilities, the “run” that launch the simulation is incorrect or the run_inet file is incorrect.

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

Francisco Estevez

unread,
Jun 8, 2015, 5:09:31 AM6/8/15
to omn...@googlegroups.com, aari...@hotmail.com
Thank you Alfonso,

I don't know exactly how to fix the run_inet. If i take a look on the "run" file in my folder i can see this content:

-----------------------------------------------------------------------------
#!/bin/sh
../../../src/run_inet $*
-----------------------------------------------------------------------------

In run_inet this is the content:

-----------------------------------------------------------------------------
#! /bin/sh
DIR=`dirname $0`

if [ -x $DIR/inet -o -x $DIR/inet.exe ]; then
  $DIR/inet -n $DIR/../examples:$DIR $*
else
  opp_run -l $DIR/inet -n $DIR/../examples:$DIR $*
fi

-----------------------------------------------------------------------------

Any suggestion?

Best regards,
Fran

Alfonso Ariza Quintana

unread,
Jun 8, 2015, 5:19:49 AM6/8/15
to omn...@googlegroups.com

The “run” is erroneous

 

It should be

../../../src/run_inet -n .:../../src $*

Francisco Estevez

unread,
Jun 8, 2015, 5:28:57 AM6/8/15
to omn...@googlegroups.com, aari...@hotmail.com
I recompiled everything and modified my "run" too, but i have the same error, the debugger shows that:

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
You should now probably be running the simulation under gdb or another
debugger. The simulation kernel will now raise a SIGABRT signal which will
get you into the debugger. If you are not running under a debugger, you can
still use the core dump for post-mortem debugging. Once in the debugger,
view the call stack (in gdb: "bt" command) to see the context of the
runtime error.

<!> Error in module (cCompoundModule) DarpTestNet (id=1) during network setup: Class "ChannelControl" not found -- perhaps its code was not linked in, or the class wasn't registered with Register_Class(), or in the case of modules and channels, with Define_Module()/Define_Channel().

TRAPPING on the exception above, due to a debug-on-errors=true configuration option. Is your debugger ready?

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff6f8d482 in cRuntimeError::breakIntoDebuggerIfRequested (this=0x3385370) at cexception.cc:296
296             DEBUG_TRAP;
(gdb) bt
#0  0x00007ffff6f8d482 in cRuntimeError::breakIntoDebuggerIfRequested (this=0x3385370) at cexception.cc:296
#1  0x00007ffff6f8d16a in cRuntimeError::cRuntimeError (this=0x3385370, 
    msgformat=0x7ffff705a098 "Class \"%s\" not found -- perhaps its code was not linked in, or the class wasn't registered with Register_Class(), or in the case of modules and channels, with Define_Module()/Define_Channel()") at cexception.cc:242
#2  0x00007ffff6f62126 in cObjectFactory::get (classname=0x1848568 "ChannelControl") at cobjectfactory.cc:55
#3  0x00007ffff6f6221e in cObjectFactory::createOne (classname=0x1848568 "ChannelControl") at cobjectfactory.cc:68
#4  0x00007ffff6f71471 in cModuleType::instantiateModuleClass (this=0x18499e0, classname=0x1848568 "ChannelControl") at ccomponenttype.cc:359
#5  0x00007ffff703aa02 in cDynamicModuleType::createModuleObject (this=0x18499e0) at netbuilder/cdynamicmoduletype.cc:69
#6  0x00007ffff6f71169 in cModuleType::create (this=0x18499e0, modname=0xe2dac8 "channelControl", parentmod=0x2bc0e20, vectorsize=-1, index=0) at ccomponenttype.cc:298
#7  0x00007ffff6f70fdb in cModuleType::create (this=0x18499e0, modname=0xe2dac8 "channelControl", parentmod=0x2bc0e20) at ccomponenttype.cc:270
#8  0x00007ffff703efde in cNEDNetworkBuilder::addSubmodule (this=0x7fffffffd0c0, modp=0x2bc0e20, submod=0xe2d990) at netbuilder/cnednetworkbuilder.cc:792
#9  0x00007ffff703d272 in cNEDNetworkBuilder::addSubmodulesAndConnections (this=0x7fffffffd0c0, modp=0x2bc0e20) at netbuilder/cnednetworkbuilder.cc:496
#10 0x00007ffff703d20f in cNEDNetworkBuilder::buildRecursively (this=0x7fffffffd0c0, modp=0x2bc0e20, decl=0x17f1f20) at netbuilder/cnednetworkbuilder.cc:488
#11 0x00007ffff703d076 in cNEDNetworkBuilder::buildInside (this=0x7fffffffd0c0, modp=0x2bc0e20, decl=0x17f1f20) at netbuilder/cnednetworkbuilder.cc:461
#12 0x00007ffff703ab81 in cDynamicModuleType::buildInside (this=0x17f2110, module=0x2bc0e20) at netbuilder/cdynamicmoduletype.cc:87
#13 0x00007ffff6f79e31 in cCompoundModule::doBuildInside (this=0x2bc0e20) at ccompoundmodule.cc:50
#14 0x00007ffff6fa92d8 in cModule::buildInside (this=0x2bc0e20) at cmodule.cc:1161
#15 0x00007ffff6fccd9e in cSimulation::setupNetwork (this=0x665c80, network=0x17f2110) at csimulation.cc:351
#16 0x00007ffff783bee4 in EnvirBase::setupNetwork (this=0x665f70, network=0x17f2110) at envirbase.cc:839
#17 0x00007ffff7b143e0 in Tkenv::newRun (this=0x665f70, configname=0x3380e90 "General", runnumber=0) at tkenv.cc:785
#18 0x00007ffff7b209f9 in newRun_cmd (interp=0x1876a10, argc=3, argv=0x18845f0) at tkcmd.cc:329
#19 0x00007ffff50c9070 in TclInvokeStringCommand () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so
#20 0x00007ffff50cb337 in TclNRRunCallbacks () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so
#21 0x00007ffff50cc30f in ?? () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so
#22 0x00007ffff50cb906 in Tcl_EvalEx () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so
#23 0x00007ffff50cca65 in Tcl_Eval () from /usr/lib/x86_64-linux-gnu/libtcl8.6.so
#24 0x00007ffff7b12711 in Tkenv::run (this=0x665f70) at tkenv.cc:278
#25 0x00007ffff78380e5 in EnvirBase::run (this=0x665f70, argc=1, argv=0x7fffffffdb48, configobject=0x634650) at envirbase.cc:261
#26 0x00007ffff78352c0 in setupUserInterface (argc=1, argv=0x7fffffffdb48) at startup.cc:239
#27 0x00007ffff783625f in evMain (argc=1, argv=0x7fffffffdb48) at evmain.cc:38
#28 0x0000000000401c2d in main (argc=1, argv=0x7fffffffdb48) at opp_run.cc:294

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks in advance.
Best regards,
Francisco

Francisco Estevez

unread,
Jun 8, 2015, 5:38:31 AM6/8/15
to omn...@googlegroups.com, aari...@hotmail.com
If i run the debugger with args (gdb --args opp_run -l ../../../src -n ../../../src:../..)

I received this error:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
OMNeT++ Discrete Event Simulation  (C) 1992-2013 Andras Varga, OpenSim Ltd.
Version: 4.4.1, build: 140307-1086eab, edition: Academic Public License -- NOT FOR COMMERCIAL USE
See the license for distribution terms and warranty disclaimer

<!> Error during startup: Cannot load library '../../..//libsrc.so': ../../..//libsrc.so: cannot open shared object file: No such file or directory.

End.
[Inferior 1 (process 27753) exited with code 01]
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Best Regards,

Alfonso Ariza Quintana

unread,
Jun 8, 2015, 5:47:26 AM6/8/15
to omn...@googlegroups.com

If i run the debugger with args (gdb --args opp_run -l ../../../src -n ../../../src:../..)

The option –l is the library

-l ../../../src tries to load the library libsrc.so

The library in inet is libinet.so, it should be

-l ../../../src/inet

 

 

De: omn...@googlegroups.com [mailto:omn...@googlegroups.com] En nombre de Francisco Estevez
Enviado el: lunes, 08 de junio de 2015 11:39
Para: omn...@googlegroups.com
CC: aari...@hotmail.com
Asunto: Re: [Omnetpp-l] ChannelControl Module Error

 

If i run the debugger with args (gdb --args opp_run -l ../../../src -n ../../../src:../..)

--

Francisco Estevez

unread,
Jun 8, 2015, 5:55:46 AM6/8/15
to omn...@googlegroups.com, aari...@hotmail.com
It is working now, thank you very much Alfonso.

Where can i find all the possible arguments for the opp_run, for example to modify the simulation speed.

Thanks in advance,
Francisco 

Alfonso Ariza Quintana

unread,
Jun 8, 2015, 6:23:33 AM6/8/15
to omn...@googlegroups.com

By default, if you send the simulation with cmdm the simulation is executed in express, if you want to increase the speed you need to compile all in release mode.

Reply all
Reply to author
Forward
0 new messages