[SOLVED] wesnoth-1.9.1+svn fails to load images

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:
Post Reply
Bircoph
Posts: 59
Joined: October 5th, 2007, 8:23 pm

[SOLVED] wesnoth-1.9.1+svn fails to load images

Post by Bircoph »

Hello,

after upgrade of wesnoth from several month old svn snapshot to current wesnoth-1.9.1+svn (r46973) I get the following problem: wesnoth itself starts successfully, but no images can be loaded. Behaviour is very similar to unaccessible data directory, but with the difference that data dir is accessible and contains required files.

I'm using Gentoo Linux on x86 with kernel 2.6.34.1, libpng-1.4.3. If you need more info on the system feel free to ask.

Code: Select all

$ wesnoth
Battle for Wesnoth v1.9.1+svn
Started on Sat Oct  9 07:01:41 2010


Data directory: /usr/share/games/wesnoth
User configuration directory: /home/andrew/.wesnoth
User data directory: /home/andrew/.wesnoth
Cache directory: /home/andrew/.wesnoth/cache
20101009 07:01:41 error display: could not open image 'game-icon.png'
Checking video mode: 1440x900x32...
setting mode to 1440x900x32
20101009 07:01:41 error display: could not open image 'cursors-bw/normal.png'
null neutral surface...
20101009 07:01:41 error display: could not open image 'cursors-bw/wait.png'
null neutral surface...
20101009 07:01:41 error display: could not open image 'misc/logo.png'
20101009 07:01:41 error display: loadscreen: Failed to load the logo
null neutral surface...
null neutral surface...
null neutral surface...
null neutral surface...
null neutral surface...
20101009 07:01:42 error display: could not open image 'maps/wesnoth.png'
20101009 07:01:42 error gui/draw: Image: 'maps/wesnoth.png' not found and won't be drawn.
20101009 07:01:42 error gui/draw: Image: 'misc/logo.png' not found and won't be drawn.
20101009 07:01:42 error display: could not open image 'dialogs/translucent54-border-topleft.png'
20101009 07:01:42 error gui/draw: Image: 'dialogs/translucent54-border-topleft.png' not found and won't be drawn.
20101009 07:01:42 error display: could not open image 'dialogs/translucent54-border-top.png'
20101009 07:01:42 error gui/draw: Image: 'dialogs/translucent54-border-top.png' not found and won't be drawn.
20101009 07:01:42 error display: could not open image 'dialogs/translucent54-border-topright.png'
20101009 07:01:42 error gui/draw: Image: 'dialogs/translucent54-border-topright.png' not found and won't be drawn.
20101009 07:01:42 error display: could not open image 'dialogs/translucent54-border-right.png'
20101009 07:01:42 error gui/draw: Image: 'dialogs/translucent54-border-right.png' not found and won't be drawn.
20101009 07:01:42 error display: could not open image 'dialogs/translucent54-border-botright.png'
20101009 07:01:42 error gui/draw: Image: 'dialogs/translucent54-border-botright.png' not found and won't be drawn.
20101009 07:01:42 error display: could not open image 'dialogs/translucent54-border-bottom.png'
20101009 07:01:42 error gui/draw: Image: 'dialogs/translucent54-border-bottom.png' not found and won't be drawn.
20101009 07:01:42 error display: could not open image 'dialogs/translucent54-border-botleft.png'
20101009 07:01:42 error gui/draw: Image: 'dialogs/translucent54-border-botleft.png' not found and won't be drawn.
20101009 07:01:42 error display: could not open image 'dialogs/translucent54-border-left.png'
20101009 07:19:10 error gui/draw: Image: 'dialogs/translucent54-border-left.png' not found and won't be drawn.
20101009 07:19:10 error display: could not open image 'dialogs/translucent54-background.png'
20101009 07:19:10 error gui/draw: Image: 'dialogs/translucent54-background.png' not found and won't be drawn.
20101009 07:19:10 error display: could not open image 'buttons/button.png'
20101009 07:19:10 error gui/draw: Image: 'buttons/button.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'buttons/button.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'buttons/button.png' not found and won't be drawn.
20101009 07:19:10 error display: could not open image 'dialogs/translucent-background_80.png'
20101009 07:19:10 error gui/draw: Image: 'dialogs/translucent-background_80.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'dialogs/translucent54-border-topleft.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'dialogs/translucent54-border-top.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'dialogs/translucent54-border-topright.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'dialogs/translucent54-border-right.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'dialogs/translucent54-border-botright.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'dialogs/translucent54-border-bottom.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'dialogs/translucent54-border-botleft.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'dialogs/translucent54-border-left.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'dialogs/translucent54-background.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'buttons/button.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'buttons/button.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'buttons/button.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'buttons/button.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'buttons/button.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'buttons/button.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'buttons/button.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'buttons/button.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'buttons/button.png' not found and won't be drawn.
20101009 07:19:10 error gui/draw: Image: 'buttons/button.png' not found and won't be drawn.
null neutral surface...
This is list of data directory:

Code: Select all

$ ll /usr/share/games/wesnoth/
total 36
drwxr-x--- 13 root games  4096 Oct  9 04:11 data
drwxr-x---  2 root games  4096 Oct  9 04:10 fonts
drwxr-x--- 14 root games  4096 Oct  9 04:10 images
-rw-r-----  1 root games 16004 Oct  9 03:40 l10n-track
drwxr-x---  2 root games  4096 Oct  9 04:10 sounds
drwxr-x--- 54 root games  4096 May  5 13:44 translations
I'm in the games group, images are accessible:

Code: Select all

$ ll /usr/share/games/wesnoth/images/game-icon.png 
-rw-r----- 1 root games 9158 Oct  9 03:41 /usr/share/games/wesnoth/images/game-icon.png

$ ll /usr/share/games/wesnoth/images/dialogs/translucent54-border-topleft.png
-rw-r----- 2 root games 143 Oct  9 03:41 /usr/share/games/wesnoth/images/dialogs/translucent54-border-topleft.png
Another thing bothering me: wesnoth do not accept --data-dir option, despite manual says:

Code: Select all

$ wesnoth --data-dir /usr/share/games/wesnoth
Battle for Wesnoth v1.9.1+svn
Started on Sat Oct  9 07:34:34 2010

Overriding data directory with /usr/share/games/wesnoth
unknown option: --data-dir
unknown option
Update:
Hmm, it finds image, then tries to load non-existent library and fails...
This is part of strace -e trace=file wesnoth:

Code: Select all

stat64("/home/andrew/.wesnoth/images/cursors-bw/normal.png", 0x77f9b4e0) = -1 ENOENT (No such file or directory)                               
stat64("/usr/share/games/wesnoth/images/cursors-bw/normal.png", {st_mode=S_IFREG|0640, st_size=191, ...}) = 0                                  
stat64("/usr/share/games/wesnoth/images/cursors-bw/l10n/en_US/normal.png", 0x77f9b430) = -1 ENOENT (No such file or directory)                 
stat64("/usr/share/games/wesnoth/images/cursors-bw/l10n/en_US/normal.png", 0x77f9b430) = -1 ENOENT (No such file or directory)                 
open("/usr/share/games/wesnoth/images/cursors-bw/normal.png", O_RDONLY) = 7                                                                    
open("/etc/ld.so.cache", O_RDONLY)      = 8                                                                                                    
open("/lib/libpng.so.3", O_RDONLY)      = -1 ENOENT (No such file or directory)                                                                
open("/usr/lib/libpng.so.3", O_RDONLY)  = -1 ENOENT (No such file or directory)                                                                
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2194, ...}) = 0                                                                        
20101009 08:06:24 error display: could not open image 'cursors-bw/normal.png'                                                                  
null neutral surface...            
Also I wonder why wesnoth trying to open libpng.so.3 since it was compiled with libpng14.so:

Code: Select all

$ ldd /usr/games/bin/wesnoth | grep png
       libpng14.so.14 => /usr/lib/libpng14.so.14 (0x6d782000)
Attachments
This is what I see after game started.
This is what I see after game started.
Last edited by Bircoph on October 9th, 2010, 10:04 am, edited 1 time in total.
Per aspera ad astra!

User avatar
loonycyborg
Windows Packager
Posts: 279
Joined: April 1st, 2008, 4:45 pm
Location: Russia/Moscow

Re: wesnoth-1.9.1+svn fails to load images

Post by loonycyborg »

You really just need to pass the data dir itself as the argument: 'wesnoth /usr/share/games/wesnoth', without --data-dir.
Perhaps you could try running wesnoth right from checkout dir: './wesnoth'
Bircoph wrote:.
Also I wonder why wesnoth trying to open libpng.so.3 since it was compiled with libpng14.so:
Probably because SDL_image uses dlopen(3) to load libpng, libjpeg etc
"meh." - zookeeper

Bircoph
Posts: 59
Joined: October 5th, 2007, 8:23 pm

Re: wesnoth-1.9.1+svn fails to load images

Post by Bircoph »

Yes, media-libs/sdl-image-1.2.10-r1 was guilty: it was not recompiled after libpng upgrade.
After recompilation of sdl-image wesnoth works fine 8-).
Per aspera ad astra!

vcap
Posts: 80
Joined: August 1st, 2010, 3:34 pm

Re: wesnoth-1.9.1+svn fails to load images

Post by vcap »

loonycyborg wrote:You really just need to pass the data dir itself as the argument: 'wesnoth /usr/share/games/wesnoth', without --data-dir.
So, it's really a bug in --help/the manpage; they should not mention --data-dir in the first place, right?

User avatar
loonycyborg
Windows Packager
Posts: 279
Joined: April 1st, 2008, 4:45 pm
Location: Russia/Moscow

Re: [SOLVED] wesnoth-1.9.1+svn fails to load images

Post by loonycyborg »

That option actually exists in game.cpp . It just seems to broken.
"meh." - zookeeper

Post Reply