Could not save the game every turn in multiplayer (1.11.16)

Having trouble with the game? Report issues and get help here. Read this first!

Moderators: Forum Moderators, Developers

Forum rules
Before reporting issues in this section, you must read the following topic:
User avatar
Pentarctagon
Forum Administrator
Posts: 4091
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Could not save the game every turn in multiplayer (1.11.

Post by Pentarctagon » October 21st, 2014, 1:51 am

gfgtdf wrote:
Pentarctagon wrote: This did fix it for me.
Im happy that fixed it, actualy im a little surpired that it fxed it since after a discussion it loonycyborg yesterday i thought the cause might be simething diffetn still.
err... it actually didn't fix it, sorry. I had to change the directory áÇØßÜ to a name with normal ascii characters to compile* and forgot to change it back before starting wesnoth :oops:

*Apparently windows redirection, which I was using the generate the .scons-option-cache file, can't deal with those characters. It turns áÇØßÜ into  €Oáš , so scons can't find the directory. Removing that piece and hard-coding the .scons-option-cache then causes scons to fail with a UnicodeDecodeError.
gfgtdf wrote:
Pentarctagon wrote: Wesnoth started and the only things in the stderr were a bunch of the "warning replay: MP synchronization called during an unsynced context.<timestamp>" warnings that have been there forever.
This warning incicates potential sources of oos.
Especialy if comes if you do one of the following things:
1) using [get_global_variable], [message] with options or luas wesnoth.syncronize_choice during prestart events
2) using [get_global_variable], [message] with options or luas wesnoth.syncronize_choice during select events
3) using [get_global_variable], [message] with options or luas wesnoth.syncronize_choice during victory events.
If yes that thats the cause of these messages and you don't have to worry if you dot get OOS
If no you miight have found a bug in wesnoth.

Especialy 3) Is not a real cause of oos since the game is already over duing vicroy events.
If this warning has too many false positives we can simply remove it from 1.12.
I have:

a wesnoth.syncronize_choice in a [option]/[command] inside a [set_menu_item] created in a start event.
a bunch of [get_global_variable] in a preload event.
a bunch of [get_global_variable] in a [option]/[command] inside a [set_menu_item] created in a turn 1 event.

which results in this when starting a local game:
Spoiler:
At there very least it looks like a line break is missing somewhere. Honestly I wasn't that surprised to get the warnings. I know that, for example, trying to start a multiplayer game with global variables in a preload event will cause it to close back to the lobby. It was more that I was getting them in single player where there can't possibly be any out of sync issues.

Also, starting a match on Aethermaw gives this additional error:

Code: Select all

20141020 20:42:04 error display: could not open image 'units/undead-skeletal/revenant-attack-4.png'
where the image path should instead be:

Code: Select all

units/undead-skeletal/revenant/revenant-attack-4.png
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

gfgtdf
Developer
Posts: 1202
Joined: February 10th, 2013, 2:25 pm

Re: Could not save the game every turn in multiplayer (1.11.

Post by gfgtdf » October 21st, 2014, 2:23 pm

Pentarctagon wrote:
err... it actually didn't fix it, sorry. I had to change the directory áÇØßÜ to a name with normal ascii characters to compile* and forgot to change it back before starting wesnoth :oops:
I added some more logs to my pr https://github.com/wesnoth/wesnoth/pull/305 in https://github.com/gfgtdf/wesnoth-old/c ... bd2e9efad0. Could you please test (no special debuginfo needed for this one) with these commits, and show thr content of stderr.txt?
Pentarctagon wrote: *Apparently windows redirection, which I was using the generate the .scons-option-cache file, can't deal with those characters. It turns áÇØßÜ into  €Oáš , so scons can't find the directory. Removing that piece and hard-coding the .scons-option-cache then causes scons to fail with a UnicodeDecodeError.

I have:

a wesnoth.syncronize_choice in a [option]/[command] inside a [set_menu_item] created in a start event.
a bunch of [get_global_variable] in a preload event.
a bunch of [get_global_variable] in a [option]/[command] inside a [set_menu_item] created in a turn 1 event.

which results in this when starting a local game:
Spoiler:
At there very least it looks like a line break is missing somewhere. Honestly I wasn't that surprised to get the warnings. I know that, for example, trying to start a multiplayer game with global variables in a preload event will cause it to close back to the lobby. It was more that I was getting them in single player where there can't possibly be any out of sync issues.
yes the "a bunch of [get_global_variable] in a preload event." is most likeley that cause. What creates OOS in mp usualy creates corrupt replays in sp.
Pentarctagon wrote: Also, starting a match on Aethermaw gives this additional error:

Code: Select all

20141020 20:42:04 error display: could not open image 'units/undead-skeletal/revenant-attack-4.png'
where the image path should instead be:

Code: Select all

units/undead-skeletal/revenant/revenant-attack-4.png
maybe this commit: https://github.com/wesnoth/wesnoth/comm ... 23199b93fd forgot some occurances?
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.

User avatar
Pentarctagon
Forum Administrator
Posts: 4091
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Could not save the game every turn in multiplayer (1.11.

Post by Pentarctagon » October 21st, 2014, 11:56 pm

gfgtdf wrote:I added some more logs to my pr https://github.com/wesnoth/wesnoth/pull/305 in https://github.com/gfgtdf/wesnoth-old/c ... bd2e9efad0. Could you please test (no special debuginfo needed for this one) with these commits, and show thr content of stderr.txt?

Code: Select all

Automatically found a possible data directory at S:/áÇØßÜ/Battle_for_Wesnoth_1.13
20141021 18:46:21 error general: Invalid UTF-8 string: "S:\<xE1xC7xD8xDFxDC>\Battle_for_Wesnoth_1.13\wesnoth.exe"
20141021 18:46:21 error filesystem: couldn't create path from 'S:\<xE1xC7xD8xDFxDC>\Battle_for_Wesnoth_1.13\wesnoth.exe' size = 44 is is_valid_utf8 = 1
Caught general exception:
boost::filesystem::path codecvt to wstring: error
The path in the two error messages didn't display right in my browser, so I replaced that part with how it appeared in notepad++ between the <>.
gfgtdf wrote:yes the "a bunch of [get_global_variable] in a preload event." is most likeley that cause. What creates OOS in mp usualy creates corrupt replays in sp.
Well, I'm not worried about replays, so there's no problem for me I guess.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

Max
Posts: 1449
Joined: April 13th, 2008, 12:41 am

Re: Could not save the game every turn in multiplayer (1.11.

Post by Max » October 22nd, 2014, 6:56 am

i wonder if this is the same issue i had when testing an early patch for this problem:
https://gna.org/patch/?func=detailitem& ... 1#comment1

gfgtdf
Developer
Posts: 1202
Joined: February 10th, 2013, 2:25 pm

Re: Could not save the game every turn in multiplayer (1.11.

Post by gfgtdf » October 23rd, 2014, 1:02 am

i updated https://github.com/wesnoth/wesnoth/pull/305 again hoping to have fixed that issue.

@Max out current plan to fix the proem is to never use ansi and use utf16 on windows and utf8 on linux. The main task is currently to elimiate all our uses of winapi functions that work with ansi strings.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.

User avatar
Pentarctagon
Forum Administrator
Posts: 4091
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Could not save the game every turn in multiplayer (1.11.

Post by Pentarctagon » October 23rd, 2014, 2:13 am

gfgtdf wrote:i updated https://github.com/wesnoth/wesnoth/pull/305 again hoping to have fixed that issue.

@Max out current plan to fix the proem is to never use ansi and use utf16 on windows and utf8 on linux. The main task is currently to elimiate all our uses of winapi functions that work with ansi strings.
Do I just need to update filesystem_boost.cpp again, or all the files?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

gfgtdf
Developer
Posts: 1202
Joined: February 10th, 2013, 2:25 pm

Re: Could not save the game every turn in multiplayer (1.11.

Post by gfgtdf » October 23rd, 2014, 12:53 pm

no you need to update all the files in the pr (thats 27 files currently) (there is onew commits that just changes some include orders which could be ommiited but i dont think that'd make it easier)

EDIT: the pr is now merged into master.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.

User avatar
Pentarctagon
Forum Administrator
Posts: 4091
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Could not save the game every turn in multiplayer (1.11.

Post by Pentarctagon » October 23rd, 2014, 11:47 pm

I updated and tried compiling, but get this error:

Code: Select all

'utils' is not recognized as an internal or external command,
operable program or batch file.
In file included from src\widgets/../serialization/unicode.hpp:21:0,
                 from src\widgets/textbox.hpp:18,
                 from src\construct_dialog.hpp:22,
                 from src\help.hpp:24,
                 from src\wesnoth.cpp:34:
src\widgets/../serialization/ucs4_convert_impl.hpp: In static member function 'static ucs4::char_t ucs4_convert_impl::utf16_impl::read(iitor_t&, const iitor_t&) [with iitor_t = __gnu_cxx::__normal_iterator<const wchar_t*, std::basic_string<wchar_t> >, ucs4::char_t = unsigned int]':
src\widgets/../serialization/unicode_cast.hpp:76:4:   instantiated from 'typename ucs4_convert_impl::enableif<TD, typename TS::value_type>::type unicode_cast(const TS&) [with TD = std::basic_string<char>, TS = std::basic_string<wchar_t>, typename ucs4_convert_impl::enableif<TD, typename TS::value_type>::type = std::basic_string<char>]'
src\wesnoth.cpp:874:119:   instantiated from here
src\widgets/../serialization/ucs4_convert_impl.hpp:165:4: warning: comparison between signed and unsigned integer expressions
src\widgets/../serialization/ucs4_convert_impl.hpp:170:9: warning: comparison between signed and unsigned integer expressions
scons_dependencies\boost_1_56_0/boost/lexical_cast.hpp: In member function 'virtual void ai::protect_goal::on_create()':
scons_dependencies\boost_1_56_0/boost/lexical_cast.hpp:2314:16: warning: 'result' may be used uninitialized in this function
scons_dependencies\boost_1_56_0/boost/lexical_cast.hpp:2314:16: note: 'result' was declared here
scons_dependencies\boost_1_56_0/boost/lexical_cast.hpp: In function 'ai::component* ai::find_component(ai::component*, const std::string&, ai::path_element&)':
scons_dependencies\boost_1_56_0/boost/lexical_cast.hpp:2314:16: warning: 'result' may be used uninitialized in this function
scons_dependencies\boost_1_56_0/boost/lexical_cast.hpp:2314:16: note: 'result' was declared here
In file included from scons_dependencies\boost_1_56_0/boost/program_options/value_semantic.hpp:418:0,
                 from scons_dependencies\boost_1_56_0/boost/program_options/options_description.hpp:13,
                 from src\commandline_options.hpp:19,
                 from src\commandline_options.cpp:15:
scons_dependencies\boost_1_56_0/boost/lexical_cast.hpp: In function 'void boost::program_options::validate(boost::any&, const std::vector<std::basic_string<charT> >&, T*, long int) [with T = int, charT = char]':
scons_dependencies\boost_1_56_0/boost/lexical_cast.hpp:2314:16: warning: 'result' may be used uninitialized in this function
scons_dependencies\boost_1_56_0/boost/lexical_cast.hpp:2314:16: note: 'result' was declared here
In file included from src\serialization/unicode_cast.hpp:17:0,
                 from src\game_preferences.cpp:27:
src\serialization/ucs4_convert_impl.hpp: In static member function 'static ucs4::char_t ucs4_convert_impl::utf16_impl::read(iitor_t&, const iitor_t&) [with iitor_t = __gnu_cxx::__normal_iterator<const wchar_t*, std::vector<wchar_t> >, ucs4::char_t = unsigned int]':
src\serialization/unicode_cast.hpp:76:4:   instantiated from 'typename ucs4_convert_impl::enableif<TD, typename TS::value_type>::type unicode_cast(const TS&) [with TD = std::basic_string<char>, TS = std::vector<wchar_t>, typename ucs4_convert_impl::enableif<TD, typename TS::value_type>::type = std::basic_string<char>]'
src\game_preferences.cpp:431:76:   instantiated from here
src\serialization/ucs4_convert_impl.hpp:165:4: warning: comparison between signed and unsigned integer expressions
src\serialization/ucs4_convert_impl.hpp:170:9: warning: comparison between signed and unsigned integer expressions
src\game_launcher.cpp: In member function 'bool game_launcher::play_render_image_mode()':
src\game_launcher.cpp:586:111: error: no matching function for call to 'min(long unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type)'
scons: *** [build\release\game_launcher.o] Error 1
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

User avatar
iceiceice
Developer
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Could not save the game every turn in multiplayer (1.11.

Post by iceiceice » October 24th, 2014, 12:23 am

I think actually I'm to blame for this error, in a commit from yesterday. I have now pushed a fix to master: https://github.com/wesnoth/wesnoth/comm ... e518fb330d

Edit: Also, this part

Code: Select all

'utils' is not recognized as an internal or external command,
operable program or batch file.
I think is most likely an error message from your build script, not a C++ error, although it took me a second...

User avatar
Pentarctagon
Forum Administrator
Posts: 4091
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Could not save the game every turn in multiplayer (1.11.

Post by Pentarctagon » October 24th, 2014, 4:29 am

@iceiceice: Yeah, that was a scons error that I meant to remove before posting. It compiles now though so thanks :)

@gfgtdf: Wesnoth now starts, however when starting any scenario it has this error in the stderr:

Code: Select all

20141023 23:27:43 error scripting/lua: cannot open S:/áÇØßÜ/Battle_for_Wesnoth_1.13\data\lua/helper.lua: No such file or directory
20141023 23:27:43 error scripting/lua: [string "S:/áÇØßÜ/Battle_for_Wesnoth_1.13\data\lu..."]:10: attempt to index local 'helper' (a nil value)
stack traceback:
	[string "S:/áÇØßÜ/Battle_for_Wesnoth_1.13\data\lu..."]:10: in main chunk
	[C]: in function 'dofile'
	[string "..."]:2: in main chunk
which does not occur when wesnoth is started from S:/Battle_for_Wesnoth_1.13 instead of S:/áÇØßÜ/Battle_for_Wesnoth_1.13.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

gfgtdf
Developer
Posts: 1202
Joined: February 10th, 2013, 2:25 pm

Re: Could not save the game every turn in multiplayer (1.11.

Post by gfgtdf » October 24th, 2014, 1:37 pm

Pentarctagon wrote:@iceiceice: Yeah, that was a scons error that I meant to remove before posting. It compiles now though so thanks :)

@gfgtdf: Wesnoth now starts, however when starting any scenario it has this error in the stderr:

Code: Select all

20141023 23:27:43 error scripting/lua: cannot open S:/áÇØßÜ/Battle_for_Wesnoth_1.13\data\lua/helper.lua: No such file or directory
20141023 23:27:43 error scripting/lua: [string "S:/áÇØßÜ/Battle_for_Wesnoth_1.13\data\lu..."]:10: attempt to index local 'helper' (a nil value)
stack traceback:
	[string "S:/áÇØßÜ/Battle_for_Wesnoth_1.13\data\lu..."]:10: in main chunk
	[C]: in function 'dofile'
	[string "..."]:2: in main chunk
which does not occur when wesnoth is started from S:/Battle_for_Wesnoth_1.13 instead of S:/áÇØßÜ/Battle_for_Wesnoth_1.13.
pushed
https://github.com/wesnoth/wesnoth/comm ... a4378f55ab and
https://github.com/wesnoth/wesnoth/comm ... a6766195d3 to fix both these issues.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.

User avatar
Pentarctagon
Forum Administrator
Posts: 4091
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Could not save the game every turn in multiplayer (1.11.

Post by Pentarctagon » October 25th, 2014, 12:57 am

It worked, everything seems to be working without errors now.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

gfgtdf
Developer
Posts: 1202
Joined: February 10th, 2013, 2:25 pm

Re: Could not save the game every turn in multiplayer (1.11.

Post by gfgtdf » October 25th, 2014, 1:50 am

did changign language to non english on non asci paths work for you too? (It didnt work for me)
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.

User avatar
Pentarctagon
Forum Administrator
Posts: 4091
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Could not save the game every turn in multiplayer (1.11.

Post by Pentarctagon » October 25th, 2014, 2:18 am

It doesn't work regardless of it being in a ascii/non-ascii path actually, it stayed english.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

User avatar
iceiceice
Developer
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Could not save the game every turn in multiplayer (1.11.

Post by iceiceice » October 26th, 2014, 12:56 am

gfgtdf has merged his gettext_boost branch now -- after testing with mingw32 + wine I could not find any problems with translations, translated images, changing languages etc. with a non-ascii path. I'm not aware of any failures to support UTF-8 right now.

I will post a complete list of stuff that has gotten fixed, but if you could test current master it would be helpful.

Post Reply