Fixed segfault in test-kinetic-sort (#b5d) ar
authorDmitriy Morozov <morozov@cs.duke.edu>
Fri, 22 Feb 2008 13:06:40 -0500
branchar
changeset 65 d979e09ac6b4
parent 64 948be30f1d58
child 66 6021ec481b1f
Fixed segfault in test-kinetic-sort (#b5d)
.issues/b5d8a8403ae3a0d2
include/geometry/simulator.hpp
--- a/.issues/b5d8a8403ae3a0d2	Thu Feb 21 06:49:06 2008 -0500
+++ b/.issues/b5d8a8403ae3a0d2	Fri Feb 22 13:06:40 2008 -0500
@@ -1,8 +1,18 @@
 From artemis Thu Feb 21 09:54:54 2008
 From: Dmitriy Morozov <morozov@cs.duke.edu>
 Date: Thu, 21 Feb 2008 04:54:00 -0500
-State: new
+State: fixed
 Subject: Segfault in tests/geometry/test-kinetic-sort.cpp
 Message-Id: <b5d8a8403ae3a0d2-0-artemis@metatron>
 
 test-kinetic-sort segfaults when we subscribe to geometry/simulator RLog channel.
+
+From artemis Fri Feb 22 18:05:55 2008
+From: Dmitriy Morozov <morozov@cs.duke.edu>
+Date: Fri, 22 Feb 2008 13:05:55 -0500
+Subject: properties changes (state)
+Message-Id: <b5d8a8403ae3a0d2-a0288cca74095157-artemis@metatron>
+References: <b5d8a8403ae3a0d2-0-artemis@metatron>
+In-Reply-To: <b5d8a8403ae3a0d2-0-artemis@metatron>
+
+state=fixed
--- a/include/geometry/simulator.hpp	Thu Feb 21 06:49:06 2008 -0500
+++ b/include/geometry/simulator.hpp	Fri Feb 22 13:06:40 2008 -0500
@@ -37,7 +37,10 @@
 		sign = !sign;
 	}
 	if (sign) ee->root_stack().pop();			// TODO: double-check the logic
-	rLog(rlSimulator, "Pushing: %s", tostring(ee->root_stack().top()).c_str());
+	if (ee->root_stack().empty())
+        rLog(rlSimulator, "Pushing event with empty root stack");
+    else
+        rLog(rlSimulator, "Pushing: %s", tostring(ee->root_stack().top()).c_str());
 	return queue_.push(ee);
 }