Again: Heir to the Throne-Konrad invisible after save-load
Moderator: Forum Moderators
Forum rules
Before reporting issues in this section, you must read the following topic:
Before reporting issues in this section, you must read the following topic:
Again: Heir to the Throne-Konrad invisible after save-load
Hello and welcome to myself, this will be my first post 
I've played the game since three days back and I've come across a really irritating bug, described below. I've also done some research and will try to explain what I think is wrong. On with the show!
Description:
After loading a game from the tutorial "Heir To The Throne", the sprite-set for Konrad cannot be found (as reported by the stderr-excerpt below). Starting a new game correctly lets the unit show.
Excerpt from stderr.txt:
This goes on for the 'konrad-lord-bow', 'konrad-lord-bow-defend'; in other words all images relating to Konrad.
As shown in the above snippet, the game looks for the unit in another campaign altogether.
System specs:
Intel Core2Duo laptop, 2GB RAM, Windows XP
Running Wesnoth 1.6.1
update:
Making a copy of the directory Heir_to_the_Throne and naming it Under_the_Burning_Sun lets Konrad's icon-set load, unsurprisingly. Although it seems as if he is flipped horizontally, compared to his toolbox image.

I've played the game since three days back and I've come across a really irritating bug, described below. I've also done some research and will try to explain what I think is wrong. On with the show!
Description:
After loading a game from the tutorial "Heir To The Throne", the sprite-set for Konrad cannot be found (as reported by the stderr-excerpt below). Starting a new game correctly lets the unit show.
Excerpt from stderr.txt:
Code: Select all
20090419 21:13:36 debug engine: Building unit type Lord, level 4
20090419 21:13:36 debug filesystem: Looking for 'units/konrad-lord-leading.png'.
20090419 21:13:36 debug filesystem: checking 'C:/Documents and Settings/<my acc here>/My Documents/My Games/Wesnoth1.6/images/'
20090419 21:13:36 debug filesystem: checking 'D:/Games/Wesnoth/images/'
20090419 21:13:36 debug filesystem: checking 'C:/Documents and Settings/<my acc here>/My Documents/My Games/Wesnoth1.6/data/campaigns/Under_the_Burning_Suns/images/'
20090419 21:13:36 debug filesystem: checking 'D:/Games/Wesnoth/data/campaigns/Under_the_Burning_Suns/images/'
20090419 21:13:36 debug filesystem: checking 'C:/Documents and Settings/<my acc here>/My Documents/My Games/Wesnoth1.6/data/core/images/'
20090419 21:13:36 debug filesystem: checking 'D:/Games/Wesnoth/data/core/images/'
20090419 21:13:36 debug filesystem: checking 'C:/Documents and Settings/<my acc here>/My Documents/My Games/Wesnoth1.6'
20090419 21:13:36 debug filesystem: checking 'D:/Games/Wesnoth/'
20090419 21:13:36 debug filesystem: not found
20090419 21:13:36 error display: could not open image 'units/konrad-lord-leading.png'
As shown in the above snippet, the game looks for the unit in another campaign altogether.
System specs:
Intel Core2Duo laptop, 2GB RAM, Windows XP
Running Wesnoth 1.6.1
update:
Making a copy of the directory Heir_to_the_Throne and naming it Under_the_Burning_Sun lets Konrad's icon-set load, unsurprisingly. Although it seems as if he is flipped horizontally, compared to his toolbox image.
Last edited by mar on April 21st, 2009, 3:28 pm, edited 3 times in total.
Re: Bug: Konrad sprites cannot be found after load
This one is due to the test scenarios leaking; it should soon be fixed.mar wrote:As shown in the above snippet, the game looks for the unit in another campaign altogether.
As for your issue, it kind of rings a bell. Could it be that you are using a start-of-scenario savegame?
Re: Bug: Konrad sprites cannot be found after load
It happens when I load any save-game [from that campaign].
I tried removing a #IFDEF-case from the Under the Burning Suns campaign config file, but it didn't help. Can I do something else to patch the issue for now? I don't like having the duplicate folder around, feels like too much of an ugly hack
edit: added clarification
I tried removing a #IFDEF-case from the Under the Burning Suns campaign config file, but it didn't help. Can I do something else to patch the issue for now? I don't like having the duplicate folder around, feels like too much of an ugly hack

edit: added clarification
Re: Bug: Konrad sprites cannot be found after load
You could look at the data/scenario-test.cfg file (not sure where it is located on Windows) and modify the third line. Presumably, this third line is what made it work when you renamed the directory, so changing this line instead should make it work without renaming the directory.mar wrote:Can I do something else to patch the issue for now?
Re: Bug: Konrad sprites cannot be found after load
That didn't work, but I looked in the Wesnoth/data/_main.cfg file and commented out row 18, 19 and 20:
It's working now! Thanks for the hand, I hope this thread proves useful if anyone else is having the same issue.
update:
After reboot, it is now broken again. This is confusing me to no end, surely there must be ONE file from where these settings stem?
Code: Select all
# {scenario-test.cfg}
# {scenario-formula.cfg}
# {scenario-formula-recruitment.cfg}
update:
After reboot, it is now broken again. This is confusing me to no end, surely there must be ONE file from where these settings stem?
Re: Again: Heir to the Throne-Konrad invisible after save-load
Don't think it's related to burning suns very much, just happens to check that folder after freaking out when it messes up the path to where the images folder is. Could be wrong though, I'm not super tech savy and just going off your debug post.
The smallest fix I can find is to create a .cfg to explicitly say what path to look in (copying the code from an already existing cfg for something else). I'm only messing with addons so in userdata/data/campaigns I make a new .cfg with the same name as the campaign folder. The only addon I have with its .cfg already in that folder is The War of Terrador, so I just copy over everything contained in that and replace war of terrador with the name of the campaign I'm trying to fix. Everything works fine, if I delete the .cfg it'll break again.
You could try something similar in data/campaigns.
The smallest fix I can find is to create a .cfg to explicitly say what path to look in (copying the code from an already existing cfg for something else). I'm only messing with addons so in userdata/data/campaigns I make a new .cfg with the same name as the campaign folder. The only addon I have with its .cfg already in that folder is The War of Terrador, so I just copy over everything contained in that and replace war of terrador with the name of the campaign I'm trying to fix. Everything works fine, if I delete the .cfg it'll break again.
You could try something similar in data/campaigns.
Re: Again: Heir to the Throne-Konrad invisible after save-load
The path needs to be set somehow (at least that's what I keep telling myself, and Silene's message above hints as much)
But it should then be possible to simply skip this hard wiring of paths.. at least that would make sense to me.
How to do this, I don't know.
But it should then be possible to simply skip this hard wiring of paths.. at least that would make sense to me.
How to do this, I don't know.
Re: Bug: Konrad sprites cannot be found after load
Could you try to simply physically remove the test scenario files? (And to avoid any issue, please also remove the cache directory used by Wesnoth, it should be sibling to the savegame directory.) I'm starting to be suspicious of the "_main.cfg" concept (just commenting the lines may be useless), someone messed real bad with that.mar wrote:After reboot, it is now broken again. This is confusing me to no end, surely there must be ONE file from where these settings stem?
Re: Again: Heir to the Throne-Konrad invisible after save-load
This is a step-by-step description of what I tried:
1. removed the 'cache' directory
2. took '/data/campaigns/Under_the_Burning_Sun/' and '/data/scenario-*.cfg' and moved them to a newly created directory named "Tomatoes" to ward off any black magic the game might be performing
3. launched Wesnoth. Problem persists.
Experimenting with these settings (not saying they're the cause of this behaviour): I load a scenario from the beginning, Konrad is invisible. If I then try to load say round 4, Konrad will still be invisible.
If I on the other hand load round 4 first, Konrad will be visible. Loading the scenario-start directly after this keeps Konrad "intact". Even if I quit the game to the main menu and reload the scenario from the start, he'll be visible.
update: Ran a --log-debug=all again and when I'm running the scenario from start I get errors for the missing scenario-*.cfg files. In addition the game isn't even looking in the /campaign/ path for any icons, it's merely checking out the standard repositories.
Interesting enough, after quitting the game to desktop, relaunching it and loading round 6, I got no errors whatsoever. Which leads me to believe that a path to these resources is, for some reason, included in the start-of-scenario-saves, which also carries its own set of paths that overrides anything else..
update 2: I can't find anything in my scenario-start save 'HttT-The_Siege_of_Elensefar' that indicates any paths.
1. removed the 'cache' directory
2. took '/data/campaigns/Under_the_Burning_Sun/' and '/data/scenario-*.cfg' and moved them to a newly created directory named "Tomatoes" to ward off any black magic the game might be performing
3. launched Wesnoth. Problem persists.
Experimenting with these settings (not saying they're the cause of this behaviour): I load a scenario from the beginning, Konrad is invisible. If I then try to load say round 4, Konrad will still be invisible.
If I on the other hand load round 4 first, Konrad will be visible. Loading the scenario-start directly after this keeps Konrad "intact". Even if I quit the game to the main menu and reload the scenario from the start, he'll be visible.
update: Ran a --log-debug=all again and when I'm running the scenario from start I get errors for the missing scenario-*.cfg files. In addition the game isn't even looking in the /campaign/ path for any icons, it's merely checking out the standard repositories.
Interesting enough, after quitting the game to desktop, relaunching it and loading round 6, I got no errors whatsoever. Which leads me to believe that a path to these resources is, for some reason, included in the start-of-scenario-saves, which also carries its own set of paths that overrides anything else..
update 2: I can't find anything in my scenario-start save 'HttT-The_Siege_of_Elensefar' that indicates any paths.
Re: Again: Heir to the Throne-Konrad invisible after save-load
Because that's not the way it works. The savegame file contains the campaign identifier. So, after loading it, the engine loads all the .cfg files related to the campaign, and that's how it is supposed to notice that the campaign stores some of its pictures in a specific directory. Note that the files are not reloaded if you haven't changed campaigns in the meantime, which explains why you could still see Konrad when loading a start-of-scenario savefile just after loading a middle-of-scenario savefile.mar wrote:I can't find anything in my scenario-start save 'HttT-The_Siege_of_Elensefar' that indicates any paths.
So, just to make sure everything is fine (or at least within expectations), can you confirm that
- the game no longer explores the UtBS directories now that you have removed the test scenarios?
- after launching Wesnoth, only start-of-scenario savegames are messed?
- you can get Konrad to show in them by first loading a middle-of-scenario savegame?
Re: Again: Heir to the Throne-Konrad invisible after save-load
I can confirm the points on your list.
Out of curiousity, I compared the round 6 save to the one from the start.
The only discrepancy I could spot in the unit declaration for Konrad was that the start-save switched #textdomain to 'wesnoth-httt' while round 6 had that switch before the unit declaration was opened.

Out of curiousity, I compared the round 6 save to the one from the start.
The only discrepancy I could spot in the unit declaration for Konrad was that the start-save switched #textdomain to 'wesnoth-httt' while round 6 had that switch before the unit declaration was opened.
And thank you for working on the gameAnd, by the way, thanks for your numerous experiments on this matter.

Re: Again: Heir to the Throne-Konrad invisible after save-load
Is there a resolution for this problem? I am running v1.6.1 on Windows XP. When I load my auto-save for Bay of Pearls, Konrad is invisible, as described above.
I can still see the red ring around his feet, and his health bar.
Edit: The problem appears to be fixed if I load one of the turn saves, rather than the general autosave not associated with a turn.
I can still see the red ring around his feet, and his health bar.
Edit: The problem appears to be fixed if I load one of the turn saves, rather than the general autosave not associated with a turn.
Re: Again: Heir to the Throne-Konrad invisible after save-load
I can confirm this issue!
These are the step I went on: I was playing the Heir to the Throne campaign (Normal difficulty) and when I arrived to the "Muff Malal's Peninsula" mission I decided to stop playing. When I restarted Wesnoth after some days, I went to the Load page and I saw many autosaves, so I decided to reduce the number of autosaved games to 5 (Preferences Menu), then I manually deleted all the intra-mission savegames leaving only the "scenario-start" ones, including obviously "HttT-Muff Malal's Peninsula.gz". When I loaded that file the mission was restarting but actually Konrad became invisible, leaving only the crown and red circle below it...

Then I tried to reload another savegame of the HttT Campaign but now each one of them gives the same result, loading the game but Konrad remains invisible... did he secretly reached a superior level of super-powers?
Unfortunately even if I restart the Campaign from the beginning it still remains the same... is there a feasible solution to this? Now I'm trying to reinstall Wesnoth to see if the problem will be fixed, then I'll post here the outcome.
I'm running Wesnoth under Windows XP SP3 and this is my stderr.txt, if it can be of any help for the developers:
UPDATE: I re-installed the game and now Konrad has become visible again... now I try to reproduce the problem starting a campaign and loading intra-mission and start-scenario auto-saves.
Maybe is something related to the location of the user data? (C:\Program Files\Wesnoth or C:\Documents and Settings\User\Wesnoth...)
Or maybe the other steps I took (deleting partial savegames, adjusting preferences...), I have to check these out.

These are the step I went on: I was playing the Heir to the Throne campaign (Normal difficulty) and when I arrived to the "Muff Malal's Peninsula" mission I decided to stop playing. When I restarted Wesnoth after some days, I went to the Load page and I saw many autosaves, so I decided to reduce the number of autosaved games to 5 (Preferences Menu), then I manually deleted all the intra-mission savegames leaving only the "scenario-start" ones, including obviously "HttT-Muff Malal's Peninsula.gz". When I loaded that file the mission was restarting but actually Konrad became invisible, leaving only the crown and red circle below it...


Then I tried to reload another savegame of the HttT Campaign but now each one of them gives the same result, loading the game but Konrad remains invisible... did he secretly reached a superior level of super-powers?

Unfortunately even if I restart the Campaign from the beginning it still remains the same... is there a feasible solution to this? Now I'm trying to reinstall Wesnoth to see if the problem will be fixed, then I'll post here the outcome.
I'm running Wesnoth under Windows XP SP3 and this is my stderr.txt, if it can be of any help for the developers:
Code: Select all
Battle for Wesnoth v1.6.1
Started on Thu Apr 30 00:07:14 2009
Automatically found a possible data directory at C:/Programmi/Wesnoth
Data directory: C:/Programmi/Wesnoth
User configuration directory: C:/Documents and Settings/Zero_G/Documenti/My Games/Wesnoth1.6
Checking video mode: 1280x800x32...
setting mode to 1280x800x32
20090430 00:07:46 error general: no location found for 'data/campaigns/Era_of_Myths/translations', not adding textdomain
20090430 00:08:22 error display: could not open image 'units/konrad-fighter.png'
20090430 00:08:22 error display: could not open image 'units/konrad-fighter-defend.png'
20090430 00:08:22 error display: could not open image 'units/konrad-fighter-attack-1.png'
20090430 00:08:22 error display: could not open image 'units/konrad-fighter-attack-2.png'
20090430 00:08:42 error display: could not find image for report: 'units/konrad-fighter.png'
20090430 00:08:48 error general: escape pressed..showing quit
20090430 00:09:10 error display: could not find image for report: 'units/konrad-fighter.png'
20090430 00:09:21 error general: escape pressed..showing quit
Maybe is something related to the location of the user data? (C:\Program Files\Wesnoth or C:\Documents and Settings\User\Wesnoth...)
Or maybe the other steps I took (deleting partial savegames, adjusting preferences...), I have to check these out.
-=[ Zero_G ]=-
Re: Again: Heir to the Throne-Konrad invisible after save-load
A temporary solution to patch up things until 1.6.2 comes out.
Open
find
replace with
restart wesnoth. The game should load with correct sprites.
Now the disclaimer.
1) Above fix works (and doing similar stuff to other campaigns will work to), but moving [binary_path] outside campaign define is generaly not advisable because it can interfere with other add-ons. For this reason I strongly suggest to reverse the patch before you start playing something else than HttT.
2) Tampering with /data folder is still advisable only if you know what you're doing or you're exactly following instruction of someone who does
3) Allways do backups :]
Open
Code: Select all
data\campaigns\Heir_To_The_Throne\_main.cfg
Code: Select all
#ifdef CAMPAIGN_HEIR_TO_THE_THRONE
[binary_path]
path=data/campaigns/Heir_To_The_Throne
[/binary_path]
Code: Select all
[binary_path]
path=data/campaigns/Heir_To_The_Throne
[/binary_path]
#ifdef CAMPAIGN_HEIR_TO_THE_THRONE
Now the disclaimer.
1) Above fix works (and doing similar stuff to other campaigns will work to), but moving [binary_path] outside campaign define is generaly not advisable because it can interfere with other add-ons. For this reason I strongly suggest to reverse the patch before you start playing something else than HttT.
2) Tampering with /data folder is still advisable only if you know what you're doing or you're exactly following instruction of someone who does

3) Allways do backups :]
Somewhere, between the sacred silence and sleep.
Disorder.
Disorder.
Re: Again: Heir to the Throne-Konrad invisible after save-load
Unfortunately I re-installed the game just before your reply, so now the issue has gone, however if it represents I'll do what you said... waiting for some future fix, thanks for the reply! 
PS: is there some expected release date for the 1.6.2 version?

PS: is there some expected release date for the 1.6.2 version?
-=[ Zero_G ]=-