Giter VIP home page Giter VIP logo

glob2's Introduction

Glob 2

Build Status

Globulation 2 is a real time strategy game that aims to remove all micro management.

glob2's People

Contributors

anthonyryan1 avatar cheese1 avatar genixpro avatar giszmo avatar jwakely avatar kieranp avatar krichter722 avatar kylelutze avatar liquidityc avatar llllllllllllll avatar mailaender avatar marvelous avatar michiel-de-muynck avatar pinkavaj avatar progval avatar quipyowert2 avatar reportingsjr avatar stephanemagnenat avatar zaroth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glob2's Issues

globulation2.org is gone

It just shows the default nginx welcome message. Do we have access to the domain name? Is there any plan to revive the site?

Prestige win is broken or needs explanation

I have 700 prestige on a map that to my understanding requires 600 to win and still don't win.

I suspect I had prestige win disabled but then the 700/1000/600 display should either disappear completely or not show that last number.

image

scons BoolOption() deprecated

Moved from Bitbucket to here:

When building Globulation 2 using scons, I get (as can be seen in a Travis CI build log) to error:

scons: warning: The BoolOption() function is deprecated; use the BoolVariable() function instead.

This build is run on Ubuntu 16.04 (Xenial), so BoolOption is deprecated already for some time.

Would it be OK to replace BoolOption by BoolVariable to get a cleaner build? If yes, I’ll submit a Pull Request

Crash in tutorial level "Flags and Completion" when destroying enemy's racetrack

In Tutorial 4, "Flags and Completion", after destroying the enemy's Swarm and then racetrack, the game crashes with an assertion failure:
glob2: src/Game.cpp:2289: void Game::drawMapGroundBuildings(int, int, int, int, int, int, int, int, int, Uint32, std::set<Building*>*): Assertion `building' failed.

Globulation 2 version 214dfb2 compiled with g++ 7.5.0 in openSUSE 15.2 for WSL. X server: VcXsrv 1.20.8.1

build/src/glob2 --version:

Globulation 2 - 0.9.5.0

Compiled on Feb 17 2021 at 15:32:44

Compiled with SDL version 2.0.8
Linked with SDL version 2.0.8

Featuring :
* Map version 83
* Maps up to version 58 can still be loaded
* Network Protocol version 27
This program and all related materials are GPL, see COPYING for details.
(C) 2001-2007 Stephane Magnenat, Luc-Olivier de Charriere and other contributors.
See data/authors.txt for a full list.

Type build/src/glob2 --help for a list of command line options.

Reproducibility:
Crashes every time when following the steps below.

Steps to reproduce:

  1. Press space until the flags and zones tab appears
  2. Place exploration flag near enemy base
  3. Place defense zone behind your defense towers (the large square blue zone)
  4. Place war flag on enemy's swarm; set radius to 0.
  5. Increase number of workers supplying the swarm to about 10.
  6. Increase warrior bar on your swarm to about 3 or 4.
  7. When warriors destroy enemy's swarm, move war flag onto racetrack just south of where the destroyed swarm was.

Actual result:
Glob2 crashes with an assertion failure when the racetrack is destroyed.

Expected result:
Tutorial finished, maybe?

Backtrace:

#0  0x00007ffffc9c9520 in raise () from /lib64/libc.so.6
#1  0x00007ffffc9cab01 in abort () from /lib64/libc.so.6
#2  0x00007ffffc9c1b1a in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007ffffc9c1b92 in __assert_fail () from /lib64/libc.so.6
#4  0x00000000004ef426 in Game::drawMapGroundBuildings (this=0x7ffffffe3650, left=0, top=0, right=32, bot=24, sw=1024,
    sh=768, viewportX=36, viewportY=27, localTeam=0, drawOptions=11, visibleBuildings=0x7ffffffe2f00)
    at src/Game.cpp:2289
#5  0x00000000004eba42 in Game::drawMap (this=0x7ffffffe3650, sx=0, sy=0, sw=1024, sh=768, rightMargin=160,
    topMargin=16, viewportX=36, viewportY=27, localTeam=0, drawOptions=11, visibleBuildings=0x7ffffffe2f00)
    at src/Game.cpp:2822
#6  0x000000000051854f in GameGUI::drawAll (this=0x7ffffffe35d0, team=0) at src/GameGUI.cpp:4399
#7  0x00000000004d43f0 in Engine::run (this=0x7ffffffe35d0) at src/Engine.cpp:511
#8  0x00000000004bb4df in CampaignMenuScreen::onAction (this=0x7ffffffe89c0, source=0xe0a030,
    action=GAGGUI::BUTTON_RELEASED, par1=1, par2=0) at src/CampaignMenuScreen.cpp:70
#9  0x0000000000756cdf in GAGGUI::Button::onSDLMouseButtonUp (this=0xe0a030, event=0x7ffffffe88b0)
    at libgag/src/GUIButton.cpp:84
#10 0x0000000000754a32 in GAGGUI::Screen::dispatchEvents (this=0x7ffffffe89c0, event=0x7ffffffe88b0)
    at libgag/src/GUIBase.cpp:601
#11 0x00000000007544c2 in GAGGUI::Screen::execute (this=0x7ffffffe89c0, gfx=0xc47560, stepLength=40)
    at libgag/src/GUIBase.cpp:511
#12 0x0000000000544bd2 in Glob2::run (this=0x7ffffffedb4f, argc=2, argv=0x7ffffffedc38) at src/Glob2.cpp:308
#13 0x00000000005451aa in main (argc=2, argv=0x7ffffffedc38) at src/Glob2.cpp:439 

A unit can survive indefinitely in a fully surrounded building

If a building is completely surrounded (e.g. by trees) while a unit is inside, the unit will wait indefinitely for the exit to clear. In this state, the unit doesn't consume any food. This situation occurs often when playing against AI.

I think that units should still consume food, and possibly starve, while in this state.

forum is down

General Error
Could not find required extension [memcache] for the ACM module memcache.

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/cache/driver/memory.php
LINE: 37
CALL: trigger_error()

FILE: [ROOT]/phpbb/cache/driver/memcache.php
LINE: 50
CALL: phpbb\cache\driver\memory->__construct()

FILE: [ROOT]/cache/production/container_4335734bbdd20f586549a504dff5f80c.php
LINE: 603
CALL: phpbb\cache\driver\memcache->__construct()

FILE: [ROOT]/vendor/symfony/dependency-injection/Container.php
LINE: 295
CALL: phpbb_cache_container->getCache_DriverService()

FILE: [ROOT]/vendor/symfony/dependency-injection/ContainerBuilder.php
LINE: 446
CALL: Symfony\Component\DependencyInjection\Container->get()

FILE: [ROOT]/common.php
LINE: 132
CALL: Symfony\Component\DependencyInjection\ContainerBuilder->get()

FILE: [ROOT]/index.php
LINE: 23
CALL: include('[ROOT]/common.php')

Crash when saving settings

Operating system: Debian
glob2 --version output:

Globulation 2 - 0.9.4.4

Compiled on Jan  2 2021 at 00:52:27

Compiled with SDL version 1.2.15
Linked with SDL version 1.2.15

Featuring :
* Map version 81
* Maps up to version 58 can still be loaded
* Network Protocol version 27
This program and all related materials are GPL, see COPYING for details.
(C) 2001-2007 Stephane Magnenat, Luc-Olivier de Charriere and other contributors.
See data/authors.txt for a full list.

Type glob2 --help for a list of command line options.

Globulation 2 crashes when saving settings. To reproduce:

  1. Open settings.
  2. Click OK.
  3. It crashes.

Backtrace:

Thread 1 "glob2" received signal SIGSEGV, Segmentation fault.
0x00005555557141c9 in Settings::save (this=<optimized out>, filename=<optimized out>) at /usr/include/c++/10/bits/basic_string.h:186
186	      _M_data(pointer __p)
#0  0x00005555557141c9 in Settings::save (this=<optimized out>, filename=<optimized out>) at /usr/include/c++/10/bits/basic_string.h:186
#1  0x000055555571d66a in SettingsScreen::onAction (this=0x7fffffff9110, source=0x555555a55ae0, action=<optimized out>, par1=<optimized out>, par2=<optimized out>)
    at src/SettingsScreen.cpp:373
#2  0x00005555557bd3e5 in GAGGUI::Screen::dispatchEvents (this=this@entry=0x7fffffff9110, event=event@entry=0x7fffffff8fb0) at libgag/src/GUIBase.cpp:596
#3  0x00005555557bd7f3 in GAGGUI::Screen::execute (this=this@entry=0x7fffffff9110, gfx=0x5555558fcd90, stepLength=stepLength@entry=40) at libgag/src/GUIBase.cpp:506
#4  0x00005555556604b8 in Glob2::run (this=0x7fffffffe0a7, argc=<optimized out>, argv=<optimized out>) at src/Glob2.cpp:348
#5  0x00005555555aa357 in main (argc=<optimized out>, argv=<optimized out>) at src/Glob2.cpp:409

Build error (boost::logic::tribool operator!= sucks)

src/AIEcho.cpp:4390:102: error: cannot convert ‘boost::logic::tribool’ to ‘bool’ in return

operator!= behaves oddly - if either value is indeterminate, the result is also indeterminate (even if both values are indeterminate).

Incorrect rendering if the size of the screen is bigger than the size of the map

Globulation 2 - 0.9.4.4

If the screen is bigger than the map, then some parts of the map can appear on the screen multiple times. When this happens, the terrain is rendered correctly, but units and buildings are only drawn once.

Everything should be drawn as many times as it appears on the screen: terrain, units, buildings, target lines, etc.

Small memory leak in Campaign::load()

The backend is not deleted in Campaign::load in the else block. Either TextInputStream's destructor should delete the backend or there should be a delete backend; line after the delete stream;, or backend should be a smart pointer.

The StreamBackend that backend points to is created in FileManager::openInputStreamBackend() with new then the pointer is returned to Campaign::load() where it is passed to TextInputStream's constructor, but TextInputStream's destructor doesn't delete backend and neither does Campaign::load() unless there is an end of stream condition.

Leak report from Dr. Memory 2.4.0:

Error #126: LEAK 16 direct bytes 0x0000026bb1300210-0x0000026bb1300220 + 0 indirect bytes
# 0 replace_operator_new                                       [d:\a\drmemory\drmemory\common\alloc_replace.c:2903]
# 1 GAGCore::FileManager::openInputStreamBackend               [libgag/src/FileManager.cpp:234]
# 2 Campaign::load                                             [src/Campaign.cpp:193]
# 3 CampaignMenuScreen::CampaignMenuScreen                     [src/CampaignMenuScreen.cpp:28]
# 4 GAGCore::TextInputStream::~TextInputStream                 [libgag/include/TextStream.h:85]
# 5 Glob2::run                                                 [src/Glob2.cpp:307]
# 6 SDL_main                                                   [src/Glob2.cpp:439]
# 7 main_getcmdline                                            [src/AICastor.cpp:3248]
# 8 __tmainCRTStartup                                          [C:/_/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:321]
# 9 .l_startw                                                  [C:/_/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:176]
#10 KERNEL32.dll!BaseThreadInitThunk

Dr Memory results.txt

Decouple meta-server from network game versions

Currently Glob2 uses the NET_PROTOCOL_VERSION number to ensure compatibility for games played on the network and for the protocol connecting to the YOG meta-server. This poses a problem when a network game version bump is needed due to a behavior change in the game, but otherwise the YOG protocol is not changed (see #116).

In my opinion, the clean solution is to have two protocol version: one for YOG and one for network games themselves.

Properly resize window with SDL2

Now we are using SDL2, but the window resize is done by closing it and opening a new one, which is not ideal. A proper resize using SDL_SetWindowSize should be implemented.

Once this is done, we can also re-enable the resizable option, allowing the window manager to resize Glob2's window.

LAN game connection seems broken

In my home, the client connects to the host and is seen by the host, but on the client side, an empty screen is show forever.

I'm using local network (addresses 192.168.178.XX), the problem happens with both the two computer on Ethernet, and with one Ethernet one Wi-Fi. I am using a Fritz router (FRITZ!Box 5490, FRITZ!OS: 07.29).

Connecting through YOG works.

The damage and starving maps update looks inconsistent

With latest master, the damage map is not permanent following units having damage, but seems to be transient when the damage is done, and only sometimes. Moreover, building damage is not shown in it (probably the same cause).

Similarly, the starving map seems to not function properly as well.

A* implementation takes too much memory

The current A* algorithm used in Map::pathfindPointToPoint uses a rich AStarAlgorithmPoint for each point's position. However, it should be able to run with a much lower overhead because both the move cost as well the direction can be inferred by a simple derivative of explored points.

Assertion failure in src/Teams.cpp with MSVC

When compiled with MSVC project from #73 and fixes from #72, the game crashes with the message "Cannot increment end list iterator" when trying to upgrade my hospital. However, when compiled with GCC12, there isn't any compile warning or runtime error about this problem.

Compiling with Address Sanitizer on with Visual Studio doesn't produce any additional warnings or errors, but it does change the address the iterator points to from 0xcdcdcdcdcdcdcdcd to 0xbebebebebebebebe, both of which indicate uninitialized memory.

Globulation 2 version: beta4.5-531-g7c23bf87 with mentioned PRs applied.

Visual Studio and compiler version:
cl.exe: Microsoft (R) C/C++ Optimizing Compiler Version 19.35.32216.1 for x86
Visual Studio Community 2022 64-bit 17.5.3
Windows version 10 Home 22H2 (OS Build 19045.2788)

Steps to reproduce:

  1. Compile with the visual studio project files from #73 and the fixes from #72.
  2. Start the tutorial 4
  3. Upgrade hospital

Result:
The game immediately crashes and this dialog pops up:
Globulation 2 cannot increment end list iterator

Microsoft Visual C++ Runtime Library
Debug Assertion Failed!

Program: D:\Linux_home\nathan\src\glob2\x64\Debug SDL\glob2.exe
File: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\list
Line: 162

Expression: cannot increment end list iterator

For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)
[Abort] [Retry] [Ignore]

Stack trace from Visual Studio

A breakpoint instruction (__debugbreak() statement or a similar call) was executed in glob2.exe.
>	glob2.exe!std::_List_const_iterator<std::_List_val<std::_List_simple_types<Building *>>>::operator++() Line 162	C++
 	glob2.exe!std::_List_iterator<std::_List_val<std::_List_simple_types<Building *>>>::operator++() Line 248	C++
 	glob2.exe!Team::syncStep() Line 1048	C++
 	glob2.exe!Game::syncStep(int localTeam) Line 1242	C++
 	glob2.exe!Engine::run() Line 497	C++
 	glob2.exe!CampaignMenuScreen::onAction(GAGGUI::Widget * source, GAGGUI::Action action, int par1, int par2) Line 70	C++
 	glob2.exe!GAGGUI::Button::onSDLMouseButtonUp(SDL_Event * event) Line 85	C++
 	glob2.exe!GAGGUI::Screen::dispatchEvents(SDL_Event * event) Line 601	C++
 	glob2.exe!GAGGUI::Screen::execute(GAGCore::DrawableSurface * gfx, int stepLength) Line 515	C++
 	glob2.exe!Glob2::run(int argc, char * * argv) Line 308	C++
 	glob2.exe!SDL_main(int argc, char * * argv) Line 440	C++
 	glob2.exe!main_getcmdline() Line 82	C
 	[External Code]	

SDL2 branch does not show cursor

Testing the SDL2 branch here (Ubuntu 20.04 (Kubuntu), X11, Nvidia RTX 2060 super, proprietary driver version 450.102.04), I get the following errors.

  • By default (with software renderer), I see no cursor, the window has refresh problem, and this on the console:
    Toolkit : can't set screen to 1280x720 at 32 bpp
    Toolkit : Can't create renderer for NULL surface
    Toolkit : Can't set screen resolution, resetting to default of 800x600
    
  • With hardware (-g flag), Glob2 segfaults and the console shows the following problems:
    Toolkit : can't set screen to 1280x720 at 32 bpp
    Toolkit : No hardware accelerated renderers available
    Toolkit : Can't set screen resolution, resetting to default of 800x600
    Toolkit : can't set screen to 800x600 at 32 bpp
    Toolkit : No hardware accelerated renderers available
    

The SDL 1.2 version works fine with this setup.

Suggest: rename README to README.md

Currently, the README shows the link to the Globulation 2 website as plain-text:

improment

I suggest to allow for Markdown formatting, by renaming README to README.md.

I volunteer to do so, though it is kind of trivial to do 😁

binary_function and unary_function are deprecated in C++11

When I compile Globulation 2 master (33bda73) with g++ 12.1.0 in MSys2 Mingw64 shell, it tells me that std::binary_function is deprecated. This Stack Overflow answer says it can be replaced by three using statements. cppreference says it was deprecated in C++11 and removed in C++17.

g++ -o build/libgag/src/GUIFileList.o -c -g3 -Wall -fPIC -DHAVE_CONFIG_H -Dmain=SDL_main -D_GNU_SOURCE=1 -Dmain=SDL_main -I/usr/local/include/SDL -I/mingw64/include -I/mingw64/include/SDL2 -Ilibgag/include -I. -Ilibusl/src -Ibuild/libgag/src/D:/msys64/mingw64/include/SDL2 -Ilibgag/src/D:/msys64/mingw64/include/SDL2 libgag/src/GUIFileList.cpp
libgag/src/GUIFileList.cpp:175:49: warning: 'template<class _Arg1, class _Arg2, class _Result> struct std::binary_function' is deprecated [-Wdeprecated-declarations]
  175 |         struct strfilecmp_functor : public std::binary_function<std::string, std::string, bool>
      |                                                 ^~~~~~~~~~~~~~~
In file included from D:/msys64/mingw64/include/c++/12.1.0/bits/refwrap.h:39,
                 from D:/msys64/mingw64/include/c++/12.1.0/vector:66,
                 from libgag/include/FileManager.h:24,
                 from libgag/include/GUIFileList.h:23,
                 from libgag/src/GUIFileList.cpp:20:
D:/msys64/mingw64/include/c++/12.1.0/bits/stl_function.h:131:12: note: declared here
  131 |     struct binary_function
      |            ^~~~~~~~~~~~~~~

Also unary_function is also deprecated:

src/MapHeader.cpp:289:22: warning: 'template<class _Arg, class _Result> struct std::unary_function' is deprecated [-Wdeprecated-declarations]
  289 | class contains: std::unary_function<T, bool>
      |                      ^~~~~~~~~~~~~~
In file included from D:/msys64/mingw64/include/c++/12.1.0/bits/refwrap.h:39,
                 from D:/msys64/mingw64/include/c++/12.1.0/vector:66,
                 from libgag/include/CursorManager.h:23,
                 from libgag/include/SDLGraphicContext.h:24,
                 from libgag/include/GraphicContext.h:23,
                 from src/BaseTeam.h:25,
                 from src/MapHeader.h:22,
                 from src/MapHeader.cpp:20:
D:/msys64/mingw64/include/c++/12.1.0/bits/stl_function.h:117:12: note: declared here
  117 |     struct unary_function
      |            ^~~~~~~~~~~~~~

Use SDL_GetTicks64 instead of SDL_GetTicks which overflows after 49 days.

SDL_GetTicks will overflow after about 49 days, which might cause the game to glitch. SDL_GetTicks64, introduced in SDL 2.0.18, doesn't have this problem. A global find and replace wouldn't completely fix this bug; the variables that SDL_GetTicks was assigned to have to be changed from 32-bit to 64-bit. Also an #ifdef or similar should be put in place so that the game will still compile on SDL2 versions older than 2.0.18.

This will probably not be a problem on the client, but the YOG server might run that long.

Merge server changes?

Hi,

The YOG server runs a patched version of 59849b5:

diff -r 8d2f3a39946a SConstruct
--- a/SConstruct	Thu Oct 04 18:57:02 2012 +0000
+++ b/SConstruct	Sun Dec 29 16:58:48 2019 +0100
@@ -130,14 +130,24 @@
         print "Could not find libboost_thread or libboost_thread-mt or boost/thread/thread.hpp"
         missing.append("libboost_thread")
     env.Append(LIBS=[boost_thread])
+
+    boost_system = ''
+    if conf.CheckLib("boost_system"):
+        boost_system="boost_system"
+    elif conf.CheckLib("boost_system-mt"):
+        boost_system="boost_system-mt"
+    else:
+        print "Could not find libboost_system or libboost_system-mt"
+        missing.append("libboost_system")
+    env.Append(LIBS=[boost_system])
     
     boost_date_time = ''
     if conf.CheckLib("boost_date_time") and conf.CheckCXXHeader("boost/date_time/posix_time/posix_time.hpp"):
-        boost_thread="boost_thread"
+        boost_date_time="boost_date_time"
     elif conf.CheckLib("boost_date_time-mt") and conf.CheckCXXHeader("boost/date_time/posix_time/posix_time.hpp"):
-        boost_thread="boost_thread-mt"
+        boost_date_time="boost_date_time-mt"
     else:
-        print "Could not find libboost_date_time or libboost_date_time-mt or boost/thread/thread.hpp"
+        print "Could not find libboost_date_time or libboost_date_time-mt or boost/date_time/date_time.hpp"
         missing.append("libboost_date_time")
     env.Append(LIBS=[boost_date_time])
     
@@ -279,20 +289,20 @@
 
     env.Append(CPPPATH=['#libgag/include', '#'])
     env.Append(CPPPATH=['#libusl/src', '#'])
-    env.Append(CXXFLAGS=' -Wall')
+    env.Append(CXXFLAGS=' -Wall -O3 -fPIC')
     env.Append(LINKFLAGS=' -Wall')
-    env.Append(LIBS=['SDL_net'])
+    env.Append(LIBS=['SDL_net', 'pthread'])
     if not server_only:
         env.Append(LIBS=['vorbisfile', 'SDL_ttf', 'SDL_image', 'speex'])
 
     if env['release']:
-        env.Append(CXXFLAGS=' -O2 -s')
-        env.Append(LINKFLAGS=' -O2 -s --fwhole-program')
+        env.Append(CXXFLAGS=' -O3 -s')
+        env.Append(LINKFLAGS=' -O3 -s --fwhole-program')
     if env['profile']:
         env.Append(CXXFLAGS=' -pg')
         env.Append(LINKFLAGS='-pg')
-        env.Append(CXXFLAGS=' -O2')
-        env.Append(LINKFLAGS='-O2')
+        env.Append(CXXFLAGS=' -O3')
+        env.Append(LINKFLAGS='-O3')
     if env['mingw'] or isWindowsPlatform or env['mingwcross']:
         # TODO: Remove unneccessary dependencies for server.
         env.Append(LIBS=['vorbis', 'ogg', 'regex', 'wsock32', 'winmm', 'mingw32', 'SDLmain', 'SDL'])
diff -r 8d2f3a39946a src/YOGServer.cpp
--- a/src/YOGServer.cpp	Thu Oct 04 18:57:02 2012 +0000
+++ b/src/YOGServer.cpp	Sun Dec 29 16:58:48 2019 +0100
@@ -150,7 +150,7 @@
 	std::cout<<"Server started successfully."<<std::endl;
 	while(nl.isListening())
 	{
-		const int speed = 4;
+		const int speed = 20;
 		int startTick, endTick;
 		startTick = SDL_GetTicks();
 		update();
diff -r 8d2f3a39946a src/YOGServerFileDistributor.cpp
--- a/src/YOGServerFileDistributor.cpp	Thu Oct 04 18:57:02 2012 +0000
+++ b/src/YOGServerFileDistributor.cpp	Sun Dec 29 16:58:48 2019 +0100
@@ -103,6 +103,10 @@
 			i->get<0>()->sendMessage(fileInfo);
 			i->get<2>() = 1;
 		}
+                else if(i->get<2>() == 0) {
+                    // WORKAROUND
+                    continue;
+                }
 		else if(i->get<2>()-1 < (int)chunks.size() && i->get<1>() < localtime)
 		{
 			i->get<0>()->sendMessage(chunks[i->get<2>()-1]);

I don't remember what these do; I did them seven years ago. I'm guessing the SConstruct changes are to work on new versions of Debian and improve perfs; the C++ ones are probably to fix segfaults and/or bugs.

Add integration tests for core game component

If we want to cleanup core parts of Glob2, we need to have some certainty that we are not breaking the game. A good way to have them is to have integration tests, for example by running small headless games and compare resulting statistics. As Glob2's core engine is deterministic, tests should always produce the same result. Here are some ideas:

  • A unit next to a full inn should survive for a long time (tests basic unit state machine and gradients).
  • A warrior next to an enemy should kill it.
  • A worker next to wheat and inn should fill the inn.
  • Three workers next to wheat and an empty inn should all work at the inn if there are three requested workers.

Do you have ideas for others?

SConscript files for python 3

When I tried compiling I got an error because the scons files were for python 2.
So I gave them 3.x syntax for them and also the python files in src/.
Do you want me to make a pull request for that?

glob2 doesn't compile on ubuntu-20.04

I installed scons-2.5.1 from source to compile glob2. It compiled for awhile, but:

src/AIEcho.cpp: In member function 'bool AIEcho::SearchTools::enemy_building_iterator::operator!=(const AIEcho::SearchTools::enemy_building_iterator&) const':
src/AIEcho.cpp:4390:102: error: cannot convert 'boost::logic::tribool' to 'bool' in return
 4390 | eturn is_end!=rhs.is_end || team!=rhs.team || building_type!=rhs.building_type || level!=rhs.level || construction_site!=rhs.construction_site;
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                                    |
      |                                                                                                    boost::logic::tribool

scons: *** [build/src/AIEcho.o] Error 1
scons: building terminated because of errors.

CPU load indicator reaches right edge of screen on a slow computer / under load

On my slow, 5-year-old laptop, I have several programs open at the same time. Globulation 2's indicator for whether the computer is running slow reaches the right edge of the window. It's only supposed to get to the vertical white line and stop.

Steps to reproduce:

  1. Set your computer (or virtual machine) to a low clock speed
  2. Start the tutorial in Glob2

What happens:

The CPU load indicator glitch

image

What I expected:
The CPU load indicator should stay in between the two vertical lines.

For quite a while, I actually thought this was a problem with the way I implemented resize in PR #64, but just noticed it on a lightly modded Globulation 2 today when I was trying to fix issue #80.

This happens with Globulation 2 beta4.5-574-g39980149 on Windows 10 Home 22H2 19045.3324 running on an MSI GS63 Stealth 8RE laptop. I have to set my laptop to run at the slowest mode: Eco, which is about 0.8 GHz or so, for it not to overheat. I'll probably have to buy a new computer pretty soon whenever this one decides to bite the dust.

cppcheck error: iterator 'bi' used after element has been erased

From richelbilderbeek
https://bitbucket.org/giszmo/glob2/issues/8/cppcheck-error-iterator-bi-used-after

When running cppcheck (see Travis build log), it detects the following errors:

[Building.cpp:2783]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
[Building.cpp:2788]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
[Building.cpp:2821]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
[Building.cpp:2830]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
[Building.cpp:2840]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
[Building.cpp:2860]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
[Building.cpp:2878]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
[Game.cpp:1560] -> [Game.cpp:1559]: (error) Iterator 'bi' used after element has been erased.

Focusing on the last error:
[Game.cpp:1560] -> [Game.cpp:1559]: (error) Iterator 'bi' used after element has been erased.

These are the lines it is about:

for (std::list<Building *>::iterator bi=teams[ti]->virtualBuildings.begin(); bi!=teams[ti]->virtualBuildings.end(); ++bi)
    if ((*bi)->posX==x && (*bi)->posY==y)
    {
        teams[ti]->virtualBuildings.erase(bi);                      //1559
        teams[ti]->myBuildings[Building::GIDtoID((*bi)->gid)]=NULL; //1560
        delete *bi;
        found=true;
        break;
    }

Changing the order to this fixes the cppcheck error:

for (std::list<Building *>::iterator bi=teams[ti]->virtualBuildings.begin(); bi!=teams[ti]->virtualBuildings.end(); ++bi)
    if ((*bi)->posX==x && (*bi)->posY==y)
    {
        teams[ti]->myBuildings[Building::GIDtoID((*bi)->gid)]=NULL;
        delete *bi;
        teams[ti]->virtualBuildings.erase(bi);
        found=true;
        break;
    }

If this proposal is accepted, I volunteer to submit a Pull Request with the fix 👍

auto_ptr is deprecated in C++11

auto_ptr is deprecated in C++11 and should be replaced with unique_ptr according to gotw #89.

Excerpts from build output of GCC 12.1.0 on MSys2 Mingw64 shell on Windows 10:

src/MapScriptUSL.cpp: In member function 'bool MapScriptUSL::compileCode(const std::string&)':
src/MapScriptUSL.cpp:181:41: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
  181 |                                         auto_ptr<ifstream> file(Toolkit::getFileManager()->openIFStream(fullFileName));
      |                                         ^~~~~~~~
In file included from D:/msys64/mingw64/include/c++/12.1.0/memory:76,
                 from D:/msys64/mingw64/include/boost/smart_ptr/detail/sp_counted_impl.hpp:35,
                 from D:/msys64/mingw64/include/boost/smart_ptr/detail/shared_count.hpp:27,
                 from D:/msys64/mingw64/include/boost/smart_ptr/shared_ptr.hpp:17,
                 from D:/msys64/mingw64/include/boost/shared_ptr.hpp:17,
                 from src/Team.h:33,
                 from src/Map.h:31,
                 from src/Game.h:27,
                 from src/GameGUI.h:28,
                 from src/MapScriptUSL.cpp:25:
D:/msys64/mingw64/include/c++/12.1.0/bits/unique_ptr.h:64:28: note: declared here
   64 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~

libusl/src/parser.cpp: In member function 'ExpressionNode* Parser::declaration2(const Position&)':
libusl/src/parser.cpp:86:17: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
   86 |                 auto_ptr<PatternNode> argument(pattern());
      |                 ^~~~~~~~
In file included from D:/msys64/mingw64/include/c++/12.1.0/memory:76,
                 from D:/msys64/mingw64/include/boost/function/function_base.hpp:16,
                 from D:/msys64/mingw64/include/boost/function/detail/prologue.hpp:17,
                 from D:/msys64/mingw64/include/boost/function.hpp:30,
                 from libusl/src/native.h:10:
D:/msys64/mingw64/include/c++/12.1.0/bits/unique_ptr.h:64:28: note: declared here
   64 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
libusl/src/parser.cpp: In member function 'PatternNode* Parser::pattern()':
libusl/src/parser.cpp:107:25: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
  107 |                         auto_ptr<TuplePatternNode> tuple(new TuplePatternNode(position));
      |                         ^~~~~~~~
D:/msys64/mingw64/include/c++/12.1.0/bits/unique_ptr.h:64:28: note: declared here
   64 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
libusl/src/parser.cpp: In member function 'ExpressionNode* Parser::methodCompositionExpression(ExpressionNode*)':
libusl/src/parser.cpp:192:9: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
  192 |         auto_ptr<ExpressionNode> node(pathExpression(first));
      |         ^~~~~~~~
D:/msys64/mingw64/include/c++/12.1.0/bits/unique_ptr.h:64:28: note: declared here
   64 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
libusl/src/parser.cpp: In member function 'ExpressionNode* Parser::pathExpression(ExpressionNode*)':
libusl/src/parser.cpp:214:9: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
  214 |         auto_ptr<ExpressionNode> node(first);
      |         ^~~~~~~~
D:/msys64/mingw64/include/c++/12.1.0/bits/unique_ptr.h:64:28: note: declared here
   64 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
libusl/src/parser.cpp: In member function 'ExpressionNode* Parser::simpleExpression()':
libusl/src/parser.cpp:269:25: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
  269 |                         auto_ptr<RecordBlock> block(new RecordBlock(position));
      |                         ^~~~~~~~
D:/msys64/mingw64/include/c++/12.1.0/bits/unique_ptr.h:64:28: note: declared here
   64 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
libusl/src/parser.cpp:289:25: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
  289 |                         auto_ptr<ExecutionBlock> block(new ExecutionBlock(position));
      |                         ^~~~~~~~
D:/msys64/mingw64/include/c++/12.1.0/bits/unique_ptr.h:64:28: note: declared here
   64 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
libusl/src/parser.cpp:297:25: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
  297 |                         auto_ptr<RecordBlock> block(new RecordBlock(position));
      |                         ^~~~~~~~
D:/msys64/mingw64/include/c++/12.1.0/bits/unique_ptr.h:64:28: note: declared here
   64 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
libusl/src/parser.cpp:305:25: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
  305 |                         auto_ptr<PatternNode> arg(pattern());
      |                         ^~~~~~~~
D:/msys64/mingw64/include/c++/12.1.0/bits/unique_ptr.h:64:28: note: declared here
   64 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
libusl/src/usl.cpp: In member function 'virtual void Load::execute(Thread*)':
libusl/src/usl.cpp:64:17: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
   64 |                 auto_ptr<ifstream> stream(usl->openFile(filename));
      |                 ^~~~~~~~
In file included from D:/msys64/mingw64/include/c++/12.1.0/memory:76,
                 from D:/msys64/mingw64/include/boost/function/function_base.hpp:16,
                 from D:/msys64/mingw64/include/boost/function/detail/prologue.hpp:17,
                 from D:/msys64/mingw64/include/boost/function.hpp:30,
                 from libusl/src/native.h:10:
D:/msys64/mingw64/include/c++/12.1.0/bits/unique_ptr.h:64:28: note: declared here
   64 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~

Crashes when pressing Print Screen key in Linux

When OpenGL support is compiled in (-DHAVE_OPENGL) and enabled (USEGPU flag is set) and the Print Screen key is pressed, GameGUI::handleKeyDump calls GraphicContext::printScreen. In GraphicContext::printScreen, toPrint variable goes out of scope but toPrintSurface still points to its sdlsurface member when calling SDL_SaveBMP(). When toPrint goes out of scope, it is destroyed and its destructor frees sdlsurface, and then toPrintSurface points to an invalid surface. The game then crashes in SDL_SaveBMP because an invalid surface is passed to SDL_SaveBMP().

I found this bug because I was trying to take a screenshot of Globulation 2 in a virtual machine. The crash happens every time I press print screen in the tutorial with the game in focus in an openSUSE virtual machine in VirtualBox (openSUSE 15.1 guest, Windows 10 host). Doesn't happen with openSUSE 15.2 Windows Subsystem for Linux 1 in Windows 10.

The version of glob2 that crashes is master (214dfb2).

Steps to reproduce:

  1. Start Glob2 in Linux
  2. Click Tutorial
  3. Click Introduction and Basics
  4. Click Start Mission
  5. Press Print Screen key

Backtrace:

#0  0x00007ffff6169a9a in ?? () from /usr/lib64/libSDL2-2.0.so.0
#1  0x000000000074f663 in GAGCore::GraphicContext::printScreen (this=0xc48510, filename=...) at libgag/src/GraphicContext.cpp:2207
#2  0x00000000004fe7f0 in GameGUI::handleKeyDump (this=0x7fffffff3710, key=...) at src/GameGUI.cpp:1744
#3  0x00000000004fb4a0 in GameGUI::processEvent (this=0x7fffffff3710, event=0x7fffffff2fa0) at src/GameGUI.cpp:930
#4  0x00000000004f8d03 in GameGUI::step (this=0x7fffffff3710) at src/GameGUI.cpp:474
#5  0x00000000004d3af7 in Engine::run (this=0x7fffffff3710) at src/Engine.cpp:371
#6  0x00000000004bb4df in CampaignMenuScreen::onAction (this=0x7fffffff8b00, source=0x2dc3c80, action=GAGGUI::BUTTON_RELEASED, par1=1, par2=0)
    at src/CampaignMenuScreen.cpp:70
#7  0x0000000000756cdf in GAGGUI::Button::onSDLMouseButtonUp (this=0x2dc3c80, event=0x7fffffff89f0) at libgag/src/GUIButton.cpp:84
#8  0x0000000000754a32 in GAGGUI::Screen::dispatchEvents (this=0x7fffffff8b00, event=0x7fffffff89f0) at libgag/src/GUIBase.cpp:601
#9  0x00000000007544c2 in GAGGUI::Screen::execute (this=0x7fffffff8b00, gfx=0xc48510, stepLength=40) at libgag/src/GUIBase.cpp:511
#10 0x0000000000544bd2 in Glob2::run (this=0x7fffffffdc8f, argc=1, argv=0x7fffffffdd78) at src/Glob2.cpp:308
#11 0x00000000005451aa in main (argc=1, argv=0x7fffffffdd78) at src/Glob2.cpp:439

glob2 --version:

Globulation 2 - 0.9.5.0

Compiled on Jul 14 2021 at 16:59:24

Compiled with SDL version 2.0.8
Linked with SDL version 2.0.8

Featuring :
* Map version 83
* Maps up to version 58 can still be loaded
* Network Protocol version 27
This program and all related materials are GPL, see COPYING for details.
(C) 2001-2007 Stephane Magnenat, Luc-Olivier de Charriere and other contributors.
See data/authors.txt for a full list.

Type build/src/glob2 --help for a list of command line options.

Fix remaining memory leaks

A small session in Valgrind shows leaks in these categories:

In detail:

==86996== 
==86996== HEAP SUMMARY:
==86996==     in use at exit: 189,017 bytes in 2,524 blocks
==86996==   total heap usage: 395,616 allocs, 393,092 frees, 1,834,156,600 bytes allocated
==86996== 
==86996== 1 bytes in 1 blocks are definitely lost in loss record 49 of 1,704
==86996==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x58455A6: _XlcDefaultMapModifiers (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==86996==    by 0x584597A: XSetLocaleModifiers (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==86996==    by 0x4B4A824: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.10.0)
==86996==    by 0x4B5145A: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.10.0)
==86996==    by 0x4B23F6A: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.10.0)
==86996==    by 0x4A938E6: ??? (in /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.10.0)
==86996==    by 0x4D1A42: GAGCore::GraphicContext::GraphicContext(int, int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) (GraphicContext.cpp:1974)
==86996==    by 0x506E5C: GAGCore::Toolkit::initGraphic(int, int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) (Toolkit.cpp:55)
==86996==    by 0x29DB7B: GlobalContainer::loadClient() (GlobalContainer.cpp:511)
==86996==    by 0x29F600: GlobalContainer::load() (GlobalContainer.cpp:645)
==86996==    by 0x294F66: Glob2::run(int, char**) (Glob2.cpp:219)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,617 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32A26E: void NativeValuePrototype<GameGUI*>::addMethod<bool (GameGUI*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<bool (GameGUI*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)> const&) (native.h:47)
==86996==    by 0x326CDE: NativeValuePrototype<GameGUI*>::initialize() (MapScriptUSL.cpp:48)
==86996==    by 0x32E969: NativeValuePrototype<GameGUI*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x3255C4: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,618 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32A18C: void NativeValuePrototype<GameGUI*>::addMethod<void (GameGUI*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (GameGUI*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)> const&) (native.h:47)
==86996==    by 0x326EDF: NativeValuePrototype<GameGUI*>::initialize() (MapScriptUSL.cpp:57)
==86996==    by 0x32E969: NativeValuePrototype<GameGUI*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x3255C4: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,619 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32A514: void NativeValuePrototype<GameGUI*>::addMethod<void (GameGUI*)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (GameGUI*)> const&) (native.h:47)
==86996==    by 0x327035: NativeValuePrototype<GameGUI*>::initialize() (MapScriptUSL.cpp:59)
==86996==    by 0x32E969: NativeValuePrototype<GameGUI*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x3255C4: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,620 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32A5F6: void NativeValuePrototype<Game*>::addMethod<int (Game*)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<int (Game*)> const&) (native.h:47)
==86996==    by 0x32749D: NativeValuePrototype<Game*>::initialize() (MapScriptUSL.cpp:65)
==86996==    by 0x32E9D1: NativeValuePrototype<Game*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x32560B: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,621 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32A6D8: void NativeValuePrototype<Game*>::addMethod<bool (Game*, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<bool (Game*, int)> const&) (native.h:47)
==86996==    by 0x327548: NativeValuePrototype<Game*>::initialize() (MapScriptUSL.cpp:66)
==86996==    by 0x32E9D1: NativeValuePrototype<Game*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x32560B: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,622 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32AA60: void NativeValuePrototype<GameHints*>::addMethod<int (GameHints*)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<int (GameHints*)> const&) (native.h:47)
==86996==    by 0x3279C3: NativeValuePrototype<GameHints*>::initialize() (MapScriptUSL.cpp:78)
==86996==    by 0x32EA39: NativeValuePrototype<GameHints*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x325652: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,623 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32AB42: void NativeValuePrototype<GameHints*>::addMethod<void (GameHints*, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (GameHints*, int)> const&) (native.h:47)
==86996==    by 0x327A6E: NativeValuePrototype<GameHints*>::initialize() (MapScriptUSL.cpp:80)
==86996==    by 0x32EA39: NativeValuePrototype<GameHints*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x325652: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,624 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32AB42: void NativeValuePrototype<GameHints*>::addMethod<void (GameHints*, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (GameHints*, int)> const&) (native.h:47)
==86996==    by 0x327B08: NativeValuePrototype<GameHints*>::initialize() (MapScriptUSL.cpp:81)
==86996==    by 0x32EA39: NativeValuePrototype<GameHints*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x325652: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,625 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32AC24: void NativeValuePrototype<GameHints*>::addMethod<bool (GameHints*, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<bool (GameHints*, int)> const&) (native.h:47)
==86996==    by 0x327BA2: NativeValuePrototype<GameHints*>::initialize() (MapScriptUSL.cpp:83)
==86996==    by 0x32EA39: NativeValuePrototype<GameHints*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x325652: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,626 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32AD06: void NativeValuePrototype<GameObjectives*>::addMethod<int (GameObjectives*)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<int (GameObjectives*)> const&) (native.h:47)
==86996==    by 0x327E45: NativeValuePrototype<GameObjectives*>::initialize() (MapScriptUSL.cpp:89)
==86996==    by 0x32EAA1: NativeValuePrototype<GameObjectives*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x325699: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,627 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32ADE8: void NativeValuePrototype<GameObjectives*>::addMethod<void (GameObjectives*, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (GameObjectives*, int)> const&) (native.h:47)
==86996==    by 0x327EE2: NativeValuePrototype<GameObjectives*>::initialize() (MapScriptUSL.cpp:91)
==86996==    by 0x32EAA1: NativeValuePrototype<GameObjectives*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x325699: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,628 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32ADE8: void NativeValuePrototype<GameObjectives*>::addMethod<void (GameObjectives*, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (GameObjectives*, int)> const&) (native.h:47)
==86996==    by 0x327F7F: NativeValuePrototype<GameObjectives*>::initialize() (MapScriptUSL.cpp:92)
==86996==    by 0x32EAA1: NativeValuePrototype<GameObjectives*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x325699: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,629 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32ADE8: void NativeValuePrototype<GameObjectives*>::addMethod<void (GameObjectives*, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (GameObjectives*, int)> const&) (native.h:47)
==86996==    by 0x32802D: NativeValuePrototype<GameObjectives*>::initialize() (MapScriptUSL.cpp:93)
==86996==    by 0x32EAA1: NativeValuePrototype<GameObjectives*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x325699: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,630 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32ADE8: void NativeValuePrototype<GameObjectives*>::addMethod<void (GameObjectives*, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (GameObjectives*, int)> const&) (native.h:47)
==86996==    by 0x3280DB: NativeValuePrototype<GameObjectives*>::initialize() (MapScriptUSL.cpp:94)
==86996==    by 0x32EAA1: NativeValuePrototype<GameObjectives*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x325699: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,631 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32ADE8: void NativeValuePrototype<GameObjectives*>::addMethod<void (GameObjectives*, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (GameObjectives*, int)> const&) (native.h:47)
==86996==    by 0x328186: NativeValuePrototype<GameObjectives*>::initialize() (MapScriptUSL.cpp:95)
==86996==    by 0x32EAA1: NativeValuePrototype<GameObjectives*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x325699: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,632 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32AECA: void NativeValuePrototype<GameObjectives*>::addMethod<bool (GameObjectives*, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<bool (GameObjectives*, int)> const&) (native.h:47)
==86996==    by 0x328231: NativeValuePrototype<GameObjectives*>::initialize() (MapScriptUSL.cpp:97)
==86996==    by 0x32EAA1: NativeValuePrototype<GameObjectives*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x325699: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,633 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32AECA: void NativeValuePrototype<GameObjectives*>::addMethod<bool (GameObjectives*, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<bool (GameObjectives*, int)> const&) (native.h:47)
==86996==    by 0x3282DC: NativeValuePrototype<GameObjectives*>::initialize() (MapScriptUSL.cpp:98)
==86996==    by 0x32EAA1: NativeValuePrototype<GameObjectives*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x325699: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,634 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32AECA: void NativeValuePrototype<GameObjectives*>::addMethod<bool (GameObjectives*, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<bool (GameObjectives*, int)> const&) (native.h:47)
==86996==    by 0x328387: NativeValuePrototype<GameObjectives*>::initialize() (MapScriptUSL.cpp:99)
==86996==    by 0x32EAA1: NativeValuePrototype<GameObjectives*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x325699: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,635 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32AFAC: void NativeValuePrototype<GameObjectives*>::addMethod<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (GameObjectives*, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (GameObjectives*, int)> const&) (native.h:47)
==86996==    by 0x328432: NativeValuePrototype<GameObjectives*>::initialize() (MapScriptUSL.cpp:101)
==86996==    by 0x32EAA1: NativeValuePrototype<GameObjectives*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x325699: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,636 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32B08E: void NativeValuePrototype<GameObjectives*>::addMethod<int (GameObjectives*, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<int (GameObjectives*, int)> const&) (native.h:47)
==86996==    by 0x3284DD: NativeValuePrototype<GameObjectives*>::initialize() (MapScriptUSL.cpp:102)
==86996==    by 0x32EAA1: NativeValuePrototype<GameObjectives*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x325699: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,637 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32938C: void NativeValuePrototype<int>::addMethod<int (int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<int (int)> const&) (native.h:47)
==86996==    by 0x32606F: NativeValuePrototype<int>::initialize() (native.h:302)
==86996==    by 0x34B055: NativeValuePrototype<int>::NativeValuePrototype() (native.h:34)
==86996==    by 0x32570C: __static_initialization_and_destruction_1(int, int) (native.h:70)
==86996==    by 0x32579C: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,638 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x329608: void NativeValuePrototype<int>::addMethod<int (int, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<int (int, int)> const&) (native.h:47)
==86996==    by 0x326102: NativeValuePrototype<int>::initialize() (native.h:303)
==86996==    by 0x34B055: NativeValuePrototype<int>::NativeValuePrototype() (native.h:34)
==86996==    by 0x32570C: __static_initialization_and_destruction_1(int, int) (native.h:70)
==86996==    by 0x32579C: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,639 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x329608: void NativeValuePrototype<int>::addMethod<int (int, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<int (int, int)> const&) (native.h:47)
==86996==    by 0x326195: NativeValuePrototype<int>::initialize() (native.h:304)
==86996==    by 0x34B055: NativeValuePrototype<int>::NativeValuePrototype() (native.h:34)
==86996==    by 0x32570C: __static_initialization_and_destruction_1(int, int) (native.h:70)
==86996==    by 0x32579C: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,640 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x329608: void NativeValuePrototype<int>::addMethod<int (int, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<int (int, int)> const&) (native.h:47)
==86996==    by 0x326228: NativeValuePrototype<int>::initialize() (native.h:305)
==86996==    by 0x34B055: NativeValuePrototype<int>::NativeValuePrototype() (native.h:34)
==86996==    by 0x32570C: __static_initialization_and_destruction_1(int, int) (native.h:70)
==86996==    by 0x32579C: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,641 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x329A6A: void NativeValuePrototype<int>::addMethod<bool (int, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<bool (int, int)> const&) (native.h:47)
==86996==    by 0x3262BB: NativeValuePrototype<int>::initialize() (native.h:306)
==86996==    by 0x34B055: NativeValuePrototype<int>::NativeValuePrototype() (native.h:34)
==86996==    by 0x32570C: __static_initialization_and_destruction_1(int, int) (native.h:70)
==86996==    by 0x32579C: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,642 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x329A6A: void NativeValuePrototype<int>::addMethod<bool (int, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<bool (int, int)> const&) (native.h:47)
==86996==    by 0x32634E: NativeValuePrototype<int>::initialize() (native.h:307)
==86996==    by 0x34B055: NativeValuePrototype<int>::NativeValuePrototype() (native.h:34)
==86996==    by 0x32570C: __static_initialization_and_destruction_1(int, int) (native.h:70)
==86996==    by 0x32579C: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,643 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x329A6A: void NativeValuePrototype<int>::addMethod<bool (int, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<bool (int, int)> const&) (native.h:47)
==86996==    by 0x3263E1: NativeValuePrototype<int>::initialize() (native.h:308)
==86996==    by 0x34B055: NativeValuePrototype<int>::NativeValuePrototype() (native.h:34)
==86996==    by 0x32570C: __static_initialization_and_destruction_1(int, int) (native.h:70)
==86996==    by 0x32579C: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,644 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x329A6A: void NativeValuePrototype<int>::addMethod<bool (int, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<bool (int, int)> const&) (native.h:47)
==86996==    by 0x326474: NativeValuePrototype<int>::initialize() (native.h:309)
==86996==    by 0x34B055: NativeValuePrototype<int>::NativeValuePrototype() (native.h:34)
==86996==    by 0x32570C: __static_initialization_and_destruction_1(int, int) (native.h:70)
==86996==    by 0x32579C: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,645 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x329A6A: void NativeValuePrototype<int>::addMethod<bool (int, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<bool (int, int)> const&) (native.h:47)
==86996==    by 0x326507: NativeValuePrototype<int>::initialize() (native.h:310)
==86996==    by 0x34B055: NativeValuePrototype<int>::NativeValuePrototype() (native.h:34)
==86996==    by 0x32570C: __static_initialization_and_destruction_1(int, int) (native.h:70)
==86996==    by 0x32579C: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 432 (104 direct, 328 indirect) bytes in 1 blocks are definitely lost in loss record 1,646 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x329A6A: void NativeValuePrototype<int>::addMethod<bool (int, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<bool (int, int)> const&) (native.h:47)
==86996==    by 0x32659A: NativeValuePrototype<int>::initialize() (native.h:311)
==86996==    by 0x34B055: NativeValuePrototype<int>::NativeValuePrototype() (native.h:34)
==86996==    by 0x32570C: __static_initialization_and_destruction_1(int, int) (native.h:70)
==86996==    by 0x32579C: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 449 (104 direct, 345 indirect) bytes in 1 blocks are definitely lost in loss record 1,647 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32A350: void NativeValuePrototype<GameGUI*>::addMethod<void (GameGUI*, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (GameGUI*, int)> const&) (native.h:47)
==86996==    by 0x326D89: NativeValuePrototype<GameGUI*>::initialize() (MapScriptUSL.cpp:49)
==86996==    by 0x32E969: NativeValuePrototype<GameGUI*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x3255C4: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 450 (104 direct, 346 indirect) bytes in 1 blocks are definitely lost in loss record 1,648 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32A26E: void NativeValuePrototype<GameGUI*>::addMethod<bool (GameGUI*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<bool (GameGUI*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)> const&) (native.h:47)
==86996==    by 0x326AD7: NativeValuePrototype<GameGUI*>::initialize() (MapScriptUSL.cpp:45)
==86996==    by 0x32E969: NativeValuePrototype<GameGUI*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x3255C4: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 450 (104 direct, 346 indirect) bytes in 1 blocks are definitely lost in loss record 1,649 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32A18C: void NativeValuePrototype<GameGUI*>::addMethod<void (GameGUI*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (GameGUI*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)> const&) (native.h:47)
==86996==    by 0x326B85: NativeValuePrototype<GameGUI*>::initialize() (MapScriptUSL.cpp:46)
==86996==    by 0x32E969: NativeValuePrototype<GameGUI*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x3255C4: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 450 (104 direct, 346 indirect) bytes in 1 blocks are definitely lost in loss record 1,650 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32A350: void NativeValuePrototype<GameGUI*>::addMethod<void (GameGUI*, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (GameGUI*, int)> const&) (native.h:47)
==86996==    by 0x326E34: NativeValuePrototype<GameGUI*>::initialize() (MapScriptUSL.cpp:50)
==86996==    by 0x32E969: NativeValuePrototype<GameGUI*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x3255C4: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 451 (104 direct, 347 indirect) bytes in 1 blocks are definitely lost in loss record 1,651 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32A18C: void NativeValuePrototype<GameGUI*>::addMethod<void (GameGUI*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (GameGUI*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)> const&) (native.h:47)
==86996==    by 0x326C33: NativeValuePrototype<GameGUI*>::initialize() (MapScriptUSL.cpp:47)
==86996==    by 0x32E969: NativeValuePrototype<GameGUI*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x3255C4: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 454 (104 direct, 350 indirect) bytes in 1 blocks are definitely lost in loss record 1,652 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32A18C: void NativeValuePrototype<GameGUI*>::addMethod<void (GameGUI*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (GameGUI*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)> const&) (native.h:47)
==86996==    by 0x32699D: NativeValuePrototype<GameGUI*>::initialize() (MapScriptUSL.cpp:43)
==86996==    by 0x32E969: NativeValuePrototype<GameGUI*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x3255C4: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 455 (104 direct, 351 indirect) bytes in 1 blocks are definitely lost in loss record 1,653 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32A18C: void NativeValuePrototype<GameGUI*>::addMethod<void (GameGUI*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (GameGUI*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)> const&) (native.h:47)
==86996==    by 0x326A3A: NativeValuePrototype<GameGUI*>::initialize() (MapScriptUSL.cpp:44)
==86996==    by 0x32E969: NativeValuePrototype<GameGUI*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x3255C4: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 656 (104 direct, 552 indirect) bytes in 1 blocks are definitely lost in loss record 1,665 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32A7BA: void NativeValuePrototype<Game*>::addMethod<int (Game*, int, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<int (Game*, int, int)> const&) (native.h:47)
==86996==    by 0x3275F3: NativeValuePrototype<Game*>::initialize() (MapScriptUSL.cpp:68)
==86996==    by 0x32E9D1: NativeValuePrototype<Game*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x32560B: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 673 (104 direct, 569 indirect) bytes in 1 blocks are definitely lost in loss record 1,670 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32A432: void NativeValuePrototype<GameGUI*>::addMethod<void (GameGUI*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (GameGUI*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)> const&) (native.h:47)
==86996==    by 0x326F8A: NativeValuePrototype<GameGUI*>::initialize() (MapScriptUSL.cpp:58)
==86996==    by 0x32E969: NativeValuePrototype<GameGUI*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x3255C4: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 720 (104 direct, 616 indirect) bytes in 1 blocks are definitely lost in loss record 1,672 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32A97E: void NativeValuePrototype<Game*>::addMethod<int (Game*, int, int, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<int (Game*, int, int, int)> const&) (native.h:47)
==86996==    by 0x327727: NativeValuePrototype<Game*>::initialize() (MapScriptUSL.cpp:70)
==86996==    by 0x32E9D1: NativeValuePrototype<Game*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x32560B: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 803 (104 direct, 699 indirect) bytes in 1 blocks are definitely lost in loss record 1,675 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x517C7E: methodMember(ScopePrototype*) (code.cpp:23)
==86996==    by 0x51F40B: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x32A89C: void NativeValuePrototype<Game*>::addMethod<int (Game*, int, int, int, int)>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<int (Game*, int, int, int, int)> const&) (native.h:47)
==86996==    by 0x32768D: NativeValuePrototype<Game*>::initialize() (MapScriptUSL.cpp:69)
==86996==    by 0x32E9D1: NativeValuePrototype<Game*>::NativeValuePrototype() (native.h:34)
==86996==    by 0x32560B: __static_initialization_and_destruction_0(int, int) (native.h:70)
==86996==    by 0x32578D: _GLOBAL__sub_I_MapScriptUSL.cpp (MapScriptUSL.cpp:239)
==86996==    by 0x52FAEC: __libc_csu_init (in /home/steph/data/project-perso/globulation/2.0/glob2/build/src/glob2)
==86996==    by 0x4F3803F: (below main) (libc-start.c:264)
==86996== 
==86996== 2,000 bytes in 1 blocks are definitely lost in loss record 1,685 of 1,704
==86996==    at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x4A5C256: speex_bits_init (in /usr/lib/x86_64-linux-gnu/libspeex.so.1.5.0)
==86996==    by 0x427A78: VoiceRecorder::VoiceRecorder() (VoiceRecorder.cpp:371)
==86996==    by 0x29DF57: GlobalContainer::loadClient() (GlobalContainer.cpp:531)
==86996==    by 0x29F600: GlobalContainer::load() (GlobalContainer.cpp:645)
==86996==    by 0x294F66: Glob2::run(int, char**) (Glob2.cpp:219)
==86996==    by 0x295A75: main (Glob2.cpp:439)
==86996== 
==86996== 2,584 (72 direct, 2,512 indirect) bytes in 1 blocks are definitely lost in loss record 1,688 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x5210BB: __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ThunkPrototype*> > >::allocate(unsigned long, void const*) (new_allocator.h:114)
==86996==    by 0x520F80: std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ThunkPrototype*> > > >::allocate(std::allocator<std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ThunkPrototype*> > >&, unsigned long) (alloc_traits.h:444)
==86996==    by 0x520BE2: std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ThunkPrototype*>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ThunkPrototype*> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ThunkPrototype*> > >::_M_get_node() (stl_tree.h:580)
==86996==    by 0x5205B8: std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ThunkPrototype*> >* std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ThunkPrototype*>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ThunkPrototype*> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ThunkPrototype*> > >::_M_create_node<std::piecewise_construct_t const&, std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>, std::tuple<> >(std::piecewise_construct_t const&, std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>&&, std::tuple<>&&) (stl_tree.h:630)
==86996==    by 0x52031A: std::_Rb_tree_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ThunkPrototype*> > std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ThunkPrototype*>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ThunkPrototype*> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ThunkPrototype*> > >::_M_emplace_hint_unique<std::piecewise_construct_t const&, std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>, std::tuple<> >(std::_Rb_tree_const_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ThunkPrototype*> >, std::piecewise_construct_t const&, std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>&&, std::tuple<>&&) (stl_tree.h:2455)
==86996==    by 0x51FF75: std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ThunkPrototype*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, ThunkPrototype*> > >::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (stl_map.h:499)
==86996==    by 0x51F3FC: Prototype::addMethod(NativeCode*) (types.cpp:36)
==86996==    by 0x52176A: Usl::Usl() (usl.cpp:105)
==86996==    by 0x32496C: MapScriptUSL::MapScriptUSL(GameGUI*) (MapScriptUSL.cpp:115)
==86996==    by 0x323D6B: MapScript::MapScript(GameGUI*) (MapScript.cpp:27)
==86996==    by 0x22CF7D: Game::Game(GameGUI*, MapEdit*) (Game.cpp:68)
==86996== 
==86996== 3,016 (112 direct, 2,904 indirect) bytes in 2 blocks are definitely lost in loss record 1,690 of 1,704
==86996==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==86996==    by 0x521815: Usl::Usl() (usl.cpp:108)
==86996==    by 0x32496C: MapScriptUSL::MapScriptUSL(GameGUI*) (MapScriptUSL.cpp:115)
==86996==    by 0x323D6B: MapScript::MapScript(GameGUI*) (MapScript.cpp:27)
==86996==    by 0x22CF7D: Game::Game(GameGUI*, MapEdit*) (Game.cpp:68)
==86996==    by 0x243ADE: GameGUI::GameGUI() (GameGUI.cpp:185)
==86996==    by 0x21B293: Engine::Engine() (Engine.cpp:49)
==86996==    by 0x295594: Glob2::run(int, char**) (Glob2.cpp:341)
==86996==    by 0x295A75: main (Glob2.cpp:439)

boost/math/common_factor.hpp is deprecated

When compiling Globulation 2 master-0.9.5.0-7c23bf87 with GCC 12.2.0 on MSYS2 Mingw64 shell, the Boost header math/common.factor.hpp tells me that it is deprecated and to use integer/common_factor.hpp instead. The version of Boost I have installed in MSYS2 is mingw-w64-x86_64-boost 1.81.0-6.

In file included from D:/msys64/mingw64/include/boost/config/header_deprecated.hpp:18,
                 from D:/msys64/mingw64/include/boost/math/tools/header_deprecated.hpp:11,
                 from D:/msys64/mingw64/include/boost/math/common_factor_ct.hpp:15,
                 from D:/msys64/mingw64/include/boost/math/common_factor.hpp:14,
                 from src/MapGenerator.cpp:26:
D:/msys64/mingw64/include/boost/math/common_factor_ct.hpp:17:1: note: '#pragma message: This header
is deprecated. Use <boost/integer/common_factor_ct.hpp> instead.'
   17 | BOOST_MATH_HEADER_DEPRECATED("<boost/integer/common_factor_ct.hpp>");
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/msys64/mingw64/include/boost/math/common_factor_rt.hpp:14:1: note: '#pragma message: This header
is deprecated. Use <boost/integer/common_factor_rt.hpp> instead.'
   14 | BOOST_MATH_HEADER_DEPRECATED("<boost/integer/common_factor_rt.hpp>");
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:/msys64/mingw64/include/boost/math/common_factor.hpp:18:1: note: '#pragma message: This header is
deprecated. Use <boost/integer/common_factor.hpp> instead.'
   18 | BOOST_MATH_HEADER_DEPRECATED("<boost/integer/common_factor.hpp>");
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Confusing if statement in AIWarrush.cpp

Around line 148 of src/AIWarrush.cpp, there is a confusing if statement. It gives several warnings when compiled with GCC 12.2 on MSys2 Mingw 64-bit, one for each line. Maybe the condition was supposed to check that the building's type was not a building that doesn't need workers. The types of building it checks (hospital, inn, swimming pool, barracks, school) don't need workers unless the building is currently under construction or being upgraded.

src/AIWarrush.cpp: In member function 'Building* AIWarrush::getBuildingWithoutWorkersAssigned(Sint32, int) const':
src/AIWarrush.cpp:152:83: warning: comparison of constant 'IntBuildingType::ATTACK_BUILDING' with boolean expression is always true [-Wbool-compare]
  152 |                                         || ((b->type->shortTypeNum==shortTypeNum) != (IntBuildingType::ATTACK_BUILDING)
      |                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/AIWarrush.cpp:153:90: warning: comparison of constant 'IntBuildingType::HEAL_BUILDING' with boolean expression is always true [-Wbool-compare]
  153 |                                                 && (b->type->shortTypeNum==shortTypeNum) != (IntBuildingType::HEAL_BUILDING)
      |                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/AIWarrush.cpp:154:90: warning: comparison of constant 'IntBuildingType::WALKSPEED_BUILDING' with boolean expression is always true [-Wbool-compare]
  154 |                                                 && (b->type->shortTypeNum==shortTypeNum) != (IntBuildingType::WALKSPEED_BUILDING)
      |                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/AIWarrush.cpp:155:90: warning: comparison of constant 'IntBuildingType::SWIMSPEED_BUILDING' with boolean expression is always true [-Wbool-compare]
  155 |                                                 && (b->type->shortTypeNum==shortTypeNum) != (IntBuildingType::SWIMSPEED_BUILDING)
      |                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/AIWarrush.cpp:156:90: warning: comparison of constant 'IntBuildingType::SCIENCE_BUILDING' with boolean expression is always true [-Wbool-compare]
  156 |                                                 && (b->type->shortTypeNum==shortTypeNum) != (IntBuildingType::SCIENCE_BUILDING)
      |                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.