runmode in tkenv uninitialised?

5 views
Skip to first unread message

Denise Dudek

unread,
Dec 2, 2010, 11:30:04 AM12/2/10
to omn...@googlegroups.com
Hi,

I'm in the middle of a medium sized debugging odyssey, and I noticed that apparently the runmode variable in the Tkenv class is not initialised by the constructor. Is this on purpose? Also, does anyone know whether it is possible that leaving runmode uninitialised affects the simulation itself (i.e., the modules etc)?

Hoping anyone knows anything

Best regards
Denise

Rudolf Hornig

unread,
Dec 2, 2010, 12:19:59 PM12/2/10
to omn...@googlegroups.com
runmode is initialized in 

Tkenv::runSimulation(...)

the first parameter of the method is the runmode, which is used to init the class variable. The value of the rumode parameter is coming from the tcl/tk scripts when the simulation is started. I don't think that this effects the simulation outcome...

Rudolf

--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To post to this group, send email to omn...@googlegroups.com.
To unsubscribe from this group, send email to omnetpp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/omnetpp?hl=en.

Doug

unread,
Mar 27, 2015, 1:00:31 AM3/27/15
to omn...@googlegroups.com

I'm seeing the uninitialized "runmode" issue in ValGrind as well (with 5.0b1) -- the issue happens before you actual run the simulation.

ModuleInspector's refreshLayout() is apparently being called before Tkenv::runSimulation(), it (line 446) checks to see if "isExpressMode" is on/off by calling getSimulationRunMode() (i.e., which returns runmode).

At this point in the simulation, runmode does not appear to be initialized - I'd init all variables in constructor!

Doug

Reply all
Reply to author
Forward
0 new messages