Does not start (could not set video mode) using too large resolution in fullscreen mode

Bug #704637 reported by JohGro
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Undecided
Unassigned

Bug Description

When starting the game from terminal (with external screen connected) it fails, stating that it is unable to set window mode.

My guess is that I have played the game at 1366x768 before (on the laptops own screen), but currently only my external 1280x1024 screen is active, and therefore no 1366x768 mode is available to the x-server at the moment. My operating system is debian squeeze with widelands 15RC1.

I would expect the game to fallback to some lower resolution, but instead it just refuses to start. After I edit the config-file and change xres and yres from 1366/768 to 1280/1024, the game starts without problems.

The output when attempting to start with bad resolution set is:
----------------------------------------------
johan@johan-laptop:~$ widelands
Adding directory:/usr/share/games/widelands
Version file found with id "Build15RC1" (real "Build15RC1" )
No version file found
Adding directory:/usr/share/games/widelands
Version file found with id "Build15RC1" (real "Build15RC1" )
No version file found
Adding directory:.
No version file found
Set home directory: /home/johan/.widelands
No version file found
LANG en, LANGUAGE en:en
textdomain widelands @ share/games/widelands/locale
using locale en
SDL_VIDEODRIVER=&
Graphics: Trying Video driver: 0 x11 SDL_VIDEODRIVER=x11
Graphics: Trying FULLSCREEN

Caught exception (of type '11_wexception') in outermost handler!
The exception said: [/build/buildd-widelands_15-2+b1-amd64-8JvMw8/widelands-15/src/graphic/graphic.cc:146] could not set video mode: No video mode large enough for 1366x768

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

johan@johan-laptop:~$
--------------------------------

Tags: crash

Related branches

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

Thanks for reporting this issue.
I see the same on Ubuntu 10.10 with Widelands bzr r5801. I get the following error:
Graphics: Trying FULLSCREEN
Graphics: Try to set Videomode 1366x768 32Bit
terminate called after throwing an instance of '_wexception'
  what(): [/home/user/widelands/src/graphic/graphic.cc:143] Graphics: could not set video mode: No video mode large enough for 1366x768
Avbrutt (SIGABRT)

What I did to provoke this was to edit the resolution in ~/.widelands/config to a bigger resolution than my screen can handle. The interesting part is that it only crashes if the game is set to fullscreen as well. When running the game in windowed mode it ran fine.

Changed in widelands:
status: New → Confirmed
tags: added: cra
tags: added: crash
removed: cra
summary: - Does not start (could not set video mode) (Build15RC1)
+ Does not start (could not set video mode) using too large resolution in
+ fullscreen mode
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Would it be possible to fall back to windowed mode and/or a default resolution (800x600) if the initial videomode could not be set?

Changed in widelands:
status: Confirmed → Fix Committed
milestone: none → build18-rc1
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.