OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000047OMNeT++runtime / Tkenvpublic2009-01-20 10:202009-01-20 11:06
ReporterViRe 
Assigned Toandras 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.0rc1 
Target VersionFixed in Version4.0rc2 
Summary0000047: Crash in Tkenv when inspecting a module
DescriptionIf a simple module has a member(such as, a queue) which is an object of class inherited from the cSimpleModule(which is inherited from cComponent), and the componenttype could be left unset. But if I try to inspect the simple module in the GUI, an error will happen. I found such codes in the tkutil.cc:
    const char *getObjectShortTypeName(cObject *object)
    {
           if (dynamic_cast<cComponent*>(object))
               return ((cComponent*)object)->getComponentType()->getName();
           else
               return object->getClassName();
    }
    
Because my queue does NOT set the componenttype, so the getComponentType() returns NULL. Should some ensurance be added?
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000116)
andras (administrator)
2009-01-20 11:05

Modules (objects derived from cSimpleModule) may only be created via the cModuleType::create() function. It is illegal to create them directly via "new".

Tkenv has been fixed not to crash on such cases, but to print a meaningful error message.
(0000117)
andras (administrator)
2009-01-20 11:06

Client code needs to be fixed not to instantiate a module class without cModuleType object. Tkenv crash was fixed in OMNeT++.

- Issue History
Date Modified Username Field Change
2009-01-20 10:20 rhornig New Issue
2009-01-20 10:20 rhornig Assigned To => andras
2009-01-20 10:28 rhornig Reporter rhornig => ViRe
2009-01-20 11:05 andras Note Added: 0000116
2009-01-20 11:06 andras Note Added: 0000117
2009-01-20 11:06 andras Status new => resolved
2009-01-20 11:06 andras Fixed in Version => 4.0rc2
2009-01-20 11:06 andras Resolution open => fixed


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker