Terrain preview in editor shows nothing

Bug #1167234 reported by wl-zocker on 2013-04-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

As you can see in the attached screenshots, the terrains are not shown in the preview window. This affects all worlds. However, they can be selected (by clicking into the empty space), their name is shown and they can be placed on the map (where they are visible as the should).

Tested in r6549 on Windows 7, but I think it has appeared earlier.

wl-zocker (wl-zocker) wrote :
SirVer (sirver) wrote :

That is very likely a OpenGL bug - i cannot reproduce it on my system though. Can you try running the game with --opengl=false and see if this pops up as well?

Changed in widelands:
status: New → Incomplete
wl-zocker (wl-zocker) wrote :

I am not sure what you mean with "--opengl=false" because I do not use a command line. However, in the advanced option, OpenGL is disabled. If I enable it, all the buttons, windows etc. are black (see screenshot), but clicking is still possible. (I guess that OpenGL does not work properly is already known?)
I have tried to change some other options (fullscreen, resolution), but that did not affect the problem.
My graphic card is "Intel(R) HD Graphics", if that matters. If I need to provide more information, tell me which one.

wl-zocker (wl-zocker) wrote :
SirVer (sirver) wrote :

What happens if you quit the game and restart it again?

Can someone else reproduce this problem? Everything works fine for me, but I have a feeling that there is a bug lurking in my new(er) offline surface rendering code.

wl-zocker (wl-zocker) wrote :

Restarting the game changes nothing. I have also tried to re-install the game, but no succes. The bug exists already in r6504 (the oldest build I could find on my computer), but not in build 17.

SirVer (sirver) wrote :

So let me clarify this:

- When using opengl=false you see no pictures in the editor when selecting terrains but everything else works fine?
- When using opengl=true you see only black boxes, even when you restart the game? So opengl is unusable for you.
- You are on a windows machine using Windows 7 and test with Tinos prebuilt Windows binaries?

This is very critical if this analysis is correct - could we please get more reports from people on windows about the current version?

Changed in widelands:
importance: Undecided → Critical
milestone: none → build18-rc1
wl-zocker (wl-zocker) wrote :

#7: Good resumé, just a few things to the second point (I do not know if it is relevant): When I change the openGL settings, I first have to restart Widelands (if I start a game or the editor immediately, Widelands crashes and the options are not saved). The buttons and message boxes are mostly black, but sometimes, strange graphics are shown. Sometimes, the minimap appears in the hover-over text box. If I click in the black (or whatever color it has) area, the game behaves as normal (changes box size, builds building). The buildings' names are not shown (it seems as if they are a kind of graphic because they sometimes look strange). The game speed (Pause/5.0x) is shown correctly.
Once I have changed the openGL setting, I cannot change in back from inside Widelands (it crashes when I press "apply" and the new settings are not saved). I have to change it manually in the conf file.
When openGL is activated, the terrain borders look different.

Chuck Wilder (chuckw20) wrote :

Running the Editor from bzr rev #6551 (release and debug builds) in Ubuntu , I have the same problem.

Changed in widelands:
status: Incomplete → Confirmed
Chuck Wilder (chuckw20) wrote :

Attached is screenshot from rev#6551 (release build) running under Ubuntu.

Chuck Wilder (chuckw20) wrote :

On my Windows 7 box, the default setting is opengl=true and the terrain graphics display as expected in the editor menu.
However, when I attempt to change to opengl=false in "Advanced Options" and click "Apply", I'm returned to the Options menu as expected, but when I click "Apply" there, Widelands crashes.

I have not attempted a command line invocation of opengl=false.

Chuck Wilder (chuckw20) wrote :

I should state that I am running Tino's 6549 release build on my Win & box.

Chuck Wilder (chuckw20) wrote :

Make that "Win 7 box."

SirVer (sirver) wrote :

Tino, can you test this on your machine? Can I get word from the linux folks out there?

I just checked again, and everything works fine on my Mac Machine - I will have a hard time tracking this bug down without access to windows :/.

Changed in widelands:
assignee: nobody → Tino (tino79)
Chuck Wilder (chuckw20) wrote :

Summary of my experience with rev#5651(release build)) on Ubuntu (linux):
no cmd line param -> (default-opengl=false) yields no display of terrain in editor menu
changing the opengl value to true in Advanced Options yields white boxes on the buttons (in my case) and a crash when starting the editor.

using cmd line param --opengl=false -> yields legible buttons and no display of terrain in editor menu
using cmd line param --opengl=true -> yields legible buttons and no display of terrain in editor menu
In other words, I can't get the terrain to display in the Editors menu at all under ubuntu.

 Using Tino's 6549 build on Windows 7, All of the methods listed above yielded visible terrain graphics in the editor menu, but an attempt to switch from a default value of "true" to "false" in the Advanced Options window, crashed widelands upon clicking the "Apply" button on the General Options window. A restart of widelands revealed the change to the opengl value had not been recorded.

Chuck Wilder (chuckw20) wrote :

Sorry, I meant rev#6551 on Ubuntu.

Nicolai Hähnle (nha) wrote :

Chuck: I think the correct command line parameter is actually --opengl=0 or --opengl=1; I don't think that true/false works correctly.

On my Ubuntu Linux 12.04 with Intel integrated graphics (using the open source driver), the terrain preview works correctly with OpenGL, but fails in software rendering mode. Both of this is after a clean start of Widelands, forcing OpenGL (or not) via the command line.

Tino (tino79) wrote :

I did a quick test with r6551 on win32:

1) widelands.exe --opengl=0 --editor
      => terrain preview does not work

2) widelands.exe --opengl=1 --editor
      => terrain preview does work fine

So exact the same result as Nicolai observed.

(Off-topic: r6552 does not compile on win32/mingw)

The crash which occurs on switching the modes ingame is reported here: bug #1130905

Chuck Wilder (chuckw20) wrote :

When I didn't get an immediate error indication when using true/false values, I "assumed" they were accepted. I defer to Nicolai and Tino. :)

Chuck Wilder (chuckw20) wrote :

I've duplicated Tino's results exactly with Win 7 (64bit).

SirVer (sirver) wrote :

Thanks for your rundowns, gentlemen.

First: --opengl=true and false works just fine.
It seems to me like a typical case of an uninitialized member variable, but I am not able to find it :(. I will look over the code real hard again this week and try to make sense of it all, but maybe I need help from someone who actually sees the problem.

Changed in widelands:
assignee: Tino (tino79) → SirVer (sirver)
wl-zocker (wl-zocker) wrote :

As I see, there are three different things mentioned in here:
- The actual topic: The terrain preview only works with OpenGL, but not with Software rendering (the difference between those might solve the bug).
- A crash when changing the settings (whether OpenGL is used or not). This is, as Tino stated out, bug #1130905
- The incompability between OpenGL and my laptop. No one else seems affected. Sad story, but not important here.
- (the command line that does not work properly, see bug #1169445)

SirVer (sirver) wrote :

Could you guys test one more thing: has 32bit and 16bit color any influence on this?

SirVer (sirver) wrote :

Never mind - I saw the bug now. I should be able to fix it now that I can reproduce it. Thanks for your help, all!

SirVer (sirver) wrote :

Fixed in r6554. It was significantly less critical than I first thought :).

Changed in widelands:
status: Confirmed → Fix Committed
assignee: SirVer (sirver) → nobody
importance: Critical → Medium
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  Edit
Everyone can see this information.

Other bug subscribers