problem with network savegame loading under windows

Bug #659884 reported by Timowi
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Critical
Unassigned

Bug Description

reported on irc:

version build15
windows xp and windows vista
both widelands-build15-win32-gcc.exe

Playing with loading from a map works. But savegame loading not. Host can set up and select the savegame but when client joins, it immediately exit with "Something went wrong: basic_string::resize". Host get this just as chat message. The role of the computers can be exchanged. The result is the same.

This is not about loading the savegame but simply getting to the multiplayer game set up screen.

Anyone experienced similar problems with windows?

Related branches

Revision history for this message
Andreas Breitschopp (ab-tools) wrote :

Hello Timo,

yes, I do have the same problem here, too:
the situation is exactly the same as you describe, only the message is not always the same. Either the message you wrote or I remember also something like "Something went wrong: string too long".

This bug only occurs when there is not the same savegame on the client computer. So the core of the problem has to be inside the code transferring the savegame from the host to the client.

The bug occurs every time I want to start a saved multiplayer game (using Windows 7 x64 and Windows XP 32 Bit). There is only one way to be able to start a saved multiplayer game anyway: copy the savegame manually from the host to the client before going to the multiplayer screen. Then this bug does not occur.

Hope that helps. If there is more info needed, please let me know.

Best regards
Andreas

tags: added: multiplayer savegame
Revision history for this message
Andreas Breitschopp (ab-tools) wrote :

OK, I've found the core of the problem myself and fixed it:
there was only one line of code needed to be changed for Windows system (the old "\" instead of "/" in directories problem).

I've registered a corresponding branch and will propose it for merging in few minutes.

Changed in widelands:
assignee: nobody → Andreas Breitschopp (ab-tools)
status: New → In Progress
Revision history for this message
SirVer (sirver) wrote :

this problem did still exist in current windows builds??!? damn. we really need a testsuite :(. Thanks for finding this andreas. I 'll merge your branch before build 16.

Changed in widelands:
importance: Undecided → Critical
milestone: none → build16-rc1
assignee: Andreas Breitschopp (ab-tools) → SirVer (sirver)
Revision history for this message
Nasenbaer (nasenbaer) wrote :

committed in rev 5791

Changed in widelands:
status: In Progress → Fix Committed
assignee: SirVer (sirver) → nobody
Nasenbaer (nasenbaer)
Changed in widelands:
status: Fix Committed → Confirmed
Revision history for this message
Nasenbaer (nasenbaer) wrote :

Okay this bug Is still present, I was not able to use any savegame or a downloaded map with Widelands when I host on linux and my girlfriend played on Windows.

To be honest: We have never faced the problem described here before - seems it came up with the patch I committed. Perhaps my fault: I was not able to test it and so I just thought it already got tested... :(

Andreas Breitschopp can you confirm the problem linux <-> windows?

Revision history for this message
Andreas Breitschopp (ab-tools) wrote :

Hello Nasenbaer,

I did not make a cross-platform test, because I don't have any Linux system here to test Widelands, but with 2 Windows PCs there was no problem anymore after this patch was applied.

Are you sure it's the same issue?

Maybe there is an additional issue when playing a cross-platform game.

Best regards
Andreas

Revision history for this message
Nasenbaer (nasenbaer) wrote :

jepp it's the same problem. Perhaps we should change the code that way, that it only searches for backslashes, if no slash was found, as Windows works exactly the same if a path contains slashes instead of backslashes.

the basic_string::resize exception is most likely thrown, because the rfind returns an invalid value, which is the case if no backslash is found.

Debugging this should be quite easy via logging the path string before working on it - than we would just need a linux and a windows player.... :)

Revision history for this message
Andreas Breitschopp (ab-tools) wrote :

OK, no problem:
if you want to do a test on it, just let me know when and I'll be happy to be the Windows player. ;-)

Nasenbaer (nasenbaer)
Changed in widelands:
assignee: nobody → Nasenbaer (nasenbaer)
Revision history for this message
Nasenbaer (nasenbaer) wrote :

Should be fixed in bzr trunk rev 5812, but was not able to test properly due to the miss of a windows version - if anyone still faces problems, please reopen :)

Changed in widelands:
status: Confirmed → Fix Committed
Nasenbaer (nasenbaer)
Changed in widelands:
assignee: Nasenbaer (nasenbaer) → nobody
Revision history for this message
SirVer (sirver) wrote :

Released in build16-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.