Windows users cannot join games (maybe can't host either)

Bug #648270 reported by SirVer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Critical
Jari Hautio

Bug Description

When they join, they get the information barbarians:sc00_headquarters_medium not found or something along the lines. The problem is likely related to the localization fix in r5536: Fix two localization issues with player initializations. It seems like the scripts are not found under windows; in other parts of widelands (single player for example), the scripts are found.

SirVer (sirver)
Changed in widelands:
status: New → Confirmed
importance: Undecided → Critical
milestone: none → build16-rc1
Revision history for this message
SirVer (sirver) wrote :

i added some debug output to the place where i think the problem lives; i also made the lua initialization similar to other places in the code were it works also under windows. I can't test this atm since I cannot build a windows version of widelands, If someone can, please test r5542 as a network client.

Changed in widelands:
status: Confirmed → In Progress
Revision history for this message
SirVer (sirver) wrote :

jari... could you help me debug this? i cannot reproduce it without windows an it hit the widelands tournament players... :(

Changed in widelands:
assignee: nobody → Jari Hautio (jarih)
Revision history for this message
Jari Hautio (jarih) wrote :

r5542 fixed the bug. I regression tested with linux host machine and win7 client machine using LAN game, Atoll map and barbarian players. r5541 triggered the bug, and r5542 launched the game succesfully. Head also works.

Revision history for this message
SirVer (sirver) wrote :

The bug was hit yesterday with gannaf and mcmad 2nd playing their tournament game. Both were using 5560 under windows. Could it be that the host is also affected? Could you try hosting a game with windows? ooh man, how many bears do I owe you already?

Revision history for this message
Jari Hautio (jarih) wrote :

Yep, reproduces when hosted on winXP and client is Win7. Working on it... And I like german beer :)

Here's the interesting part of the log:
[Client] SETTING_MAP 'Atoll' 'maps\Atoll.wmf'
Registering script: (aux,coroutine)
Registering script: (aux,infrastructure)
Registering script: (aux,objective_utils)
Registering script: (aux,shared_kingdom_functions)
Registering script: (aux,table)
Registering script: (aux,ui)
Registering script: (aux,win_condition_functions)
Trying to create SubFileSystem:: tribes/barbarians
This worked. Now registering scripts!
Registering script: (tribe_barbarians,sc00_headquarters_medium)
Registering script: (tribe_barbarians,sc01_citadel_village)
Got name send: \sc00_headquarters_medium
[Client]: disconnect(Something went wrong: [j:\code\widelands\repo\trunk\src\scripting\scripting.h:45] The script 'tribe_barbarians:\sc00_headquarters_medium' was not found!)

Revision history for this message
Jari Hautio (jarih) wrote :

It's slash issue. For comparison here's what client logs when linux hosts the game and win7 client connects.

[Client] SETTING_MAP 'Atoll' 'maps/Atoll.wmf'
Registering script: (aux,coroutine)
Registering script: (aux,infrastructure)
Registering script: (aux,objective_utils)
Registering script: (aux,shared_kingdom_functions)
Registering script: (aux,table)
Registering script: (aux,ui)
Registering script: (aux,win_condition_functions)
Trying to create SubFileSystem:: tribes/barbarians
This worked. Now registering scripts!
Registering script: (tribe_barbarians,sc00_headquarters_medium)
Registering script: (tribe_barbarians,sc01_citadel_village)
Got name send: sc00_headquarters_medium
Got name send: sc01_citadel_village

Revision history for this message
SirVer (sirver) wrote :

I am a bit at a loss. I currently think the problem might be in the Tribe_Descr::exists_tribe function or a function it calls (register scripts, get_scripts_for). What I do not understand is, where this beginning \ comes from. Does the host already report Registering script: (tribe_barbarians,\sc00_headquarters_medium). And if so, why? I do not understand at this moment. Could you post the output of the windows host? Maybe this gives some clues.

Revision history for this message
Jari Hautio (jarih) wrote :

Heh, seems like this happened because of two simultaneous bugs. First RealFSImpl::FindFiles returned slashes in beginning of file file name if path argument was empty. This happened when scriptsd were registered for tribes. Second LuaInterface_Impl::m_register_script failed to chop it away because it did not check first character. Everything worked for single user game propably because file was already loaded and name was not needed.

Fixed in r5565. Tested that windows and linux client can connect to windows host.

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

You should really consider joining the WiHack... you could (nearly) save the money of the flight worth in beer :). Thanks Jari!

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.