Bugzilla – Bug 1044
Seconds (1e-9) creates Time that is not IsPositive ()
Last modified: 2011-04-17 08:34:28 EDT
I'm trying to schedule a method in a small amount of time (~1e-9 sec). To achieve this I have to instantiate Time object which turns out to be non-positive (IsPositive() returns false). Non-positive Time leads to assert failure in DefaultSimulatorImpl::Schedule(): assert failed. cond="tAbsolute >= TimeStep (m_currentTs)", file=../src/simulator/default-simulator-impl.cc, line=193 This is not very surprising by itself but this also leads to random (depending on RngRun) crashes if the scheduling amount is taken from RandomVariable. This can cause corrupted simulation results. Example to reproduce this bug is in the attachment. It's worth to mention, that the same example works fine in mathieu/ns-3-time repository.
Created attachment 1025 [details] simpe program showing the problem
merged ns-3-time