← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/fix_bug_1251914 into lp:widelands

 

Tino has proposed merging lp:~widelands-dev/widelands/fix_bug_1251914 into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1251914 in widelands: "soldier stuck in battle animation loop"
  https://bugs.launchpad.net/widelands/+bug/1251914

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/fix_bug_1251914/+merge/200398

handle empty signal as unexpected, mark it handled and continue game tasks
-- 
https://code.launchpad.net/~widelands-dev/widelands/fix_bug_1251914/+merge/200398
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/fix_bug_1251914 into lp:widelands.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2013-09-06 15:01:38 +0000
+++ CMakeLists.txt	2014-01-03 13:03:44 +0000
@@ -114,10 +114,10 @@
   else (DEFINED MSVC)
     set (Boost_USE_STATIC_LIBS  OFF)
   endif (DEFINED MSVC)
-  set (Boost_FIND_COMPONENTS unit_test_framework signals)
+  set (Boost_FIND_COMPONENTS unit_test_framework)
   set (Boost_USE_MULTITHREADED ON)
   set (Boost_DETAILED_FAILURE_MSG ON)
-  find_package(Boost 1.48 COMPONENTS unit_test_framework signals REQUIRED)
+  find_package(Boost 1.48 COMPONENTS unit_test_framework REQUIRED)
 
   if (NOT DEFINED MSVC)
   # If boost unit test library is linked dynamically, BOOST_TEST_DYN_LINK must be defined
@@ -141,16 +141,7 @@
   )
 else (WL_UNIT_TESTS)
   message(STATUS "Disabled Unit Tests")
-  set (Boost_FIND_COMPONENTS signals)
-  if (DEFINED MSVC)
-	set (Boost_USE_STATIC_RUNTIME ON)
-	set (Boost_USE_STATIC_LIBS   ON)
-  else (DEFINED MSVC)
-	set (Boost_USE_STATIC_LIBS   OFF)
-  endif(DEFINED MSVC)
-  set (Boost_USE_MULTITHREADED ON)
-  set (Boost_DETAILED_FAILURE_MSG ON)
-  find_package(Boost 1.48 COMPONENTS signals REQUIRED)
+  find_package(Boost 1.48 REQUIRED)
 endif (WL_UNIT_TESTS)
 
 option (WL_STRICT "If strict compilation mode is requested (almost every warning is an error)" OFF)
@@ -317,6 +308,11 @@
   set (CMAKE_EXE_LINKER_FLAGS_DEBUG "/debug /LTCG /NODEFAULTLIB:libcmt.lib" CACHE STRING "Set by widelands CMakeLists.txt" FORCE)
 endif (DEFINED MSVC)
 
+IF (MINGW)
+  set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--large-address-aware" CACHE STRING "Set by widelands CMakeLists.txt" FORCE)
+  message (STATUS "Enabled large address awareness on mingw32")
+endif (MINGW)
+
 IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
   message (STATUS "Using compiler flags: ${CMAKE_CXX_FLAGS_DEBUG}")
 ELSE (CMAKE_BUILD_TYPE STREQUAL "Debug")

=== modified file 'src/logic/soldier.cc'
--- src/logic/soldier.cc	2013-09-14 14:52:25 +0000
+++ src/logic/soldier.cc	2014-01-03 13:03:44 +0000
@@ -1456,13 +1456,14 @@
 			return start_task_idle(game, get_animation("idle"), 5000);
 		} else if
 			(signal == "location" || signal == "battle" || signal == "wakeup")
-			signal_handled();
-		else {
-			molog
-				("[battle] interrupted by unexpected signal '%s'\n",
-				 signal.c_str());
-			return pop_task(game);
-		}
+			signal_handled();
+	}
+	else {
+		molog
+			("[battle] interrupted by unexpected signal '%s'\n",
+			 signal.c_str());
+		signal_handled();
+		return pop_task(game);
 	}
 
 	if (!m_battle) {