Latest Posts

Topic: Graphical bug? (2)

Doci
Joined: 2010-05-29, 22:29
Posts: 6
Ranking
Pry about Widelands
Posted at: 2017-06-26, 00:28
Recently I installed widelands build 19 on ubuntu and had some nice graphical mess in the menu. I suspect this bug has a lot of overlap with https://wl.widelands.org/forum/topic/2853/ mainly because build 1:18-3build1 works without problem. Since the context and visuals are strongly different and the thread did not have a fix, I choose to post in a separate thread. Also related; I spoke about a similar if not identical issue with SirVer on IRC on 13 February 2016, regarding build18.

First some relevant information.
OS: ubuntu 15.04, 64-bit
Gfx: ATI vapor-X r280 with driver fglrx 2:15.200-0ubuntu4.2
widelands build 1:19-1-1~ubuntu15.04.1

Behaviour
Splash screen looks fine, menu has a black background, overlapping text, cursor shows as a box. On hovering over some buttons, other buttons re-appear correct and incorrect intermittently. Some of the submenu screens look normal, like single/multiplayer, but the menus after that are scattered, unreadable or otherwise unmanageable. It is barely possible to even find the correct buttons to start the game.

Screenshots
http://darkelarious.blicky.net/forum/widelands/build19-ati.png
http://darkelarious.blicky.net/forum/widelands/build19-ati2.png
http://darkelarious.blicky.net/forum/widelands/build19-ati3.png

Now what?
I expect that the problem is related to my ATI card and the drivers. Is there somebody who can reproduce the problem in similar circumstances? Additionally, I am very much willing to work with the dev team to provide extensive logs and to identify the problem and perhaps (if possible and practical) access to my system directly.

Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 1626
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-06-26, 07:48

Hi Doci face-smile.png

Thanks for for your detailed description and the screenshots.

OS: ubuntu 15.04, 64-bit

This OS is EOL (End of live). You should consider to make a system update to get a secure system which provides the newest updates.

Gfx: ATI vapor-X r280 with driver fglrx 2:15.200-0ubuntu4.2

I am using also an ATI graphics card but use the non proprietary driver. I have no problems with this combination. The fglrx driver seems very old and not maintained anymore. I guess this driver does not support the needed SDL version, or not all features of SDL2.

Can you provide the terminal output ('The first lines until "End Graphics report") when you start widelands from terminal?


Top Quote
Doci
Joined: 2010-05-29, 22:29
Posts: 6
Ranking
Pry about Widelands
Posted at: 2017-06-26, 10:37
Hi kaputtnik,

The reason I'm stuck with 15.04 is that with the current drivers my display is overly bright, incorrect, hard to look at and/or other things I am not sure how to describe. I mainly keep my system secure by installing/building system files manually for this version, which mostly works. I can try a livedisk and run the non-proprietary driver and see if it works with my card somewhere this week. In the meanwhile, here is my output.

darkelarious@m5a-333networks:~$ widelands 
This is Widelands Version build-19 (Release)
Set home directory: /home/darkelarious/.widelands
Adding directory: /usr/share/games/widelands/data
selected language: (system language)
using locale en_US.UTF-8
Graphics: Try to set Videomode 1680x1050
Graphics: OpenGL: Version "4.4.13374 Compatibility Profile Context 15.20.1013"
Graphics: SDL_GL_RED_SIZE is 8
Graphics: SDL_GL_GREEN_SIZE is 8
Graphics: SDL_GL_BLUE_SIZE is 8
Graphics: SDL_GL_ALPHA_SIZE is 8
Graphics: SDL_GL_BUFFER_SIZE is 32
Graphics: SDL_GL_DOUBLEBUFFER is 1
Graphics: SDL_GL_DEPTH_SIZE is 24
Graphics: SDL_GL_STENCIL_SIZE is 8
Graphics: SDL_GL_ACCUM_RED_SIZE is 0
Graphics: SDL_GL_ACCUM_GREEN_SIZE is 0
Graphics: SDL_GL_ACCUM_BLUE_SIZE is 0
Graphics: SDL_GL_ACCUM_ALPHA_SIZE is 0
Graphics: SDL_GL_STEREO is 0
Graphics: SDL_GL_MULTISAMPLEBUFFERS is 0
Graphics: SDL_GL_MULTISAMPLESAMPLES is 0
Graphics: SDL_GL_ACCELERATED_VISUAL is 1
Graphics: SDL_GL_CONTEXT_MAJOR_VERSION is 2
Graphics: SDL_GL_CONTEXT_MINOR_VERSION is 1
Graphics: SDL_GL_CONTEXT_FLAGS is 0
Graphics: SDL_GL_CONTEXT_PROFILE_MASK is 2
Graphics: SDL_GL_SHARE_WITH_CURRENT_CONTEXT is 0
Graphics: SDL_GL_FRAMEBUFFER_SRGB_CAPABLE is 0
Graphics: OpenGL: Double buffering enabled
Graphics: OpenGL: Max texture size: 16384
Graphics: OpenGL: ShadingLanguage: "4.40"
**** GRAPHICS REPORT ****
 VIDEO DRIVER x11
 pixel fmt 370546692
 size 1680 1050
**** END GRAPHICS REPORT ****

Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 1626
Ranking
One Elder of Players
Location: Germany
Posted at: 2017-06-26, 18:37

Comparing my output against yours there is no great difference (except that some of your values ar higher). The main differences are:

Yours Mine
Graphics: OpenGL: Version "4.4.13374 Compatibility Profile Context 15.20.1013" Graphics: OpenGL: Version "3.0 Mesa 17.1.3"
Graphics: OpenGL: ShadingLanguage: "4.40" Graphics: OpenGL: ShadingLanguage: "1.30"

I am not familiar with that stuff, so you have to wait for some one else for better answers... or try using the OSS driver. I use it just because it works out of the box (even with a two monitor setup) and i have no trouble with installing or configuring face-smile.png


Top Quote
SirVer
Joined: 2009-02-19, 15:18
Posts: 1438
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2017-06-26, 20:28

Hi Doci, welcome to the forums and thanks for helping out improving the game.

The reason I'm stuck with 15.04 is that with the current drivers my display is overly bright, incorrect, hard to look at and/or other things I am not sure how to describe.

It would be nice to try with the new drivers anyways, just to see if the Widelands issues changes. My hunch is that this is indeed a driver bug - OpenGL 2.1 support seems notoriously bad supported these days.

It that does not yield new information, could you please install glbinding, rebuild Widelands using cmake <other options> -DOPTION_USE_GLBINDING:BOOL=ON and then run Widelands with --debug_gl_trace.


Top Quote
Doci
Joined: 2010-05-29, 22:29
Posts: 6
Ranking
Pry about Widelands
Posted at: 2017-06-28, 14:10

Hi SirVer,

Long time no see (albeit with a different nickname). First I will try all of the above from the ubuntu live USB disk. If that does not work as hoped, I will attach an SSD to my system so I can install multiple OS versions and different drivers. I am not sure in which time frame this can be done -- preservation of my own data is, obviously, my top priority. I hope to have results soon.


Top Quote
SirVer
Joined: 2009-02-19, 15:18
Posts: 1438
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2017-06-29, 18:16

This is much appreciated, Doci. Please keep us apprised.


Top Quote
Doci
Joined: 2010-05-29, 22:29
Posts: 6
Ranking
Pry about Widelands
Posted at: 2017-07-05, 21:08
A bit later than hoped, but here's some results.

First test: USB livedisk
Livedisk with Ubuntu 16.04 LTS and native driver. Added the ppa and attempted to install, but this failed.
ubuntu@ubuntu:~$ sudo apt-get install widelands
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 widelands : Depends: libsdl2-2.0-0 (>= 2.0.4) but it is not installable
             Depends: libsdl2-image-2.0-0 (>= 2.0.1) but it is not installable
             Depends: libsdl2-mixer-2.0-0 (>= 2.0.1) but it is not installable
             Depends: libsdl2-net-2.0-0 (>= 2.0.1) but it is not installable
             Depends: libsdl2-ttf-2.0-0 (>= 2.0.14) but it is not installable
E: Unable to correct problems, you have held broken packages.
ubuntu@ubuntu:~$ 


Looking into available repositories (and manually adding them) implies that I can not install certain packages on the livedisk. So no results here, up to option 2.

Changes to my system
Added 1 SSD (same type, different size) and installed ubuntu 16.04 LTS with the native driver on it.
The same installation procedure; install from ppa, worked flawless this time.

Then, I started the game with no problems whatsoever. No glitches, no driver issues, no bugs in sight. Terminal output:
darkelarious@m5a-333networks:~$ widelands
This is Widelands Version build-19 (Release)
Set home directory: /home/darkelarious/.widelands
There's no configuration file, using default values.
Adding directory: /usr/share/games/widelands/data
selected language: (system language)
using locale en_US.UTF-8
Graphics: Try to set Videomode 800x600
Graphics: OpenGL: Version "3.0 Mesa 12.0.6"
Graphics: SDL_GL_RED_SIZE is 8
Graphics: SDL_GL_GREEN_SIZE is 8
Graphics: SDL_GL_BLUE_SIZE is 8
Graphics: SDL_GL_ALPHA_SIZE is 0
Graphics: SDL_GL_BUFFER_SIZE is 24
Graphics: SDL_GL_DOUBLEBUFFER is 1
Graphics: SDL_GL_DEPTH_SIZE is 24
Graphics: SDL_GL_STENCIL_SIZE is 0
Graphics: SDL_GL_ACCUM_RED_SIZE is 0
Graphics: SDL_GL_ACCUM_GREEN_SIZE is 0
Graphics: SDL_GL_ACCUM_BLUE_SIZE is 0
Graphics: SDL_GL_ACCUM_ALPHA_SIZE is 0
Graphics: SDL_GL_STEREO is 0
Graphics: SDL_GL_MULTISAMPLEBUFFERS is 0
Graphics: SDL_GL_MULTISAMPLESAMPLES is 0
Graphics: SDL_GL_ACCELERATED_VISUAL is 1
Graphics: SDL_GL_CONTEXT_MAJOR_VERSION is 2
Graphics: SDL_GL_CONTEXT_MINOR_VERSION is 1
Graphics: SDL_GL_CONTEXT_FLAGS is 0
Graphics: SDL_GL_CONTEXT_PROFILE_MASK is 2
Graphics: SDL_GL_SHARE_WITH_CURRENT_CONTEXT is 0
Graphics: SDL_GL_FRAMEBUFFER_SRGB_CAPABLE is 0
Graphics: OpenGL: Double buffering enabled
Graphics: OpenGL: Max texture size: 16384
Graphics: OpenGL: ShadingLanguage: "1.30"
**** GRAPHICS REPORT ****
 VIDEO DRIVER x11
 pixel fmt 370546692
 size 800 600
**** END GRAPHICS REPORT ****
SoundHandler: loaded song "music/intro_00.ogg"
SoundHandler: loaded song "music/menu_00.ogg"
selected language: (system language)
using locale en_US.UTF-8
selected language: (system language)
using locale en_US.UTF-8
There's no configuration file, using default values.
lastserial: 0
lastserial: 0
SoundHandler closing times 1, freq 22050, format 32784, chan 2
SDL_AUDIODRIVER pulseaudio
darkelarious@m5a-333networks:~$ 


The only issue that remains is that my display (in whole ubuntu) feels overly bright and painful to the eyes. I made a screenshot and viewed the screenshot in my normal setup, but on my normal setup the screenshot felt normal (not overly bright and/or painful to the eyes).

Conclusion & Discussion
The graphical bug described in my first post above appears to be caused by the fglrx 2:15 driver. With the native 16.04 driver, the described problem no longer persists. This driver has other disadvantages that causes me not to upgrade and leaves me without a broken widelands interface. It is also unclear how many people have ATI videocards with similar problems and whether these people choose not to install/play widelands because of it.

The question remaining then, also for future reference and viewers with similar problems, is whether this worth fixing or not. What is your (plural) take on this?
Edited: 2017-07-05, 21:10
Top Quote
SirVer
Joined: 2009-02-19, 15:18
Posts: 1438
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2017-07-05, 22:16

Wow, thanks for putting so much effort into this!!

The question remaining then, also for future reference and viewers with similar problems, is whether this worth fixing or not. What is your (plural) take on this?

So this is a difficult questions. Generally speaking it is hard to work around driver bugs and probably not worth our time. However it is always unclear if it is really a driver bug or if we are not correctly using OpenGL. What I mean with this is this: We obviously use OpenGL mostly correct, since it works on most drivers. But we already found one bug where a driver required a manual OpenGL pipeline-flush on Windows while other drivers did this automatically - the standard was unclear if a flush should have been required or not. There might be more ambiguities in our OpenGL code that some drivers trip over and others do not.

The question is: how can we find these? I do not know.

On the other sde driver bugs are really, really common. The world runs on 20% of the features of OpenGL, 80% go mostly unused (my estimate - I have no data on this). Widelands uses a tiny bit of more esoteric features: offscreen rendering, different blend modes, scissoring... but I fully believe that some drivers just cannot be made to work with our feature set. Also Widelands targets OpenGL 2.1 which is so ancient that newer drivers usually do not care that much about implementing it correctly. But moving to OpenGL 3 or 4 would mean leaving a large chunks of our user base behind. You cannot win here, really.

I guess this is not the short answer to your questions that you wanted, but the problem space is pretty vast face-confused.png


Top Quote
Doci
Joined: 2010-05-29, 22:29
Posts: 6
Ranking
Pry about Widelands
Posted at: 2017-07-18, 12:46
It is a bummer, but 100% understandable and motivated. The situation is now documented for future reference, so if anyone runs into similar problems, there is a quick answer to it.
Thank you all for your time as well.

Top Quote