Single player campaigns no longer work

Bug #1838193 reported by Tino
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
Undecided
Unassigned

Bug Description

If i do try to start a single player game campaign mission with current trunk, i get the following error:

This is Widelands Version unofficial-git-b'668f793e4e' (Release)
Set home directory: C:\Users\x.xxx\.widelands
Adding directory: c:\data\git\widelands\data
selected language: (system language)
Graphics: Try to set Videomode 800x600
Graphics: OpenGL: Version "4.5.0 - Build 25.20.100.6576"
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 16
Graphics: SDL_GL_STENCIL_SIZE is 0
Graphics: SDL_GL_ACCUM_RED_SIZE is 16
Graphics: SDL_GL_ACCUM_GREEN_SIZE is 16
Graphics: SDL_GL_ACCUM_BLUE_SIZE is 16
Graphics: SDL_GL_ACCUM_ALPHA_SIZE is 16
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 0
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.50 - Build 25.20.100.6576"
**** GRAPHICS REPORT ****
 VIDEO DRIVER windows
 pixel fmt 370546692
 size 800 600
**** END GRAPHICS REPORT ****
Style Manager: Reading style templates took 6ms
**** SOUND REPORT ****
SDL version: 2.0.9
SDL_mixer version: 2.0.4
**** END SOUND REPORT ****
Initializing economy serial
There's no configuration file, using default values.
lastserial: 0

Unexpected error during the game
RealFSImpl::write: could not open file for writing: C:\Users\x.xxx\.widelands\save\campaigns.conf

My userdir "x.xxx" does contain a dot, but this seems no problem when saving/loading/viewing replays or saving the config.
I think there were some changes recently to change how widelands handles which missions are available and the missing file "campaigns.conf" became obsolete? But i cannot find the commit....

Related branches

Revision history for this message
Tino (tino79) wrote :

It is missing a check if the save directory already exists:

 src/ui_fsmenu/campaigns.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/ui_fsmenu/campaigns.cc b/src/ui_fsmenu/campaigns.cc
index 1a84f5aeb9..5b96ca98e1 100644
--- a/src/ui_fsmenu/campaigns.cc
+++ b/src/ui_fsmenu/campaigns.cc
@@ -37,6 +37,7 @@ const std::string kCampVisFileLegacy = "save/campvis";
 Campaigns::Campaigns() {
  // Load solved scenarios
  std::unique_ptr<Profile> campvis;
+ g_fs->ensure_directory_exists(kSaveDir);
  if (!(g_fs->file_exists(kCampVisFile))) {
   // There is no campaigns.conf file - create one.
   campvis.reset(new Profile(kCampVisFile.c_str()));

GunChleoc (gunchleoc)
tags: added: campaign
tags: added: savegame
GunChleoc (gunchleoc)
summary: - Single player campaigns no longer work on windows
+ Single player campaigns no longer work
Changed in widelands:
milestone: none → build21-rc1
status: New → In Progress
GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
Revision history for this message
Tino (tino79) wrote :
Changed in widelands:
status: Fix Committed → Won't Fix
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.