PackageBuilder: Error checking for corrupted polygons

Version: 1.4.10.0

Took me a while to figure out why fspackagebuilder stalled upon converting a file that had the following content (duplicated vertices) somewhere hidden in there:

<?xml version="1.0"?>
<FSData version="9.0">

  <Polygon version="0.4.0" displayName="Biomes-Semi-Tropical" altitude="0">
    <Attribute name="UniqueGUID" guid="{89e89b28-692e-4771-8493-ad5ec213d374}" type="GUID" value="{ac21467a-fea2-4dfa-9737-dcba5af24564}"/>
    <Attribute name="VegetationScale" guid="{6A043F59-E6F2-4117-A2E4-D510E7317C29}" type="UINT32" value="209"/>
    <Attribute name="VegetationDensity" guid="{41EFF715-C392-4B31-A457-50A504353A90}" type="UINT32" value="31"/>
    <Attribute name="VegetationFalloff" guid="{E82ABE17-FB4C-4F67-A28C-ED41969AEAD6}" type="FLOAT32" value="47.310001"/>
    <Attribute name="BiomeName" guid="{E5FA1B20-BB2F-40D5-913B-480C547CC9B8}" type="STRING" value="Semi-Tropical"/>
    <Vertex lon="-40" lat="40"/>
    <Vertex lon="-40" lat="40"/>
    <Vertex lon="-40" lat="40"/>
    <Vertex lon="-40" lat="40"/>
  </Polygon>

</FSData>

Just a very small problem but among the otherwise very good error reporting capabilities it would be good to know which line is corrupted. Currently when running a huge file with something like this in there flightsimulator.exe just exits without an error.

Hello @Sasa ,

What’s the origin of those vertex points?

Did you create them using the Scenery Editor (in which case you should have seen an error message when saving the scenery),
or did you use another program or method to add them manually?

Regards,
Boris

It’s from an external source. I agree this is not caused by the SDK itself but in many, many instances developers won’t just draw polygons in-sim but instead will be using external vector sources.
I understand this check is nothing you’d like to implement because it’s not been cased by DeveloperMode itself, but if you do it would be helpful to get at least an error thrown before flightsimulator.exe just closes.

Not a big issue though, just a small recommendation to improve things a little if it’s not too much work.

Hello @Sasa,

I have logged an issue regarding that.
I also experienced some CTDs in the Project Editor when a polygon was incorrectly defined.
Both issues will be reviewed.

Thank you,

Regards,
Boris

1 Like