[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1535732-font-textures into lp:widelands

2016-04-23 Thread bunnybot
Continuous integration builds have changed state:

Travis build 1040. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/125199506.
Appveyor build 872. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1535732_font_textures-872.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1535732-font-textures/+merge/292354
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1535732-font-textures into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1228811-observer-minimap into lp:widelands

2016-04-23 Thread GunChleoc
GunChleoc has proposed merging 
lp:~widelands-dev/widelands/bug-1228811-observer-minimap into lp:widelands.

Commit message:
Write minimap file for observers.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1228811-observer-minimap/+merge/292716
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1228811-observer-minimap into lp:widelands.
=== modified file 'src/game_io/game_preload_packet.cc'
--- src/game_io/game_preload_packet.cc	2016-03-20 15:51:39 +
+++ src/game_io/game_preload_packet.cc	2016-04-23 19:17:21 +
@@ -124,16 +124,17 @@
 	if (!game.is_loaded()) {
 		return;
 	}
-	if (ipl != nullptr) {
-		const MiniMapLayer flags = MiniMapLayer::Owner | MiniMapLayer::Building | MiniMapLayer::Terrain;
-		const Point& vp = ipl->get_viewpoint();
-		std::unique_ptr< ::StreamWrite> sw(fs.open_stream_write(kMinimapFilename));
-		if (sw.get() != nullptr) {
-			write_minimap_image(game, >player(), vp, flags, sw.get());
-			sw->flush();
+
+	std::unique_ptr< ::StreamWrite> sw(fs.open_stream_write(kMinimapFilename));
+	if (sw.get() != nullptr) {
+		if (ipl != nullptr) {  // Player
+			const MiniMapLayer flags = MiniMapLayer::Owner | MiniMapLayer::Building | MiniMapLayer::Terrain;
+			write_minimap_image(game, >player(), ipl->get_viewpoint(), flags, sw.get());
+		} else { // Observer
+			write_minimap_image(game, nullptr, Point(0, 0), MiniMapLayer::Terrain, sw.get());
 		}
+		sw->flush();
 	}
-
 }
 
 }

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/ai_target_quantity into lp:widelands

2016-04-23 Thread TiborB
TiborB has proposed merging lp:~widelands-dev/widelands/ai_target_quantity into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

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

I found that wares that have no default targets in init.lua give 
default_ware_quantity 254, and this is accepted by AI and leads to bad 
behaviour. Now, in such cases, value 10 is used instead. 
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/ai_target_quantity into lp:widelands.
=== modified file 'src/ai/defaultai.cc'
--- src/ai/defaultai.cc	2016-04-11 06:45:29 +
+++ src/ai/defaultai.cc	2016-04-23 18:59:50 +
@@ -5810,22 +5810,36 @@
 	tribe_ = _->tribe();
 
 	// to avoid floats real multiplicator is multiplicator/10
-	uint16_t multiplicator = 10;
-	if ((productionsites.size() + num_ports * 5) > 50) {
-		multiplicator = (productionsites.size() + num_ports * 5) / 5;
-	}
+	const uint16_t multiplicator =
+		std::max((productionsites.size() + num_ports * 5) / 5, 10);
 
 	for (EconomyObserver* observer : economies) {
 		DescriptionIndex nritems = player_->egbase().tribes().nrwares();
 		for (Widelands::DescriptionIndex id = 0; id < nritems; ++id) {
-			const uint16_t default_target = tribe_->get_ware_descr(id)->default_target_quantity(tribe_->name());
+
+			// Just skip wares that are not used by a tribe
+			if (!tribe_->has_ware(id)) {
+continue;
+			}
+
+			uint16_t default_target =
+tribe_->get_ware_descr(id)->default_target_quantity(tribe_->name());
+
+			// It seems that when default target for ware is not set, it returns
+			// kInvalidWare (=254), this is confusing for AI so we change it to 10
+			if (default_target == Widelands::kInvalidWare) {
+default_target = 10;
+			}
+
+			uint16_t new_target = std::max(default_target * multiplicator / 10, 2);
+			assert(new_target>1);
 
 			game().send_player_command(*new Widelands::CmdSetWareTargetQuantity(
 			  gametime,
 			  player_number(),
 			  player_->get_economy_number(>economy),
 			  id,
-			  default_target * multiplicator / 10));
+			  new_target));
 		}
 	}
 }

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1573968-new-map-crash into lp:widelands

2016-04-23 Thread kaputtnik
Review: Needs Fixing

Now i get a crash when

1. Start editor
2. Place a player
3. Save the map 
4. Load the previous saved map

Result:
widelands: 
/home/kaputtnik/widelands-repo/bug-1573968-new-map-crash/src/logic/map.h:205: 
Widelands::Coords Widelands::Map::get_starting_pos(Widelands::PlayerNumber) 
const: Zusicherung »1 <= p && p <= get_nrplayers()« nicht erfüllt.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1573968-new-map-crash/+merge/292712
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1573968-new-map-crash.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug_1571009_work_area_radius into lp:widelands

2016-04-23 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/bug_1571009_work_area_radius 
into lp:widelands has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug_1571009_work_area_radius/+merge/292066
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug_1571009_work_area_radius.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_eris into lp:widelands

2016-04-23 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/update_eris into lp:widelands 
has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/update_eris/+merge/292700
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/update_eris.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_eris into lp:widelands

2016-04-23 Thread GunChleoc
@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/update_eris/+merge/292700
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/update_eris.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/fh1_multiline_textarea into lp:widelands

2016-04-23 Thread GunChleoc
I am getting a bit burned out trying to fix this thing, so I need a pair of 
fresh eyes.

I have circumvented the remaining bugs by some hacking - what I need to know 
now is which hacks we can live with and which hacks need to be fixed. I think 
getting rid of the old font renderer is worth a few hacks, if they're not too 
bad - rendering quality is so much better.

I have marked all the hacks with NOCOM comments. The ones we find acceptable 
can be turned into TODO comments and then hopefully be fixed for Build 20.
-- 
https://code.launchpad.net/~widelands-dev/widelands/fh1_multiline_textarea/+merge/292033
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fh1_multiline_textarea into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1573968-new-map-crash into lp:widelands

2016-04-23 Thread GunChleoc
GunChleoc has proposed merging 
lp:~widelands-dev/widelands/bug-1573968-new-map-crash into lp:widelands.

Commit message:
Select info tool before creating new maps. This fixes a crash with the player 
tool.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1573968 in widelands: "Editor crash: Assertion `1 <= p && p <= 
get_nrplayers()' failed."
  https://bugs.launchpad.net/widelands/+bug/1573968

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1573968-new-map-crash/+merge/292712
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1573968-new-map-crash into lp:widelands.
=== modified file 'src/editor/tools/set_starting_pos_tool.cc'
--- src/editor/tools/set_starting_pos_tool.cc	2016-04-06 09:23:04 +
+++ src/editor/tools/set_starting_pos_tool.cc	2016-04-23 14:44:53 +
@@ -60,12 +60,16 @@
 	// Area around already placed players
 	Widelands::PlayerNumber const nr_players = map.get_nrplayers();
 	for (Widelands::PlayerNumber p = 1, last = current_player_ - 1;; ++p) {
-		for (; p <= last; ++p)
-			if (Widelands::Coords const sp = map.get_starting_pos(p))
-if (map.calc_distance(sp, c) < MIN_PLACE_AROUND_PLAYERS)
+		for (; p <= last; ++p) {
+			if (Widelands::Coords const sp = map.get_starting_pos(p)) {
+if (map.calc_distance(sp, c) < MIN_PLACE_AROUND_PLAYERS) {
 	return 0;
-		if (last == nr_players)
+}
+			}
+		}
+		if (last == nr_players) {
 			break;
+		}
 		last = nr_players;
 	}
 

=== modified file 'src/editor/ui_menus/main_menu_new_map.cc'
--- src/editor/ui_menus/main_menu_new_map.cc	2016-04-06 09:23:04 +
+++ src/editor/ui_menus/main_menu_new_map.cc	2016-04-23 14:44:53 +
@@ -123,6 +123,9 @@
 
 	egbase.cleanup_for_load();
 
+	// Select a tool that doesn't care about map changes
+	parent.select_tool(parent.tools()->info, EditorTool::First);
+
 	map.create_empty_map(
 egbase.world(),
 width_.get_value() > 0 ? width_.get_value() : Widelands::kMapDimensions[0],

=== modified file 'src/editor/ui_menus/main_menu_random_map.cc'
--- src/editor/ui_menus/main_menu_random_map.cc	2016-04-06 09:23:04 +
+++ src/editor/ui_menus/main_menu_random_map.cc	2016-04-23 14:44:53 +
@@ -434,6 +434,9 @@
 
 	egbase.cleanup_for_load();
 
+	// Select a tool that doesn't care about map changes
+	eia.select_tool(eia.tools()->info, EditorTool::First);
+
 	UniqueRandomMapInfo map_info;
 	set_map_info(map_info);
 

=== modified file 'src/logic/map.cc'
--- src/logic/map.cc	2016-04-11 06:45:29 +
+++ src/logic/map.cc	2016-04-23 14:44:53 +
@@ -303,6 +303,7 @@
 	 const std::string& author,
 	 const std::string& description)
 {
+	cleanup();
 	set_size(w, h);
 	set_name   (name);
 	set_author (author);

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/format_security into lp:widelands

2016-04-23 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/format_security into 
lp:widelands has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/format_security/+merge/292699
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/format_security.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1571308-editbox_crash into lp:widelands

2016-04-23 Thread GunChleoc
LGTM :)

Let's wait for Travis and then merge.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1571308-editbox_crash/+merge/292591
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1571308-editbox_crash.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/format_security into lp:widelands

2016-04-23 Thread GunChleoc
@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/format_security/+merge/292699
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/format_security.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1571308-editbox_crash into lp:widelands

2016-04-23 Thread Miroslav Remák
I don't like the inconsistency between kMarginX and margin_y; kMarginX defines 
left margin as well as right margin, while margin_y is top margin and bottom 
margin combined. So I took the liberty of fixing this inconsistency.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1571308-editbox_crash/+merge/292591
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1571308-editbox_crash.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_eris into lp:widelands

2016-04-23 Thread kaputtnik
Review: Approve testing

This change does not affect save games, i was able to load a save game from 
last week :-)

-- 
https://code.launchpad.net/~widelands-dev/widelands/update_eris/+merge/292700
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/update_eris.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1542821-internet-exceptions into lp:widelands

2016-04-23 Thread noreply
The proposal to merge 
lp:~widelands-dev/widelands/bug-1542821-internet-exceptions into lp:widelands 
has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1542821-internet-exceptions/+merge/292698
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1542821-internet-exceptions.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug_1571009_work_area_radius into lp:widelands

2016-04-23 Thread Klaus Halfmann
Review: Resubmit

Hello Gun, I reviewd that comment in workarea_info.h again.
Its just that I do not fully understand the usage of that map, yet.
So if you know what stings are used, please add them.

As of the implementation of std:map this will be correct, I guess.
But it usually is a abd idea to depend on some implemenation that
may change. OTOH the hashcode of integer may not change ever again.

Example: From Java JDK1.3 to 1.4 the Implementation of String.hashCode()
was changed. Some code had implicit dependencies on the order of Elements
in string based maps an therefore started to fail.

Please feel free to change the comment to your liking.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug_1571009_work_area_radius/+merge/292066
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug_1571009_work_area_radius.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1573545-dismantlesite-crash into lp:widelands

2016-04-23 Thread noreply
The proposal to merge 
lp:~widelands-dev/widelands/bug-1573545-dismantlesite-crash into lp:widelands 
has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1573545-dismantlesite-crash/+merge/292701
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1573545-dismantlesite-crash.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1542821-internet-exceptions into lp:widelands

2016-04-23 Thread GunChleoc
The internet code is complicated, and I have never analysed the complete 
workflow. I just searched for "catch" and found the spot.

The idea with the version came from IRC ;)

+Thanks for the review!

@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1542821-internet-exceptions/+merge/292698
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1542821-internet-exceptions.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/format_security into lp:widelands

2016-04-23 Thread GunChleoc
Review: Approve

LGTM
-- 
https://code.launchpad.net/~widelands-dev/widelands/format_security/+merge/292699
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/format_security.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1542821-internet-exceptions into lp:widelands

2016-04-23 Thread Klaus Halfmann
Review: Approve compiled, tested, code review

That was easy, I still do not find my way around in that Internet code.

Thx for fixing this one.

Showing the version was _very_ good idea, too
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1542821-internet-exceptions/+merge/292698
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1542821-internet-exceptions.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/update_eris into lp:widelands

2016-04-23 Thread GunChleoc
Review: Approve

LGTM :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/update_eris/+merge/292700
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/update_eris.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1573545-dismantlesite-crash into lp:widelands

2016-04-23 Thread SirVer
Review: Approve

lgtm 

@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1573545-dismantlesite-crash/+merge/292701
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1573545-dismantlesite-crash.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1535732-font-textures into lp:widelands

2016-04-23 Thread kaputtnik
> You don't need to waste your time testing
> anything with this branch until I have fixed the actual problem.

I am just interested and thought you might be happy to have some response :-) 
But i don't want to waste your time. Nevertheless i have attached a short video 
to the bug report. In my opinion it shows that there is something wrong even 
without activating the texture cache because the texts on the buttons get 
changed automatically from time to time.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1535732-font-textures/+merge/292354
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1535732-font-textures into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1573545-dismantlesite-crash into lp:widelands

2016-04-23 Thread GunChleoc
GunChleoc has proposed merging 
lp:~widelands-dev/widelands/bug-1573545-dismantlesite-crash into lp:widelands.

Commit message:
Protect against division by 0 when drawing dismantlesite.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1573545 in widelands: "dismantlesite.cc: Arithmetic exception crash"
  https://bugs.launchpad.net/widelands/+bug/1573545

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1573545-dismantlesite-crash/+merge/292701

Constructionsites already have this fix.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1573545-dismantlesite-crash into lp:widelands.
=== modified file 'src/logic/map_objects/tribes/dismantlesite.cc'
--- src/logic/map_objects/tribes/dismantlesite.cc	2016-04-01 15:54:39 +
+++ src/logic/map_objects/tribes/dismantlesite.cc	2016-04-23 09:01:56 +
@@ -239,7 +239,7 @@
 
 	// Draw the partially dismantled building
 	static_assert(0 <= DISMANTLESITE_STEP_TIME, "assert(0 <= DISMANTLESITE_STEP_TIME) failed.");
-	uint32_t total_time = DISMANTLESITE_STEP_TIME * work_steps_;
+	const uint32_t total_time = DISMANTLESITE_STEP_TIME * work_steps_;
 	uint32_t completed_time = DISMANTLESITE_STEP_TIME * work_completed_;
 
 	if (working_)
@@ -255,7 +255,7 @@
 	const uint16_t w = anim.width();
 	const uint16_t h = anim.height();
 
-	uint32_t lines = h * completed_time / total_time;
+	const uint32_t lines = total_time ? h * completed_time / total_time : 0;
 
 	dst.blit_animation(pos, anim_idx, tanim, player_color, Rect(Point(0, lines), w, h - lines));
 

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/format_security into lp:widelands

2016-04-23 Thread SirVer
SirVer has proposed merging lp:~widelands-dev/widelands/format_security into 
lp:widelands.

Commit message:
Add to the compile options and fix new errors -Werror=format-security.

The PPA build bot apparently uses this option, that is the reason why nightly 
PPA builds are currently failing. Enabling this by default is probably also a 
sane option anyways. 

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/format_security/+merge/292699
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/format_security into lp:widelands.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2016-03-09 07:15:44 +
+++ CMakeLists.txt	2016-04-23 08:37:45 +
@@ -166,11 +166,11 @@
 endif()
 
 # Turn some warnings into errors.
+wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=format-security")
 wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=return-type")
 wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=shadow")
 wl_add_flag(WL_COMPILE_DIAGNOSTICS "-Werror=uninitialized")
 
-
 IF (WIN32)
   add_definitions(-DMINGW_HAS_SECURE_API)
   if (CMAKE_SIZEOF_VOID_P EQUAL 4)

=== modified file 'src/graphic/text/rt_render.cc'
--- src/graphic/text/rt_render.cc	2016-04-20 09:57:21 +
+++ src/graphic/text/rt_render.cc	2016-04-23 08:37:45 +
@@ -603,7 +603,7 @@
 			const std::string error_message =
 	(boost::format("Texture (%d, %d) too big! Maximum size is %d.")
 	 % width() % height() % g_gr->max_texture_size()).str();
-			log((error_message + "\n").c_str());
+			log("%s\n", error_message.c_str());
 			throw TextureTooBig(error_message);
 		}
 		Texture* rv = new Texture(width(), height());

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1542821-internet-exceptions into lp:widelands

2016-04-23 Thread GunChleoc
GunChleoc has proposed merging 
lp:~widelands-dev/widelands/bug-1542821-internet-exceptions into lp:widelands.

Commit message:
Server and client will now log out when they crash.

Requested reviews:
  Klaus Halfmann (klaus-halfmann)
Related bugs:
  Bug #1542821 in widelands: "Inconsistency after Version Warning"
  https://bugs.launchpad.net/widelands/+bug/1542821

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1542821-internet-exceptions/+merge/292698

This should fix crashes with assert in internet lobby.

@klaus: If you have the time, could you please test again by pulling the cable 
also? I have no cable to pull...
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1542821-internet-exceptions.
=== modified file 'src/network/netclient.cc'
--- src/network/netclient.cc	2016-03-02 16:28:30 +
+++ src/network/netclient.cc	2016-04-23 08:26:47 +
@@ -221,6 +221,10 @@
 		WLApplication::emergency_save(game);
 		d->game = nullptr;
 		disconnect("CLIENT_CRASHED");
+		// We will bounce back to the main menu, so we better log out
+		if (internet_) {
+			InternetGaming::ref().logout("CLIENT_CRASHED");
+		}
 		throw;
 	}
 }

=== modified file 'src/network/nethost.cc'
--- src/network/nethost.cc	2016-03-29 10:04:48 +
+++ src/network/nethost.cc	2016-04-23 08:26:47 +
@@ -789,6 +789,10 @@
 			disconnect_client(0, "SERVER_CRASHED");
 			reaper();
 		}
+		// We will bounce back to the main menu, so we better log out
+		if (internet_) {
+			InternetGaming::ref().logout("SERVER_CRASHED");
+		}
 
 		throw;
 	}

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1571308-editbox_crash into lp:widelands

2016-04-23 Thread GunChleoc
Review: Approve

The increased margin was causing problems in the Building Statistics. So, I've 
made height and margin configurable.

If you agree with my changes, this can go in.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1571308-editbox_crash/+merge/292591
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1571308-editbox_crash.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Build #9614742] i386 build of widelands 1:18-ppa0-bzr7966-201604230631~ubuntu15.04.1 in ubuntu vivid RELEASE [~widelands-dev/ubuntu/widelands-daily]

2016-04-23 Thread Launchpad Buildd System

 * Source Package: widelands
 * Version: 1:18-ppa0-bzr7966-201604230631~ubuntu15.04.1
 * Architecture: i386
 * Archive: ~widelands-dev/ubuntu/widelands-daily
 * Component: main
 * State: Failed to build
 * Duration: 22 minutes
 * Build Log: 
https://launchpad.net/~widelands-dev/+archive/ubuntu/widelands-daily/+build/9614742/+files/buildlog_ubuntu-vivid-i386.widelands_1%3A18-ppa0-bzr7966-201604230631~ubuntu15.04.1_BUILDING.txt.gz
 * Builder: https://launchpad.net/builders/lgw01-55
 * Source: not available



If you want further information about this situation, feel free to
contact a member of the Launchpad Buildd Administrators team.

-- 
i386 build of widelands 1:18-ppa0-bzr7966-201604230631~ubuntu15.04.1 in ubuntu 
vivid RELEASE
https://launchpad.net/~widelands-dev/+archive/ubuntu/widelands-daily/+build/9614742

You are receiving this email because you created this version of this
package.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Build #9614741] amd64 build of widelands 1:18-ppa0-bzr7966-201604230631~ubuntu15.04.1 in ubuntu vivid RELEASE [~widelands-dev/ubuntu/widelands-daily]

2016-04-23 Thread Launchpad Buildd System

 * Source Package: widelands
 * Version: 1:18-ppa0-bzr7966-201604230631~ubuntu15.04.1
 * Architecture: amd64
 * Archive: ~widelands-dev/ubuntu/widelands-daily
 * Component: main
 * State: Failed to build
 * Duration: 21 minutes
 * Build Log: 
https://launchpad.net/~widelands-dev/+archive/ubuntu/widelands-daily/+build/9614741/+files/buildlog_ubuntu-vivid-amd64.widelands_1%3A18-ppa0-bzr7966-201604230631~ubuntu15.04.1_BUILDING.txt.gz
 * Builder: https://launchpad.net/builders/lgw01-50
 * Source: not available



If you want further information about this situation, feel free to
contact a member of the Launchpad Buildd Administrators team.

-- 
amd64 build of widelands 1:18-ppa0-bzr7966-201604230631~ubuntu15.04.1 in ubuntu 
vivid RELEASE
https://launchpad.net/~widelands-dev/+archive/ubuntu/widelands-daily/+build/9614741

You are receiving this email because you created this version of this
package.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Build #9614740] i386 build of widelands 1:18-ppa0-bzr7966-201604230631~ubuntu16.04.1 in ubuntu xenial RELEASE [~widelands-dev/ubuntu/widelands-daily]

2016-04-23 Thread Launchpad Buildd System

 * Source Package: widelands
 * Version: 1:18-ppa0-bzr7966-201604230631~ubuntu16.04.1
 * Architecture: i386
 * Archive: ~widelands-dev/ubuntu/widelands-daily
 * Component: main
 * State: Failed to build
 * Duration: 20 minutes
 * Build Log: 
https://launchpad.net/~widelands-dev/+archive/ubuntu/widelands-daily/+build/9614740/+files/buildlog_ubuntu-xenial-i386.widelands_1%3A18-ppa0-bzr7966-201604230631~ubuntu16.04.1_BUILDING.txt.gz
 * Builder: https://launchpad.net/builders/lgw01-17
 * Source: not available



If you want further information about this situation, feel free to
contact a member of the Launchpad Buildd Administrators team.

-- 
i386 build of widelands 1:18-ppa0-bzr7966-201604230631~ubuntu16.04.1 in ubuntu 
xenial RELEASE
https://launchpad.net/~widelands-dev/+archive/ubuntu/widelands-daily/+build/9614740

You are receiving this email because you created this version of this
package.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1565429-client-version into lp:widelands

2016-04-23 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/bug-1565429-client-version 
into lp:widelands has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1565429-client-version/+merge/292476
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1565429-client-version.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Build #9614739] amd64 build of widelands 1:18-ppa0-bzr7966-201604230631~ubuntu16.04.1 in ubuntu xenial RELEASE [~widelands-dev/ubuntu/widelands-daily]

2016-04-23 Thread Launchpad Buildd System

 * Source Package: widelands
 * Version: 1:18-ppa0-bzr7966-201604230631~ubuntu16.04.1
 * Architecture: amd64
 * Archive: ~widelands-dev/ubuntu/widelands-daily
 * Component: main
 * State: Failed to build
 * Duration: 17 minutes
 * Build Log: 
https://launchpad.net/~widelands-dev/+archive/ubuntu/widelands-daily/+build/9614739/+files/buildlog_ubuntu-xenial-amd64.widelands_1%3A18-ppa0-bzr7966-201604230631~ubuntu16.04.1_BUILDING.txt.gz
 * Builder: https://launchpad.net/builders/lgw01-18
 * Source: not available



If you want further information about this situation, feel free to
contact a member of the Launchpad Buildd Administrators team.

-- 
amd64 build of widelands 1:18-ppa0-bzr7966-201604230631~ubuntu16.04.1 in ubuntu 
xenial RELEASE
https://launchpad.net/~widelands-dev/+archive/ubuntu/widelands-daily/+build/9614739

You are receiving this email because you created this version of this
package.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Build #9614744] i386 build of widelands 1:18-ppa0-bzr7966-201604230631~ubuntu15.10.1 in ubuntu wily RELEASE [~widelands-dev/ubuntu/widelands-daily]

2016-04-23 Thread Launchpad Buildd System

 * Source Package: widelands
 * Version: 1:18-ppa0-bzr7966-201604230631~ubuntu15.10.1
 * Architecture: i386
 * Archive: ~widelands-dev/ubuntu/widelands-daily
 * Component: main
 * State: Failed to build
 * Duration: 14 minutes
 * Build Log: 
https://launchpad.net/~widelands-dev/+archive/ubuntu/widelands-daily/+build/9614744/+files/buildlog_ubuntu-wily-i386.widelands_1%3A18-ppa0-bzr7966-201604230631~ubuntu15.10.1_BUILDING.txt.gz
 * Builder: https://launchpad.net/builders/lgw01-32
 * Source: not available



If you want further information about this situation, feel free to
contact a member of the Launchpad Buildd Administrators team.

-- 
i386 build of widelands 1:18-ppa0-bzr7966-201604230631~ubuntu15.10.1 in ubuntu 
wily RELEASE
https://launchpad.net/~widelands-dev/+archive/ubuntu/widelands-daily/+build/9614744

You are receiving this email because you created this version of this
package.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Build #9614743] amd64 build of widelands 1:18-ppa0-bzr7966-201604230631~ubuntu15.10.1 in ubuntu wily RELEASE [~widelands-dev/ubuntu/widelands-daily]

2016-04-23 Thread Launchpad Buildd System

 * Source Package: widelands
 * Version: 1:18-ppa0-bzr7966-201604230631~ubuntu15.10.1
 * Architecture: amd64
 * Archive: ~widelands-dev/ubuntu/widelands-daily
 * Component: main
 * State: Failed to build
 * Duration: 14 minutes
 * Build Log: 
https://launchpad.net/~widelands-dev/+archive/ubuntu/widelands-daily/+build/9614743/+files/buildlog_ubuntu-wily-amd64.widelands_1%3A18-ppa0-bzr7966-201604230631~ubuntu15.10.1_BUILDING.txt.gz
 * Builder: https://launchpad.net/builders/lgw01-34
 * Source: not available



If you want further information about this situation, feel free to
contact a member of the Launchpad Buildd Administrators team.

-- 
amd64 build of widelands 1:18-ppa0-bzr7966-201604230631~ubuntu15.10.1 in ubuntu 
wily RELEASE
https://launchpad.net/~widelands-dev/+archive/ubuntu/widelands-daily/+build/9614743

You are receiving this email because you created this version of this
package.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Build #9614737] amd64 build of widelands 1:18-ppa0-bzr7966-201604230631~ubuntu14.04.1 in ubuntu trusty RELEASE [~widelands-dev/ubuntu/widelands-daily]

2016-04-23 Thread Launchpad Buildd System

 * Source Package: widelands
 * Version: 1:18-ppa0-bzr7966-201604230631~ubuntu14.04.1
 * Architecture: amd64
 * Archive: ~widelands-dev/ubuntu/widelands-daily
 * Component: main
 * State: Failed to build
 * Duration: 15 minutes
 * Build Log: 
https://launchpad.net/~widelands-dev/+archive/ubuntu/widelands-daily/+build/9614737/+files/buildlog_ubuntu-trusty-amd64.widelands_1%3A18-ppa0-bzr7966-201604230631~ubuntu14.04.1_BUILDING.txt.gz
 * Builder: https://launchpad.net/builders/lgw01-16
 * Source: not available



If you want further information about this situation, feel free to
contact a member of the Launchpad Buildd Administrators team.

-- 
amd64 build of widelands 1:18-ppa0-bzr7966-201604230631~ubuntu14.04.1 in ubuntu 
trusty RELEASE
https://launchpad.net/~widelands-dev/+archive/ubuntu/widelands-daily/+build/9614737

You are receiving this email because you created this version of this
package.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Build #9614738] i386 build of widelands 1:18-ppa0-bzr7966-201604230631~ubuntu14.04.1 in ubuntu trusty RELEASE [~widelands-dev/ubuntu/widelands-daily]

2016-04-23 Thread Launchpad Buildd System

 * Source Package: widelands
 * Version: 1:18-ppa0-bzr7966-201604230631~ubuntu14.04.1
 * Architecture: i386
 * Archive: ~widelands-dev/ubuntu/widelands-daily
 * Component: main
 * State: Failed to build
 * Duration: 14 minutes
 * Build Log: 
https://launchpad.net/~widelands-dev/+archive/ubuntu/widelands-daily/+build/9614738/+files/buildlog_ubuntu-trusty-i386.widelands_1%3A18-ppa0-bzr7966-201604230631~ubuntu14.04.1_BUILDING.txt.gz
 * Builder: https://launchpad.net/builders/lgw01-13
 * Source: not available



If you want further information about this situation, feel free to
contact a member of the Launchpad Buildd Administrators team.

-- 
i386 build of widelands 1:18-ppa0-bzr7966-201604230631~ubuntu14.04.1 in ubuntu 
trusty RELEASE
https://launchpad.net/~widelands-dev/+archive/ubuntu/widelands-daily/+build/9614738

You are receiving this email because you created this version of this
package.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1535732-font-textures into lp:widelands

2016-04-23 Thread GunChleoc
I don't know and it doesn't matter - I am trying to find the line in the code 
that is causing the problem, and deactivating the cache was just to see if the 
problem is somewhere in that area. You don't need to waste your time testing 
anything with this branch until I have fixed the actual problem.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1535732-font-textures/+merge/292354
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1535732-font-textures into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp