Widelands does not start if PC has OpenGL problems

Bug #1098263 reported by fuchur
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Medium
Unassigned

Bug Description

I installed bzr6485 from Tino's page on an old Notebook with Windows XP SP3. When starting Widelands the frame of a command window appeared with the title SDL app or something similar. This disappeared immediately and nothing more happend.

The stderr.txt file states the following:

Caught exception (of type '11_wexception') in outermost handler!
The exception said: [c:/data/repo/trunk/src/graphic/render/gl_surface_texture.cc:54] No support for GL_ARB_framebuffer_object or GL_ARB_framebuffer_object in OpenGL implementation. One of these is needed for Widelands in OpenGL mode. You can try launching Widelands with --opengl=0.

This should not happen. Please file a bug report on version bzr6485[trunk](Release).
and remember to specify your operating system.

I tried the mentioned parameter --opengl=0, then widelands starts normal.

Maybe it's possible to catch that kind of error and switch to no OpenGL mode automatically. Or at least add an entry to the start menu "Widelands - no OpenGL" using that parameter. After the first sucessful start the config file is created and the problem is avoided.

Tags: opengl

Related branches

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

I think the proper solution would be to catch such errors and fall back to software rendering. From what I remember, the config file is created upon run if it doesn't exist so it should be easy to register which renderer should be used.

The user should of course receive feedback in some form upon first running WL that opengl is default, but since this was not supported the game falls back to software rendering.

tags: added: opengl
Changed in widelands:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Jens Beyer (qcumber-some) wrote :
Revision history for this message
SirVer (sirver) wrote :

fuchur, can you verified this is fixed for you?

Changed in widelands:
status: Confirmed → Incomplete
Revision history for this message
fuchur (fuchur77) wrote :

Yes, I will test it. I hope that I find the time during the weekend.

Revision history for this message
fuchur (fuchur77) wrote :

Ok, I uninstalled the previous build, removed the config file and installed build 6594. Unfortunately the behaviour is still the same, also the content of the stderr file.

The stdout file mentions something of OpenGL enabled.

Set home directory: C:\Dokumente und Einstellungen\xxx\.widelands
No version file found
There's no configuration file, using default values.
Widelands executable directory: C:\Programme\Widelands
Adding executable directory to search path
No version file found
Adding directory:.
No version file found
Adding directory: C:\Programme\Widelands
No version file found
selected language: (system language)
SDL_VIDEODRIVER=&
Graphics: Trying Video driver: 0 windib SDL_VIDEODRIVER=windib
Graphics: Trying opengl
Graphics: Try to set Videomode 800x600 16Bit
Graphics: Setting video mode was successful
Graphics: OpenGL: OpenGL enabled
Graphics: OpenGL: Double buffering enabled
Graphics: OpenGL: Max texture size: 2048
Graphics: OpenGL: Number of aux buffers: 0
Graphics: OpenGL: Number of stencil buffer bits: 8
Graphics: OpenGL: Maximum number of textures for multitextures: 3
Graphics: OpenGL: Version 1.3 "1.3.3927 WinXP Release"
Graphics: OpenGL: Textures must have a size power of two
Graphics: OpenGL: Multitexture capabilities sufficient
**** GRAPHICS REPORT ****
 VIDEO DRIVER windib
 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 003eade8
 size 800 600
**** END GRAPHICS REPORT ****
Graphics: flags: 2

-----stderr-------
Caught exception (of type '11_wexception') in outermost handler!
The exception said: [c:/data/bzr/widelands/trunk/src/graphic/render/gl_surface_texture.cc:53] No support for GL_ARB_framebuffer_object or GL_ARB_framebuffer_object in OpenGL implementation. One of these is needed for Widelands in OpenGL mode. You can try launching Widelands with --opengl=0.

This should not happen. Please file a bug report on version bzr6594[trunk](Release).
and remember to specify your operating system.
-----end stderr-----
It seems that OpenGL is detected and works in principle, but some functions are not supported, like the GL_ARB_framebuffer_object

Revision history for this message
Jens Beyer (qcumber-some) wrote :

Oh well... thanks for testing this, fuchur.

Now, with the line

Graphics: OpenGL: OpenGL enabled

things look completely different.

I will check if we can test for availability of GL objects while testing the video modes...

Revision history for this message
Jens Beyer (qcumber-some) wrote :

It is possible to check GL_EXTENSIONS for the string GL_ARB_framebuffer_object or GL_EXT_framebuffer_object.

I can not implement it right now... but I guess for most of you it is an easy task.

Revision history for this message
SirVer (sirver) wrote :

There is already code for this: gl_surface_texture.cc in line 33. In fact, if you move the call to GLSurfaceTexture::Initialize() to inside the check for opengl and modify this a bit to maybe not throw (or if you catch the exception) you can fix this.

Wanna try?

Changed in widelands:
status: Incomplete → Triaged
Changed in widelands:
status: Triaged → Fix Committed
milestone: none → build18-rc1
Revision history for this message
fuchur (fuchur77) wrote :

I tested it now with build 6629 and got at startup the following message:
Fallback settings in effect
Your video settings could not be enabled, and fallback settings are in effect. Please check the graphics options!

The selected graphics options were 800x600, 16 bit, no fullscreen, OpenGL enabled. I can start a new game, but unfortunately in the game all the buttons missing. The ones to save a game, show statistics, exit the game and so on. And the window looks more like 640x480 than 800x600, maybe the buttons are just not visible because of that. As I know that for me the problem is OpenGL I can disable it in the advanced settings and everything works fine. But after changing the graphics options I have to exit the game first and restart it, otherwise it crashes when I click on "new game".

The good thing is that widelands now starts with a warning and doesn't simply disappear like before :-)
And this warning comes everytime I start widelands until I disable OpenGL, so a user can find out the reason for it. Thanks for changing that!

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.