Latest Posts

Topic: Today's finds... Black screen at start-up and crash on internet play

kraileth

Topic Opener
Joined: 2010-03-14, 15:34
Posts: 59
Ranking
Likes to be here
Posted at: 2010-05-16, 21:08

Hi, everybody!

Today I found some time and thought about testing Widelands a little. I asked my brother and another friend (who I know loved the Settlers) if we'd play a little widelands. I showed them how the game works and let them play through the barbarian tut. After that everyone went home, the other two put on skype (I prefer typing over talking when playing) and we wanted to play widelands over the net. Well, we did not succeed in doing so.

First thing we wondered about was that the two other players could not host a game. Right, that's because they are on Windows. However I'm on Linux, so it should have worked. We all see each other in the main room. I can host a game and the other two see a game that they could join. But if they do, it will take a while and then the message is printed that the host was not running a WL server, the port was not reachable or whatever. For me this sounds like a typical time-out.

I was not able to find out anything about the symbols to the left. The bot has a green one, I had a yellow one and the other two a red one. Is this a graphical indication of the ping rate towards the master server? This would be rather strange, as all three of us live in the same village, not far from each other (the other two even in one street), and have the same provider.

Anyways, I configured my router not to block the WL port. It didn't change anything. Still the time-out thing.

That for our attempts with internet play. But I ran into two other problems today. Right now, WL won't start but instead leave me with a black screen before even the menu is displayed. I can switch to another terminal, login, kill widelands, and what I find in the console is the following:

Adding directory:./.
Version file found with id "build-15" (real "build-15" )
No version file found
Adding directory:/usr/share/games/widelands
No version file found
Adding directory:.
Version file found with id "build-15" (real "build-15" )
No version file found
Set home directory: /home/michael/.widelands
No version file found
LANG en, LANGUAGE en:en
textdomain widelands @ locale
using locale en
SDL_VIDEODRIVER=&
Graphics: Trying Video driver: 4 dga SDL_VIDEODRIVER=dga
Graphics: Trying Video driver: 3 directfb SDL_VIDEODRIVER=directfb
Graphics: Trying Video driver: 2 fbcon SDL_VIDEODRIVER=fbcon
Graphics: Trying Video driver: 1 svga SDL_VIDEODRIVER=svga
Graphics: Trying Video driver: 0 x11 SDL_VIDEODRIVER=x11
Graphics: Trying HW_SURFACE
Graphics: Trying FULLSCREEN
Terminated

Now, WL often has some little illnesses like that, but on trying to re-enter the game, I accidently launched another version - that works and b15 gives me the black screen if I start it again. Here the log from the other version, just in case this can somehow help improving the video code:

Adding directory:/usr/local/.
No version file found
Adding directory:/usr/share/games/widelands
No version file found
Adding directory:.
Version file found with id "bzr5066[widelands] " (real "bzr5066[widelands] " )
No version file found
Set home directory: /home/michael/.widelands
No version file found
SDL_VIDEODRIVER=&
Graphics: Trying Video driver: 4 dga SDL_VIDEODRIVER=dga
Graphics: Trying Video driver: 3 directfb SDL_VIDEODRIVER=directfb
commandline read: widelands

   ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.2.7 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2001-2008  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2009-06-02 06:33) 
(!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed
    --> No such file or directory
(!) DirectFB/FBDev: Error opening framebuffer device!
(!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable.
(!) DirectFB/Core: Could not initialize 'system_core' core!
    --> Initialization error!
Graphics: Trying Video driver: 2 fbcon SDL_VIDEODRIVER=fbcon
Graphics: Trying Video driver: 1 svga SDL_VIDEODRIVER=svga
Graphics: Trying Video driver: 0 x11 SDL_VIDEODRIVER=x11
Graphics: Trying HW_SURFACE
Graphics: Trying FULLSCREEN
Graphics: FULLSCREEN ENABLED
**** GRAPHICS REPORT ****
 VIDEO DRIVER x11
 hw surface possible 0
 window manager available 1
 blitz_hw 0
 blitz_hw_CC 0
 blitz_hw_A 0
 blitz_sw 0
 blitz_sw_CC 0
 blitz_sw_A 0
 blitz_fill 0
 video_mem 0
 vfmt 0x8f57c48
 size 1024 768
**** END GRAPHICS REPORT ****

hw avail:0Graphics: flags: 80000000
[] Section [global], key 'registered' not used (did you spell the name correctly?)
[] Section [global], key 'EXENAME' not used (did you spell the name correctly?)
Sound_Handler: loaded song "music/intro_00.ogg"
Sound_Handler: loaded song "music/menu_01.ogg"

And the other thing is that the game crashes with a "segmentation fault" when I try to host a game after hosting one and leaving the game. After restarting my system, I can host again, but if I leave and try again, it's the same thing: "segmentation fault". Looks like there's some cleaning up to do that's yet missing.

My system runs Ubuntu Karmic.

Edit: Wow, looks like the forum doesn't like html. Since BB-code is also not available, what can I do to replace

 or [code]? Because what the software makes from my post is plain unreadable...

Edit 2: Not that I did much with my system, but now starting WL crashes with a segmentation fault at startup:

Adding directory:./.
Version file found with id "build-15" (real "build-15" )
No version file found
Adding directory:/usr/share/games/widelands
No version file found
Adding directory:.
Version file found with id "build-15" (real "build-15" )
No version file found
Set home directory: /home/michael/.widelands
No version file found
LANG de_DE.UTF-8, LANGUAGE de_DE.UTF-8:de
textdomain widelands @ locale
using locale de_DE.UTF-8
SDL_VIDEODRIVER=&
Graphics: Trying Video driver: 4 dga SDL_VIDEODRIVER=dga
Graphics: Trying Video driver: 3 directfb SDL_VIDEODRIVER=directfb
Graphics: Trying Video driver: 2 fbcon SDL_VIDEODRIVER=fbcon
Graphics: Trying Video driver: 1 svga SDL_VIDEODRIVER=svga
Graphics: Trying Video driver: 0 x11 SDL_VIDEODRIVER=x11
Graphics: Trying HW_SURFACE
Graphics: Trying FULLSCREEN
Graphics: FULLSCREEN ENABLED
**** GRAPHICS REPORT ****
 VIDEO DRIVER x11
 hw surface possible 0
 window manager available 1
 blitz_hw 0
 blitz_hw_CC 0
 blitz_hw_A 0
 blitz_sw 0
 blitz_sw_CC 0
 blitz_sw_A 0
 blitz_fill 0
 video_mem 0
 vfmt 0x954f638
 size 1024 768
**** END GRAPHICS REPORT ****

hw avail:0Graphics: flags: 80000000
Segmentation fault

Edit 3: Much better! Now it's acutally readable.

Edited: 2010-05-17, 11:57

Top Quote
Kiscsirke
Avatar
Joined: 2009-12-16, 12:40
Posts: 42
Ranking
Pry about Widelands
Location: Budapest, Hungary
Posted at: 2010-05-17, 05:38

I can help you with the formatting:

Start each line with 4 spaces to get code formatting:

If I do it like this,
it won't be formatted like the rest.

(And you need 2 newlines to separate it from other parts of the post but you see that already I guess)


Top Quote
ixprefect

Joined: 2009-02-27, 13:28
Posts: 367
Ranking
Tribe Member
Posted at: 2010-05-17, 11:41

First of all, you're using build-15, is that right?

About your networking problem: I recall that there were some problems with some versions of GGZ, the internet lobby library we are using. If you have the latest version of GGZ these problems should be fixed, but many distributions are still carrying old versions. Try manually exchanging IP addresses and using the direct connect feature. That is, don't go via the internet lobby, but via the other networking menu, there you have the option to connect to an explicitly given IP address. Of course, you also need to make sure the Widelands port is open, but you seem to have done that already.

I don't know what the problem was with your friends' Windows versions, anybody should be able to host a game. Perhaps there is some interaction with certain firewalls that your friends are running? If you could help us in figuring out what the problem is, that would be great.

Also, FYI: The colors next to names in the internet lobby only indicate the type of client, e.g. whether you are logged in into a GGZ account, whether you're a bot, etc.

Finally, all these segmentation faults you're getting are extremely suspicious. Can you tell us more about your system? What distribution are you using? 32-bit vs. 64-bit? Did you compile Widelands yourself, or did you use a prebuilt package from somewhere? My personal suspicion is that this is not a bug in the Widelands source code, but more likely some kind of linking incompatibility. We've had a lot of problems like this with prebuilt binaries, you may have more luck with a package that was specifically built for your distribution, or with compiling yourself.


Top Quote
kraileth

Topic Opener
Joined: 2010-03-14, 15:34
Posts: 59
Ranking
Likes to be here
Posted at: 2010-05-17, 12:32

Thanks, Kiscsirke!
was not a problem at all and about and I found out by accident when posting something from a textfile where I had used underscores to mark certain words that were italic after posting. So, for code-like formating it's four spaces. Good to know!

ixprefect:

Yes, all three of us were using build-15.

When entering the metaserver, the player is asked to read http://wl.widelands.org/wiki/InternetGaming/ for additional information. And while there's still build-14 being discussed, I thought that the GZZ-problem could not be solved before releasing build-15? I read something like that in the bugtracker, but I'm not totally sure.

But what exactly is your suggestion to solve the problem? Hosting works for me (Ubuntu Karmic), but the others can't join. However the other two players (Win XP) cannot host games, the button is disabled. Is there any gain in me updating GZZ on my system or would the windows users have to do so? And if yes: How would that have to be done? If recompiling is neccessarry for it, I can probably do it with some help, but the windows users never saw even one line of code! face-wink.png

As my brother told me, the second network option has worked for them and they played a little. However they were using hamachi which I don't have for linux (and actually I don't fully trust it). I tried Wippien, which seems to be a really good alternative, however the linux version is but alpha status and the author won't continue it in favor of the windows version. face-sad.png

However somebody can probably help me here, too: Wippien works, but widelands can't connect. I searched the net a little, and somewhere I read that you had to change its standard subnet mask from 255.0.0.0 to the more usual 255.255.255.0. However it seems like the linux version has no means of configuration at all... Do you think that this is what keeps WL from connecting over the VPN and finding the server? And is there possibly a solution to this on widelands side? It would be really cool if this could be made working. I'd volunteer to write up a little tut so that other players who have problems over the net could play together! face-grin.png

The WL port is opened from my router (btw. does it need UDP and TCP or does TCP suffice? I opened both, but I'm curious). I don't know what firewall configuration our fried uses (need to ask him somewhen), but my brother just has the XP firewall (and disabled it for the game). So that should not be the problem, too. Perhaps I can get him to dig out the router password and add a rule to open the WL port, but I don't think that it's getting blocked right now. Still, how do they say? The proof of the pudding is in the eating. So I might as well try it.

Alright, so the green symbol is reserved for the bot. Yellow for me is ok then, I guess? But if both windows users are red, that's likely what needs to change... If you can help us with the GZZ thingy, that would probably already do it.

My system currently runs Ubuntu Karmic, 32-Bit. It was updated from Jaunty about half a year ago. I didn't go for Lucid, yet, and I plan to do a fresh install of it somewhen instead of updating again, so that I'll have a nice 'n clean system once more. As I read in the bugs, problems with pulse-audio accured again and again in the past and I can confirm that: pulse often stops working. But these segmentation faults seem to have another reason. Right now for build-15 I use the prebuild version, but I've also used self-compiled versions before (I PMed SirVer because my BZR stopped working and if he can help me, I'll be able to build trunk versions myself again). I'll gladly help to figure out where these problems come from.


Top Quote
ixprefect

Joined: 2009-02-27, 13:28
Posts: 367
Ranking
Tribe Member
Posted at: 2010-05-17, 12:40

Just to clarify, when you say prebuilt version, do you mean timowi's PPA for Ubuntu? Or some other prebuilt version?

About networking: I think only TCP is used, at least all the main game's network traffic uses TCP. Not sure if the GGZ parts use UDP. And yes, Ubuntu 9.10 (Karmic) still has the pulseaudio and ggz troubles. They're fixed in 10.04 (Lucid), but I can understand you want to wait a little to upgrade. As I said, the best way to avoid networking troubles is to just not use the internet lobby and exchange IP addresses manually, which shouldn't be too hard to do if you're already communicating via some instant messenger anyway.

To be honest, I have no idea what these Hamachi and Wippien are that you're talking about, but no additional tools should be necessary. Just use the LAN Game option, but enter the appropriate IP address. Provided you are either directly connected to the network or have port forwarding enabled, everything should work fine even when you're not on the same LAN.


Top Quote
timowi

Joined: 2009-11-01, 22:08
Posts: 146
Ranking
At home in WL-forums
Location: Germany
Posted at: 2010-05-17, 13:04

For game and ggz communication only tcp is used. If you have a router you do not only have to open the port. It's necessary that the port is forwarded from the external address to the machine on which widelands run.

It's currently not possible that windows machines host a game. This is caused by the way we use ggz. The symbols in the ggz lobby have to do with the player status and nothing with network connection. WLBot is green because he is marked as admin. As far as I know yellow means registered player and red guest. But I'm not sure here. These symbols have more or less no meaning currently.

If the widelands port is reachable from internet (forwarded!) it should be possible to connect. It's possible that the clients get the from ip address from the ggz server. Your friends can have a look in the stdout.txt and check if the transmitted ip is identical to your ip.

Your segfaults sounds like the ones from the first static binary. I do not know which one is on the download page currently. You can try to replace the widelands binary with the one from the following post
http://wl.widelands.org/forum/topic/431/?page=1#post-2232
But it is better to use the package from the ppa
http://wl.widelands.org/forum/topic/464/


Top Quote
kraileth

Topic Opener
Joined: 2010-03-14, 15:34
Posts: 59
Ranking
Likes to be here
Posted at: 2010-05-17, 19:56

ixprefect:

Since I downloaded it from the WL download site, I guess, that it was timowi's PPA. In any case it's not from anywhere else.

So, if they work on Lucid, I'll ignore the pulse-audio and ggz stuff now. Trying it via IP address exchange somewhen in near future.

Hamachi is a well known piece of software that allows to emulate a "virtual LAN" over the internet. It is basicly some kind of VPN software with an IM inculded. Thus the application allows games to be played over the net that only support LAN play. If WL supports direct IP play, that's not neccessary, you are right. Still it's a good software for other games.

timowi:

I'll take a look if I need forwarding tonight. Thanks for confirming the windows hosting problem.

I just grabbed the source (widelands-build15-src.tar.bz2), compiled it and did some quick testing. It seems that you were totally right, as the segmentation fault is gone now and hosting a game from the metaserver works every time now.


Top Quote