[Bug 2065] New: Segfault on probable user error
authorJohn Abraham
Fri, 27 Feb 2015 07:51:14 -0800
changeset 280 fe444ddf76ef
parent 279 6c831ca165bd
child 281 9505d5f277ed
[Bug 2065] New: Segfault on probable user error
RELEASE_NOTES
animatorconstants.h
animxmlparser.cpp
routingxmlparser.cpp
--- a/RELEASE_NOTES	Fri Feb 27 06:17:42 2015 -0800
+++ b/RELEASE_NOTES	Fri Feb 27 07:51:14 2015 -0800
@@ -16,9 +16,9 @@
 
 Wiki
 ====
-http://www.nsnam.org/wiki/NetAnim_3.105
+http://www.nsnam.org/wiki/NetAnim
 
-Release 3.105
+Release 3.106
 =============
 Please use the following to download using mercurial:
 hg clone http://code.nsnam.org/netanim
@@ -31,6 +31,7 @@
 Supported Qt versions
 ---------------------
 - Qt 4.7.x to Qt 4.8.0
+- Qt 5.4
 
 Supported platforms
 -------------------
--- a/animatorconstants.h	Fri Feb 27 06:17:42 2015 -0800
+++ b/animatorconstants.h	Fri Feb 27 07:51:14 2015 -0800
@@ -19,7 +19,7 @@
 #ifndef ANIMATORCONSTANTS_H
 #define ANIMATORCONSTANTS_H
 #define VERSION_FIELD_DEFAULT "ver=\"netanim-"
-#define ANIM_MIN_VERSION 3.105
+#define ANIM_MIN_VERSION 3.106
 #define ANIMPACKET_ZVAVLUE 1
 #define ANIMNODE_ZVALUE 0
 #define ANIMLINK_ZVALUE -1
--- a/animxmlparser.cpp	Fri Feb 27 06:17:42 2015 -0800
+++ b/animxmlparser.cpp	Fri Feb 27 07:51:14 2015 -0800
@@ -519,6 +519,12 @@
     }
   parsedElement.version = m_version;
   //qDebug (QString::number (m_version));
+  QString fileType = m_reader->attributes ().value ("filetype").toString ();
+  if (fileType != "animation")
+    {
+      AnimatorMode::getInstance ()->showPopup ("filetype must be == animation. Invalid animation trace file?");
+      NS_FATAL_ERROR ("Invalid animation trace file");
+    }
   return parsedElement;
 }
 
--- a/routingxmlparser.cpp	Fri Feb 27 06:17:42 2015 -0800
+++ b/routingxmlparser.cpp	Fri Feb 27 07:51:14 2015 -0800
@@ -232,6 +232,12 @@
   m_version = v.toDouble ();
   parsedElement.version = m_version;
   //qDebug (QString::number (m_version));
+  QString fileType = m_reader->attributes ().value ("filetype").toString ();
+  if (fileType != "routing")
+    {
+      AnimatorMode::getInstance ()->showPopup ("filetype must be == routing. Invalid routing trace file?");
+      NS_FATAL_ERROR ("Invalid routing trace file");
+    }
   return parsedElement;
 }