Alexander Afanasyev | 864522f | 2012-05-31 13:33:57 -0700 | [diff] [blame^] | 1 | From ebfeccd51ba1259e01a5bef3925719a88c3ac040 Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 3 | Date: Mon, 23 Apr 2012 13:45:51 -0700 |
| 4 | Subject: [PATCH] visualizer: temporary fix for the visualizer-related bugs |
| 5 | (asserts) |
| 6 | |
| 7 | --- |
| 8 | src/core/model/type-id.cc | 3 ++- |
| 9 | src/visualizer/model/pyviz.cc | 5 +++-- |
| 10 | 2 files changed, 5 insertions(+), 3 deletions(-) |
| 11 | |
| 12 | diff --git a/src/core/model/type-id.cc b/src/core/model/type-id.cc |
| 13 | index e51e1e9..1368b85 100644 |
| 14 | --- a/src/core/model/type-id.cc |
| 15 | +++ b/src/core/model/type-id.cc |
| 16 | @@ -149,7 +149,8 @@ IidManager::AddConstructor (uint16_t uid, ns3::Callback<ns3::ObjectBase *> callb |
| 17 | struct IidInformation *information = LookupInformation (uid); |
| 18 | if (information->hasConstructor) |
| 19 | { |
| 20 | - NS_FATAL_ERROR (information->name<<" already has a constructor."); |
| 21 | + return; |
| 22 | + // NS_FATAL_ERROR (information->name<<" already has a constructor."); |
| 23 | } |
| 24 | information->hasConstructor = true; |
| 25 | information->constructor = callback; |
| 26 | diff --git a/src/visualizer/model/pyviz.cc b/src/visualizer/model/pyviz.cc |
| 27 | index 1e500b2..739d8c4 100644 |
| 28 | --- a/src/visualizer/model/pyviz.cc |
| 29 | +++ b/src/visualizer/model/pyviz.cc |
| 30 | @@ -317,8 +317,9 @@ PyViz::SimulatorRunUntil (Time time) |
| 31 | // events just appear to "jump" big chunks of time. |
| 32 | NS_LOG_LOGIC ("Schedule dummy callback to be called in " << (time - Simulator::Now ())); |
| 33 | m_stop = false; |
| 34 | - Simulator::Cancel (m_stopCallbackEvent); |
| 35 | - m_stopCallbackEvent = Simulator::Schedule (time - Simulator::Now (), &PyViz::CallbackStopSimulation, this); |
| 36 | + // Simulator::Cancel (m_stopCallbackEvent); |
| 37 | + // m_stopCallbackEvent = |
| 38 | + Simulator::ScheduleWithContext (-1, time - Simulator::Now (), &PyViz::CallbackStopSimulation, this); |
| 39 | |
| 40 | Ptr<SimulatorImpl> impl = Simulator::GetImplementation (); |
| 41 | Ptr<VisualSimulatorImpl> visualImpl = DynamicCast<VisualSimulatorImpl> (impl); |
| 42 | -- |
| 43 | 1.7.10.2 |
| 44 | |