possible bug with BaB tile

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:
denispir
Posts: 183
Joined: March 14th, 2013, 12:26 am

possible bug with BaB tile

Post by denispir » January 17th, 2019, 10:54 am

Hello,

(Wesnoth 1.14.4 on Ubuntu 18.10)

I am designing a map in the map editor. When starting the scenario, an error appears "Unknown tile in map Wwg^BaB\". If I replace the sandstone bridge with either Bp (plank) or Bh (hanging), the map is accepted and all runs finely.

PS: I searched for this BaB sandstone bridge in core/terrain.cfg and could not find it actually. (But it is well in the map editor.)

Thank you all for your great work!
Denis

OT: I'm looking for a "skeleton" kind of terrain overlay or decoration (I mean the dead thing, not the unit type) which I have seen somewhere in a game...

User avatar
josteph
Developer
Posts: 740
Joined: August 19th, 2017, 6:58 pm

Re: possible bug with BaB tile

Post by josteph » January 17th, 2019, 1:25 pm

Moved to Technical Support.

How to reproduce the error? I don't see a "Sandstone Bridge" terrain or a "BaB" terrain anywhere. Do you have any addons installed?

What's the version of wesnoth?
denispir wrote:
January 17th, 2019, 10:54 am
OT: I'm looking for a "skeleton" kind of terrain overlay or decoration (I mean the dead thing, not the unit type) which I have seen somewhere in a game...
It might be a png file, for example {PLACE_IMAGE "items/bones.png" $x1 $y1}.

denispir
Posts: 183
Joined: March 14th, 2013, 12:26 am

Re: possible bug with BaB tile

Post by denispir » January 17th, 2019, 6:01 pm

josteph wrote:
January 17th, 2019, 1:25 pm
How to reproduce the error? I don't see a "Sandstone Bridge" terrain or a "BaB" terrain anywhere. Do you have any addons installed?
What's the version of wesnoth?
Reproducing is just using the editor, placing such a bridge over some water (certainly also over any base terrain type, since as said the error pmay come from the absence of such bridges in core/terrains.cfg).
Wesnoth version is noted in my post: 1.14.4
josteph wrote:
January 17th, 2019, 1:25 pm
denispir wrote:
January 17th, 2019, 10:54 am
OT: I'm looking for a "skeleton" kind of terrain overlay or decoration (I mean the dead thing, not the unit type) which I have seen somewhere in a game...
It might be a png file, for example {PLACE_IMAGE "items/bones.png" $x1 $y1}.
Thenk you!

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

Re: possible bug with BaB tile

Post by Pentarctagon » January 18th, 2019, 12:55 am

denispir wrote:
January 17th, 2019, 6:01 pm
Reproducing is just using the editor, placing such a bridge over some water (certainly also over any base terrain type, since as said the error pmay come from the absence of such bridges in core/terrains.cfg).
There is no BaB terrain in default Wesnoth. Do you have any add-ons installed, or is this a terrain you're trying to make yourself?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

denispir
Posts: 183
Joined: March 14th, 2013, 12:26 am

Re: possible bug with BaB tile

Post by denispir » January 18th, 2019, 4:05 am

This is what I said, there is no such terrain in core/terrains.cfg. But it is definitely there in the map editor, at least by me: select bridges, then the last 3 ones, orange color, are sandstone bridges. I did not install nore make any such thing, and my Wesnoth version is just the standard one for this version of Ubuntu. (Unfortunately I have no idea where the editor takes its terrains from; obviously it's not from terrains.cfg. In what language is the editor coded?)

PS:

The Battle for Wesnoth version 1.14.4
Running on Ubuntu 18.10

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

Data dir: /usr/share/games/wesnoth/1.14
User config dir: /home/USER/.config/wesnoth-1.14
User data dir: /home/USER/.config/wesnoth-1.14
Saves dir: /home/USER/.config/wesnoth-1.14/saves
Add-ons dir: /home/USER/.config/wesnoth-1.14/data/add-ons
Cache dir: /home/USER/.config/wesnoth-1.14/cache

Libraries
=========

Boost: 1.67
OpenSSL/libcrypto: 1.1.0g (runtime 1.1.1)
Cairo: 1.15.10 (runtime 1.15.12)
Pango: 1.42.1 (runtime 1.42.3)
SDL: 2.0.8 (runtime 2.0.8)
SDL_image: 2.0.3 (runtime 2.0.3)
SDL_mixer: 2.0.2 (runtime 2.0.2)
SDL_ttf: 2.0.14 (runtime 2.0.14)

Features
========

Experimental OpenMP support: yes
JPG screenshots: yes
Lua console completion: yes
Legacy bidirectional rendering: yes
D-Bus notifications back end: yes

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

Re: possible bug with BaB tile

Post by Pentarctagon » January 18th, 2019, 5:48 am

I don't really know what else to tell you then. Neither josteph nor I see this terrain in the editor at all, and the terrain string "BaB" simply doesn't exist anywhere in default Wesnoth (grep -Iirn "\bbab\b" finds nothing).
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

User avatar
josteph
Developer
Posts: 740
Joined: August 19th, 2017, 6:58 pm

Re: possible bug with BaB tile

Post by josteph » January 18th, 2019, 2:18 pm

denispir wrote:
January 18th, 2019, 4:05 am
This is what I said, there is no such terrain in core/terrains.cfg. But it is definitely there in the map editor, at least by me: select bridges, then the last 3 ones, orange color, are sandstone bridges.
Here is what I see in the bridges section of the editor. Which one of them is the "sandstone bridge"?
Spoiler:
When you the mouse cursor over the "sandstone bridges", there should be a tooltip with the name of the terrain. What does the tooltip say? If it's not in English, quote it in its original language.
denispir wrote:
January 18th, 2019, 4:05 am
Add-ons dir: /home/USER/.config/wesnoth-1.14/data/add-ons
Is this directory empty?
denispir wrote:
January 18th, 2019, 4:05 am
In what language is the editor coded?
C++, possibly with some Lua and WML.

denispir
Posts: 183
Joined: March 14th, 2013, 12:26 am

Re: possible bug with BaB tile

Post by denispir » January 18th, 2019, 5:09 pm

josteph wrote:
January 18th, 2019, 2:18 pm
denispir wrote:
January 18th, 2019, 4:05 am
This is what I said, there is no such terrain in core/terrains.cfg. But it is definitely there in the map editor, at least by me: select bridges, then the last 3 ones, orange color, are sandstone bridges.
Here is what I see in the bridges section of the editor. Which one of them is the "sandstone bridge"?
Spoiler:
None. The 3 last ones on the image:
bridges.png
bridges.png (167.47 KiB) Viewed 3098 times
josteph wrote: When you the mouse cursor over the "sandstone bridges", there should be a tooltip with the name of the terrain. What does the tooltip say? If it's not in English, quote it in its original language.
"Sandstone Brigde/Bridge (FLat.) -- ^Bab|"
(My install is in english.)
josteph wrote:
denispir wrote:
January 18th, 2019, 4:05 am
Add-ons dir: /home/USER/.config/wesnoth-1.14/data/add-ons
Is this directory empty?
Indeed no! How could it be empty? ;-) This would mean I have never visited the add-on sever (nore scripted anything myself)...

You all seem to presuppose that there is a pb by me, I mean me personly the person, not with the installation or operation of the Wesnoth platform on this computing system I happen to spend time with. This all starts to be annoying. I strictly do not care of this bug, it has no influence on my life, not even precisely on my exploring Wesnoth. I reported it, the best I can, to help us all, the Wesnoth community, firstly you. I would do much in terms of time and effort, if I could (but not explore C++ code, this no --see below). I wanted to search for how the editor fills its terrain database, since obviously at least part of the cause lies there... Thought it may have been Lua or Python code. But the attitude I confront in this thread sincerely does not help: the first answers showed that my initial post, as concise as it was, had not even been read...

The presence of add-ons cannot be a causal factor... but a buggy way the editor may use them to feed its terrain database (different from the engine method), yes.

Sorry for the mood, but maybe it could help further bug reporters be welcome... or at least read.
I have another bug to report, but will definitely shut my stupid mouth.
josteph wrote:
denispir wrote:
January 18th, 2019, 4:05 am
In what language is the editor coded?
C++, possibly with some Lua and WML.
Thank you! And sorry again.

Tad_Carlucci
Developer
Posts: 470
Joined: April 24th, 2016, 4:18 pm

Re: possible bug with BaB tile

Post by Tad_Carlucci » January 18th, 2019, 5:32 pm

Nobody is arguing that it's not a bug. Nor is anyone accusing you of causing it.

We can not fix an issue we can not find. This issue is NOT part of the base Wesnoth. It MUST be part of an add-on. When we know which, we can determine if the root cause is a bug in Wesnoth, itself, which we CAN fix, or an issue with the add-on content, which only the author/maintainer of that content can fix.
I forked real life and now I'm getting merge conflicts.

User avatar
Ravana
Forum Moderator
Posts: 2261
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: possible bug with BaB tile

Post by Ravana » January 18th, 2019, 5:46 pm

Grep your addons directory for BaB. That will show where it is from. Then if that terrain type is defined by your own addon, then the problem is with you, otherwise most likely with whoever created that addon.

User avatar
Adamant14
Posts: 897
Joined: April 24th, 2010, 1:14 pm

Re: possible bug with BaB tile

Post by Adamant14 » January 18th, 2019, 5:50 pm

The add-on UMC Terrain Pack includes such a sandstonebridge.
Author of Antar, Son of Rheor ( SP Campaign) | Development Thread + Feedback Thread + Replays of ASoR

User avatar
josteph
Developer
Posts: 740
Joined: August 19th, 2017, 6:58 pm

Re: possible bug with BaB tile

Post by josteph » January 18th, 2019, 6:47 pm

denispir, I'd like to echo what Tad said. It is a bug, and multiple core developers are participating in this thread, spending their volunteer time trying to reproduce, isolate, and fix it. We have read your post and all our replies were aimed at one thing: figuring out how we can reproduce the issue for ourselves so that the root cause may be identified and fixed. I asked which add-ons you had installed because we tried and failed to reproduce the bug in vanilla wesnoth installations.

Adamant, thanks. I can reproduce the error:

Code: Select all

20190118 18:40:34 error config: map could not be loaded: Unknown tile in map: (Ww^BaB\) 'Ww^BaB\'
and then wesnoth segfaults. I think there are two separate bugs here:

1. The addon's _main.cfg is completely enclosed by #ifdef EDITOR. That's a bug in the addon and should be reported to the addon maintainer. Does anyone have contact information for the author?

2. Wesnoth segfaulted. That should never happen. The last thing before the segfault was that I chose "Custom Maps" from the drop-down in the MP staging screen.

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

Re: possible bug with BaB tile

Post by Pentarctagon » January 18th, 2019, 7:10 pm

I believe that's actually correct for #1, since that's how I have the UMC Music Book add-ons setup. That #ifdef makes it show up in the editor, and then any add-on that wants to use the music needs to add the [binary_path] to any UMC Music Books for the scenario to find the music during an actual game.

So my guess would be that the UMC Terrain Pack is correct, but then this ends up allowing maps to be saved that then don't know how to find the terrains that the editor knows about.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

User avatar
josteph
Developer
Posts: 740
Joined: August 19th, 2017, 6:58 pm

Re: possible bug with BaB tile

Post by josteph » January 18th, 2019, 8:20 pm

Yes, that's exactly what happens. The "Survival Map Pack by EnergiaX" depends on UMC Terrain Pack and loads it explicitly with {~add-ons/UMC_Terrain_Pack/load_UTP.cfg}. I hadn't considered that possibility. So let's say 1) is solved. There's still 2), though: the MP staging screen segfaults when one of the scenarios in the list has an invalid terrain code in its map data.

denispir
Posts: 183
Joined: March 14th, 2013, 12:26 am

Re: possible bug with BaB tile

Post by denispir » January 19th, 2019, 7:36 pm

There's a 1.5 point, as said by Pentarctagon: namely that the editor then knows about this terrain and allows other map designers to use it, as happened in my case, while the engine does not know them. That Wesnoth crashes (not by me) is certainly a distinct issue.

That the editor allows game designers to use their own custom terrain types is great: any alternative, either directly in map file or through WML, is annoying and source of errors. It is not a problem since the add-on's own directory will hold the terrain def, or it's a bug by the author and the engine will complain, just as for any other custom element. But the editor should not then keep (knowledge of) this terrain type and make it available to other game designers, who won't include its defs in their add-on directory, and in fact won't often even know that it is a custom terrain type. This is the real bug in my view.

Post Reply