Assurtion Failed

Discuss and distribute tools and methods for modding. Moderator - Grognak
Post Reply
Accuracy
Posts: 1
Joined: Tue Aug 06, 2013 5:11 pm

Assurtion Failed

Post by Accuracy »

I was working on a little mod which changes the Kernel ship starting weapons, adds a new crew member and changes weapon/energy levels. Unfortunately after packing my files back I always get this error:


Assertion failed!
Program: src/rapidxml/rapidxml.hpp
Line:1383

Expession:text

I would greatly appreciate if someone has told me what am I doing wrong and suggest a possible solution.

I included link for my edited files here: http://www.mediafire.com/download/mjp7n ... estral.rar

Thank you for your help.
UltraMantis
Posts: 2125
Joined: Thu Sep 20, 2012 3:17 pm

Re: Assurtion Failed

Post by UltraMantis »

Are you sure the error is in the code and not the file structure?

The blueprints begine with: <!--tempfix--> but that may be irrelevant.
There are spaces before the ending /> i'm not sure if they cause trouble or not, but i havent got them in my blueprints.
<droneList count="0" drones="0" /> does not end with /droneList>
There is a missing <explosion> tag that should be before </explosion> that last tag is also a typo
You have too many weapon mounts but that may be irrelevant
Report spam using the handy Report Button Mod.
dalolorn
Posts: 532
Joined: Sun Sep 23, 2012 8:06 am

Re: Assurtion Failed

Post by dalolorn »

The Kernel ship? :P

That said, I do not believe issues 1, 2, and 5 in UltraMantis' post are the problem. It's most likely the XML errors any program would immediately notice and fail to parse, described in issues 3 and 4.

Try opening your blueprints.xml file using Internet Explorer, I find that it's quite capable of detecting flawed coding.
UltraMantis
Posts: 2125
Joined: Thu Sep 20, 2012 3:17 pm

Re: Assurtion Failed

Post by UltraMantis »

Wow, that's a legitimate use of Internet Explorer. Probably the first of it's kind. :D



sorry :oops:
Report spam using the handy Report Button Mod.
dalolorn
Posts: 532
Joined: Sun Sep 23, 2012 8:06 am

Re: Assurtion Failed

Post by dalolorn »

UltraMantis wrote:Wow, that's a legitimate use of Internet Explorer. Probably the first of it's kind. :D



sorry :oops:
When you're trying to mod Star Wars: Empire at War with nothing but the tools that came with Windows, you tend to notice these sorts of things. Especially since IE is the default program for opening XML files. :)

The one annoying thing I've been noticing recently is its tendency to take ages to load, but I don't really make XML errors anymore, so I've stopped using it to check the code. 8-)
speedoflight
Posts: 660
Joined: Mon Feb 18, 2013 11:08 am

Re: Assurtion Failed

Post by speedoflight »

Have you tried to use the validate function of GMM to see if there are errors or typos in the xml files??

As far as i know, u cant just "open" xml files with Internet Explorer, not if the xml file doesnt have a base and readable structure (even if the code is right), but im not sure.
My currently mods / wips ->
ImageImage
dalolorn
Posts: 532
Joined: Sun Sep 23, 2012 8:06 am

Re: Assurtion Failed

Post by dalolorn »

speedoflight wrote:Have you tried to use the validate function of GMM to see if there are errors or typos in the xml files??

As far as i know, u cant just "open" xml files with Internet Explorer, not if the xml file doesnt have a base and readable structure (even if the code is right), but im not sure.
It can open Darkstar One XMLs (not that changing those does anything), Star Trek Legacy XMLs, SWEAW ones (as noted above), Galactic Civilizations 2 XMLs... however, it's been a while, and for some reason, Internet Explorer is failing to open a 13 KB achievements.xml unpacked by ftldat. It's just sitting there, white screen, yet the program seems to be working.

*shortly afterwards* Most intriguing... all XMLs of all sizes belonging to FTL are suffering the same symptoms, however a GC2 XML is loading just fine.

I guess it does need more than just proper syntax to read stuff... :o
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: Assurtion Failed

Post by kartoFlane »

FTL's xml is not really XML -- more like its retarded twin.
Proper XML allows only a single top-level tag, whereas FTL requires dozens upon dozens of top-level tags in order to even work properly.
XML has strict syntax, and opening tags have to match closing tags. FTL seems to completely ignore them. You could likely just do <event></>, and FTL would still read that correctly.

No self-respecting XML parser will let FTL files go through itself without pre-processing.

That's why GMM tries to advocate people to write mods in correct XML syntax -- this way tools can use an existing parser, instead of having to either implement parsing from scratch, or hunt down all errors in the files and correct them before feeding the file to the parser.

IE, like any other browser, has a built-in XML interpreter, so you can use it to check whether your file is correctly written (just add <root> at the beggining and </root> at the end of the file, so that the interpreter doesn't complain about multiple top-level tags)
Superluminal2 - a ship editor for FTL
dalolorn
Posts: 532
Joined: Sun Sep 23, 2012 8:06 am

Re: Assurtion Failed

Post by dalolorn »

kartoFlane wrote:FTL's xml is not really XML -- more like its retarded twin.
Proper XML allows only a single top-level tag, whereas FTL requires dozens upon dozens of top-level tags in order to even work properly.
XML has strict syntax, and opening tags have to match closing tags. FTL seems to completely ignore them. You could likely just do <event></>, and FTL would still read that correctly.

No self-respecting XML parser will let FTL files go through itself without pre-processing.

That's why GMM tries to advocate people to write mods in correct XML syntax -- this way tools can use an existing parser, instead of having to either implement parsing from scratch, or hunt down all errors in the files and correct them before feeding the file to the parser.

IE, like any other browser, has a built-in XML interpreter, so you can use it to check whether your file is correctly written (just add <root> at the beggining and </root> at the end of the file, so that the interpreter doesn't complain about multiple top-level tags)
I see. IE's not complaining, though - it's just that it loads a blank white screen. :P
Post Reply