Load Saved Game Causes Error Crash

Having trouble with the game? Report issues and get help here. Read this first!

Moderators: Forum Moderators, Developers

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
pyroavatar91
Posts: 2
Joined: October 13th, 2018, 11:39 pm

Load Saved Game Causes Error Crash

Post by pyroavatar91 » October 14th, 2018, 5:44 am

Hello Friends,

I've been playing the Legend of the Invincibles (LotI Part 1) campaign add-on with the following mods: 1) Campaign drop mod, 2) Artificat mod, and 3) XP mod. I have played many of the scenarios in the campaign multiple times (all the way up to the "Long Way Home" scenario, it's like scenario 17), but then I decided to restart because I wanted to try a new recall team. I restarted the campaign and played through several turns of the "Banished" scenario (scenario 4), during which I reloaded a saved game since one of my favorite units died, and after I tried to load the saved game, the following error message popped up:

error message.PNG
I did some experimenting with reloading previous saved games and different motions, and I think I identified the problem but don't know how to solve it. I have attached the saved file "Banished-Auto-Save4" (which does not pop up an error and crash when loaded) so that you can replicate my problem.

There's a special armor item that popped up (a feature of the "Campaign drop mod") from moving a unit onto "Rung's Ruin" in the middle top of the map. When I moved my Sword Mage unit (or any other unit for that matter) onto it to claim the item, and then saved the game, and then loaded that newly saved game, the above-mentioned error would pop up and crash the game. If I don't claim the item, the game doesn't crash when I load it later.

As you can tell from the above error message, it references line 319 in the "abilities.cpp" file of the "src\units" folder. I looked in my program "Battle for Wesnoth 1.14.5" folder, but I didn't find any "src" folder or anything like it. The only actual folders were as follows: data, fonts, images, manual, sounds, and translations. I did manage to find the "src" folder from downloading the source files and tried just copying in that folder to my Wesnoth folder. That didn't fix the problem.

Next, I opened the file mentioned to look at the code and see what I could learn. I don't know anything about programming in C++, but when I looked up the original developer's notes of this file's source code (found here), it indicated that "(display::get_singleton())" is supposed to "return display object if a display object exists." I don't really know what that means, but I'm now wondering if the code just doesn't know how to retrieve the information for that item when it comes to loading saved games.

I apologize for the long explanation, but I hope I've provided enough details for this problem to make sense and be able to be replicated. If anyone is familiar with the "Campaign drop mod" and how it may be affected in this LotI campaign, I would appreciate any help. Below are my save and log files as well as windows and Wesnoth build information. Please let me know if you need more information or have other questions. Thanks in advance for your help!

Save Files:

1) Working Save File before picking up item:
LotI1-Banished-Auto-Save4.gz
(284.83 KiB) Downloaded 20 times
2) Safe File after picking up item, resulting in crash error:
LotI1-Banished Turn 4.gz
(285.16 KiB) Downloaded 23 times

Log File:
wesnoth-20181013-175415-4656.log
(685 Bytes) Downloaded 21 times

Build Information:


The Battle for Wesnoth version 1.14.5
Running on Microsoft Windows 10 (10.0.17134)

Game paths
==========

Data dir: C:\Program Files (x86)\Battle for Wesnoth 1.14.5
User config dir: C:\Users\USER\OneDrive\Documents\My Games\Wesnoth1.14
User data dir: C:\Users\USER\OneDrive\Documents\My Games\Wesnoth1.14
Saves dir: C:\Users\USER\OneDrive\Documents\My Games\Wesnoth1.14\saves
Add-ons dir: C:\Users\USER\OneDrive\Documents\My Games\Wesnoth1.14\data\add-ons
Cache dir: C:\Users\USER\OneDrive\Documents\My Games\Wesnoth1.14\cache

Libraries
=========

Boost: 1.59
OpenSSL/libcrypto: 1.1.0f (runtime 1.1.0f)
Cairo: 1.10.2 (runtime 1.10.2)
Pango: 1.30.1 (runtime 1.30.1)
SDL: 2.0.4 (runtime 2.0.4)
SDL_image: 2.0.0 (runtime 2.0.0)
SDL_mixer: 2.0.0 (runtime 2.0.0)
SDL_ttf: 2.0.12 (runtime 2.0.12)

Features
========

Experimental OpenMP support: yes
JPG screenshots: no
Lua console completion: yes
Legacy bidirectional rendering: no
Win32 notifications back end: yes

User avatar
Pentarctagon
Forum Administrator
Posts: 3571
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Load Saved Game Causes Error Crash

Post by Pentarctagon » October 14th, 2018, 10:34 am

Posted my results here.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

gfgtdf
Developer
Posts: 1104
Joined: February 10th, 2013, 2:25 pm

Re: Load Saved Game Causes Error Crash

Post by gfgtdf » October 14th, 2018, 12:02 pm

this seems like a bug in the campaign drop mod, you can fix this by replacing all occurances of 'cdm_min_resistance' with 'wc2_min_resistance' in the .cfg files (not in the .lua files!) of the campaign_drop_mod addon and in your savefile.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.

gfgtdf
Developer
Posts: 1104
Joined: February 10th, 2013, 2:25 pm

Re: Load Saved Game Causes Error Crash

Post by gfgtdf » October 14th, 2018, 10:46 pm

I also uploaded a new version of campaign drop mod to the server you can now just upload your campaign drop mod addon, load the working file (Banished-Auto-Save4.gz) and the erro will no longer happen.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.

pyroavatar91
Posts: 2
Joined: October 13th, 2018, 11:39 pm

Re: Load Saved Game Causes Error Crash

Post by pyroavatar91 » October 16th, 2018, 6:01 pm

Thank you everyone! I appreciate the help!

Post Reply