Minimap displays colors incorrectly (SDL renderer)

Bug #1225944 reported by wl-zocker
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Medium
Unassigned

Bug Description

Tested in r6748 on Win7.

As you can see in the attached screenshot, the minimap looks quite strange.
The player colors are wrong. They should be (clockwise, starting on the right top) blue, red, yellow, green, black, brown (red and black are in the mainscreen).
The terrain is only displayed in areas owned by a player, but in unexpected colors (good to see at the red player: the two large pink areas are water). In areas that are owned by no one, only the wooden background is shown (I am spectator, therefore the whole map should be visible). (Undiscovered areas in single-player mode are black.)

Tags: regression ui
Revision history for this message
wl-zocker (wl-zocker) wrote :
Revision history for this message
SirVer (sirver) wrote :

Could you try to disable opengl in the advanced options?

Changed in widelands:
status: New → Incomplete
Revision history for this message
SirVer (sirver) wrote :

My theory is that your graphics card does not have the ability that Widelands tries to use. And it seems to be lying about this too - because we report an error otherwise. Can someone else with Windows reproduce this issue?

Revision history for this message
wl-zocker (wl-zocker) wrote :

When I enable OpenGL, the minimap appears as it should (that is, as it is in build-17), I this mode is unusable to me because all the buttons appear in black (I have written about this in another bug report - it seems to be a incompability between OpenGL and my Laptop/Graphics card that no one else can reproduce).
Therefore, I always play without OpenGL, which has worked fine until the minimap issue appeared.

My graphics card is Intel HD Graphics. The laptop was bought in 2011, the graphics driver is from January 2012 (so no really old stuff). I can provide more information if needed. If I have time, I will look if I can install a newer version of the graphics driver to solve the problem.

Revision history for this message
SirVer (sirver) wrote :

So you are saying this happens when using SDL? Can you check if you are using 32bit color depth? you might need to chang ethis in the conf file. Widelands should no longer use 16 bit in any circumstance.

Revision history for this message
wl-zocker (wl-zocker) wrote :

Not sure about SDL: If it is the alternative to OpenGL, then I use it. For some reason, Widelands used 16bit. I have then changed it to 32bit, but the map still looked strange.
Then I had an idea: What if I combined both - 32bit and OpenGL? And it worked! The buttons are readable and the minimap appears as it should. So it was about an incompability between 16bit and OpenGL. Since 16bit was probably not used by anyone (I have no idea why it was used on my laptop), this issue has not been reproduced.

Revision history for this message
Nasenbaer (nasenbaer) wrote :

I can confirm the issue an Linux.

Seems as if the terrain is not drawn correctly in the minimap if SDL rendering is active. all other overlays (player color, roads, buildings and flags) seem to work as intended.

Changed in widelands:
status: Incomplete → Confirmed
milestone: none → build18-rc1
Revision history for this message
Nasenbaer (nasenbaer) wrote :

targetted this to build18 - it's no blocker though as its only a minor graphic issue. But maybe there is a simple minimal invasive fix :)

Changed in widelands:
importance: Undecided → Medium
Revision history for this message
SirVer (sirver) wrote :

I wouldn't say it is minor :). On Mac OS all is fine and dandy - Peter, make sure that you are using 32bit too and not 16 bit anymore (it is no longer supported).

Revision history for this message
Nasenbaer (nasenbaer) wrote :

@#9 I do. But as described in #6, the bug appears no matter whether 32-bit or 16bit is selected.

summary: - Minimap displays colors incorrectly
+ Minimap displays colors incorrectly (SDL renderer)
Revision history for this message
Nasenbaer (nasenbaer) wrote :

Most likely the problem was introduced with either:
http://bazaar.launchpad.net/~widelands-dev/widelands/trunk/revision/6501
or
http://bazaar.launchpad.net/~widelands-dev/widelands/trunk/revision/6703

note the changes in src/graphic/render/minimaprenderer.cc - quite some code changes... I haven't yet understand all of it :-/

Revision history for this message
SirVer (sirver) wrote :

I still cannot reproduce this issue on Mac - could it be something with 32bit vs 64bit issues here? This is the last outstanding bug for fixing a date for deep winter feature freeze so it is kinda critical that we get this sucker down. Can I do something to help?

Revision history for this message
Shevonar (shevonar) wrote :

I just tried to reproduce this bug. I tested on Windows 8 64bit with rev6779 in 32bit SDL mode. I got no terrain at all (playing in no fog mode) Terrain is only displayed under the player color overlay once the area is conquered. The rest shows just the wooden background texture.

Revision history for this message
SirVer (sirver) wrote :

I was able to repro with Shevonars hint. The reason is that terrains are not saved with alpha channel internally and there was a false assumption that then alpha = 255, which it apparently only is for opengl. I attempted a fix in r6782.

I think (but am not sure) that the OP's bug is fixed with this as well. Could all of you check this please?

I'll wait for a few days, and when I hear nothing I'll suggest a date for the winter time feature freeze.

Changed in widelands:
status: Confirmed → Fix Committed
Revision history for this message
Tino (tino79) wrote :

Works fine for me (SDL on Win7 x64) , 6781 shows now terrain at all on minimap, 6782 is ok.
Could not detect any other issues.

Revision history for this message
wl-zocker (wl-zocker) wrote :

In r6783, SDL shows the map as expected. Everything seems fine.

Revision history for this message
SirVer (sirver) wrote :

Released in build-18 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.