Trunk discussion / complains

OK, thanks! I’ve added both patterns.

Revision r3372 finishes fixing issues with serialization in client — now the player interfaces including AI can seamlessly save their state (including pointers to parts of gamestate).

Finally VCAI won’t be reset after game load. That should make much easier to reproduce crashes with VCAI. There may be some ne wbugs related to saving/loading, let me know if you find something.

PS. Made the thread sticky.

I have detected a bug in the serialization API. When a container is being de-serialized, the initial state of the container isn’t cleared. E.g. a map can contain 100 entries by default(class c-tor), so de-serialization should clear the container first. Boost serializer cleans/resizes containers first as well when de-serializing.
This affects: map, set, list (can be incomplete)

Can I change this or could it be possible that new bugs get introduced? Currently there is a critical bug in starting a RMG map because of this.

Ok, I am not aware of any code depending on the current behaviour.

Right now I have quite weird bug in my build - all creatures have 0 damage in stats and deal only 1 damage in attack.

Does anybody else have this problem with current trunk? Or this is problem on my side? I’m sure it was OK just a week ago.

Confirmed.

Creature damage is handled by bonus system, so it may be bug in itself or some related processing (serialization?), or just parser bug. Will investigate latest commits.

My fault, bug was introduced in the recent selector rewrite. Fixed in r3437.

After latest changes in filesystem the game couldn’t even compile (issues with unique_ptr copying and more). I managed to fix that, but now game doesn’t even launch - can’t find a single file.

07:32:19 INFO global [1a1c] - Creating console 0
07:32:19 INFO global [1a1c] - 	 Initialization: 40
07:32:19 INFO global [1a1c] - 	 Data loading: 8
07:32:19 INFO global [1a1c] - 	Mod handler: 1
07:32:19 WARN global [1a1c] - 		 Directory man at arms castle does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory iconsbig does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory centamonths does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory cove-town does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory cove-heroes does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory cove-creatures does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory grove-creatures does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory forge-town does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory forge-heroes does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory grove-heroes does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory grove-town does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory preserve-creatures does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory dark elemental does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory diablo2 does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory forge-creatures does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory vcmi itemy kuririn does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory h4 arts - commander does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory h4 arts - hero does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory heroes4arts witchking does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory mountain dwarf does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory new-menu does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory nowy folder does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory preserve-heroes does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory preserve-town does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory schowek does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory unlucky does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory vcmi does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory witchking-arts does not contains VCMI mod
07:32:19 WARN global [1a1c] - 		 Directory wog does not contains VCMI mod
07:32:19 INFO global [1a1c] - 	 Mod filesystems: 69
07:32:19 INFO global [1a1c] - Basic initialization: 120
07:32:19 INFO global [1a1c] - Initialized logging system based on settings successfully.
07:32:19 ERROR global [1a1c] - Error: Heroes III data was not found!
07:32:19 INFO global [1a1c] - Killing console...
07:32:19 INFO global [1a1c] - Killing console... done!

That’s strange. Can you recheck this with latest trunk (rev 3478) and upload full log file if the problem remains.

Well yes, it helped when I updated filesystem.json :stuck_out_tongue:

It stil crashes, however, at the line I fixed yesterday

std::string realVideoFilename = CResourceHandler::get()->getResourceName(videoID).get();

Without .get() it wouldn’t even compile. Still, something is wrong as video does not get initialized.
VCMI_Client_log.txt (11.5 KB)

Files in archives don’t have full filename that can be accessed, should be fixed now. I can’t test video player myself - Win-specific code but it should work.

Will someone make trunk compilable on VS2012? Some proj files need to be updated.

Errors at compilation r3481:

That’s strange.
What version of zlib you’re using?
Can you upload your versions of zlib.h and zlibconf.h (usually located at /usr/include/)

I use zlib-1.2.7. zlibconf doesn’t exist in my system.
zlib.h.gz (23.2 KB)

Found it. Should be fixed now.

no love for VS2012 :(. Still not compilable…

Oh - forgot to ask: is music works correctly right now? I’ve changed that code a bit to allow reading music from archives (like .zip).

Because if SDL_Mixer documentation is correct it should not. But for me it works and SDL_Mixer code seems to support that.

Cann’t compile r3490:

Does r3492 solves this issue?

Yes, it works for me.