Scenario doesn't load (details provided)
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
- Lord-Knightmare
- Discord Moderator
- Posts: 2363
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Scenario doesn't load (details provided)
Hello, I need help with a problem:
On loading a new recently-coded scenario, I encountered a bug: The cause of the bug was this line:
I removed it and then reloaded the save file and astonishingly, Wesnoth crashed.
I carried out the same procedure with launching Wesnoth from Terminal and got this:
My campaign repository
It's dependency
The save file: Link to the scenario file that caused the error.
On loading a new recently-coded scenario, I encountered a bug: The cause of the bug was this line:
Code: Select all
{FORCE_CHANCE_TO_HIT side=1,2,8,9,10,11,12 id="Devan" 0 (
[variable]
name=turn_number
greater_than=1
[/variable]
)}
I carried out the same procedure with launching Wesnoth from Terminal and got this:
Code: Select all
Wesnoth(2337,0xacda6a28) malloc: *** mmap(size=536870912) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Wesnoth(2337,0xacda6a28) malloc: *** mmap(size=143360) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Wesnoth(2337,0xacda6a28) malloc: *** mmap(size=268582912) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Ran out of memory. Aborted.
It's dependency
The save file: Link to the scenario file that caused the error.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Scenario doesn't load (details provided)
I haven't looked into it properly, but do you remember that nested quoted string problems (quotation mark missing somewhere) is usually reported in a completely different line? FORCE_CHANCE_TO_HIT macro invocation is unlikely to be the cause, because it looks correct and the game crashes even without it (the malloc problem from terminal looks like some sort of obscure broken cycle, probably something got stuck while loading the WML code). Aren't you using a syntax highlighter that marks the places that are in quotation marks? It's excellent to find these problems.
If you still can't find it, I recommend this procedure, it never fails.
If you still can't find it, I recommend this procedure, it never fails.
Re: Scenario doesn't load (details provided)
Well, there's a missing closing quote on line 205.
- Lord-Knightmare
- Discord Moderator
- Posts: 2363
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Scenario doesn't load (details provided)
@zookeeper: I fixed that, loaded the scenario and got this:
@Dugi: That sounds like a good method. I shall try it out and let you guys know what is actually behind this.
EDIT: Tried it out and found the corrupted code:
The rest of scenario had bugs, but I have already fixed them.
Removed that FORCED_CHANCE_TO_HIT macro and then reloaded. This time I got another error:
Removed those #ifver WESNOTH_VERSION and the second #endif from that file and then reloaded the same file. This time the game crashed without an error message.@Dugi: That sounds like a good method. I shall try it out and let you guys know what is actually behind this.
EDIT: Tried it out and found the corrupted code:
Code: Select all
{ON_SIGHTING One 1 id="Devan" (
[message]
speaker="Fardin"
message= _ "Hey, everybody, that accursed demon lord is on that floating castle!"
[/message]
[message]
speaker="Jahin"
message= _ "What is the matter, Devan? Are you too cowardice to face me in direct combat?"
[/message]
[message]
speaker="Devan"
message= _ "Jahin of Irdya, I am astonished that you have arrived here at the very moment I was summoning an entire army to destroy you!"
[/message]
[message]
speaker='Rharcyn"
message= _ "Jahin, what should we do? We cannot reach him and our aerial forces are insufficient for battle against him."
[/message]
[message]
speaker="Jahin"
message= _ "Rharcyn, I know that he is an inaccessible location and thus, we don't have to attack him at all. Our main goal is to close this portal and in doing that, we send Devan away for good."
[/message]
)}
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Scenario doesn't load (details provided)
This is kind of off-topic, but...
Is there a particular reason you are posting screenshots of the error message instead of using the convenient Copy button in it and pasting the resulting text? As the author of the relevant code, I would like to know if there’s an issue with the dialog on platforms other than Linux and Windows (besides the obvious issue with the add-on name not being displayed like it should for some reason — do you have an
EDIT: Some quick testing revealed that the add-on name indeed isn’t displayed for that reason and I have committed a fix to both master and 1.12 accordingly. Please confirm if my suspicion was correct.
Is there a particular reason you are posting screenshots of the error message instead of using the convenient Copy button in it and pasting the resulting text? As the author of the relevant code, I would like to know if there’s an issue with the dialog on platforms other than Linux and Windows (besides the obvious issue with the add-on name not being displayed like it should for some reason — do you have an
_info.cfg
file sitting in the add-on dir that doesn’t have a title=
attribute?).EDIT: Some quick testing revealed that the add-on name indeed isn’t displayed for that reason and I have committed a fix to both master and 1.12 accordingly. Please confirm if my suspicion was correct.
Last edited by Iris on June 13th, 2014, 6:42 am, edited 1 time in total.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
- Lord-Knightmare
- Discord Moderator
- Posts: 2363
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Scenario doesn't load (details provided)
Wait, there was a Copy button...?shadowm wrote: Is there a particular reason you are posting screenshots of the error message instead of using the convenient Copy button in it and pasting the resulting text?
Yes, theAs the author of the relevant code, I would like to know if there’s an issue with the dialog on platforms other than Linux and Windows (besides the obvious issue with the add-on name not being displayed like it should for some reason — do you have an_info.cfg
file sitting in the add-on dir that doesn’t have atitle=
attribute?).
_info.cfg
file of my add-on does not have a title=
attribute.Yes, your suspicion was correct. Thank you for fixing that.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Scenario doesn't load (details provided)
Yes, it’s the button with the “two pages of paper” icon. Unfortunately, this “copy” icon, while apparently standard in the graphical user interfaces of (at least) Microsoft Windows and Android, does not appear to be used in graphical user interfaces native to (at least) your computer’s operating system.Lord-Knightmare wrote:Wait, there was a Copy button...? :augh: :doh: :shock: