OMNeT++/OMNEST Bug Tracker - OMNeT++ | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0000191 | OMNeT++ | command line tools | public | 2010-07-26 11:27 | 2016-06-06 08:47 | |||||
Reporter | rhornig | |||||||||
Assigned To | rhornig | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | |||||
Status | resolved | Resolution | fixed | |||||||
Platform | OS | OS Version | ||||||||
Product Version | 4.1 | |||||||||
Target Version | Fixed in Version | 4.2 | ||||||||
Summary | 0000191: Switching a shared library based model to release mode from debug prevents the running of model | |||||||||
Description | Steps to reproduce: - rebuild OMNET (both release and debug libraries) $ make cleanall $ make - we will use the queueinglib example as it is build as a shared library $ cd samples/queueinglib $ make clean $ make MODE=release $ cd ../queuenet $ ./queuenet On Windows machines with MINGW, this will start the simulation, but the simulator will not find registered simple modules and other registered classes. You will get: "Error in module (cCompoundModule) NETWORK (id=1) during network setup: Class "XXX" 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()." On linux this produces a segmentation fault | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | The reason: When we build the simulation for both debug and release, the opp_run command will link with the debug version of the shared libraries. If we switch the mode for a shared lib project to "release" and compile it, the resulting shared library will be linked against the release version of the omnet libraries. Once we start this shared object via the "opp_run" command, opp_run will load the debug versions of the libs while the model will load the release versions. The two shared libs cannot see each other's registration lists etc. In general OMNET was not designed to work this way. Similar problems will occur if a project is in debug mode and uses an other library which is release mode. Each shared lib will see different omnet library instances... Workaround: When switching modes (especially with projects that are using other models as shared libraries or are themselves shared libraries) delete the opp_run executable and recompile the OMNET in the new mode too. Rebuilding all the used models are required too. | |||||||||
Tags | solution | |||||||||
Relationships |
| |||||||||
Attached Files | ||||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2010-07-26 11:27 | rhornig | New Issue | ||||||||
2011-02-09 17:05 | rhornig | Note Added: 0000387 | ||||||||
2011-05-20 10:02 | rhornig | Relationship added | has duplicate 0000257 | |||||||
2012-01-09 17:40 | rhornig | Note Added: 0000669 | ||||||||
2012-01-09 17:40 | rhornig | Status | new => resolved | |||||||
2012-01-09 17:40 | rhornig | Fixed in Version | => 4.2 | |||||||
2012-01-09 17:40 | rhornig | Resolution | open => fixed | |||||||
2012-01-09 17:40 | rhornig | Assigned To | => rhornig | |||||||
2016-06-06 08:47 | kibrom | Tag Attached: solution |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|