WED 1.4 / 1.51 / 1.6, when importing a apt.dat with dupliated (zero length segment) airport line nodes deletes the duplicated nodes upon import, see attached.
If the apt.dat has a line with only two co-located nodes this creates a single node WED_Chain after import, resulting in WED 1.6.0b1 crashes under windows - confirmed to happen at
WED-768, suspect also at WED-780.
These 2-colocated-node lines are kindof undesireable to start with and not readily produced by user action, but validation in all WED versions prior to WD. 1.6.0b1 (tested all WED 1.6 alphas, WED 1.51 and WED 1.4) will fail to catch them, apt.dat and gateway export will write them without any issues or notifications, see attached earth.wed..xml. A late commit in WED 1.6.0b1 finally added working validation for this and they cannot be exported any more, though still saved.
At least one such scenery made it onto the gateway: KSEA - ironically it was me submitting it with WED 1.5 and its also in all KSEA demo areas shipped since 1050. I suspect it could be many more - once Tyler Young exports the global airports for the first time with WED 1.6.0b1, he will find out the hard way - validation will now refuse the scenery export.
The problem upon apt.dat AND gateway import is in WED_AptIE.cpp importLinearPath(). This code intends to only remove rightfully co-located apt.dat lines needed to store the hi/low parts of Bezier nodes, but it will accidentically also delete any non-bezier duplicated nodes, like this apt.dat entry:
120 Linear Feature 3
111 49.18323571 -123.17252245 1
115 49.18323571 -123.17252245
After import the above results in a single-node line, which will make WED 1.6.0 under windows crash at times immediately after apt.dat import complete, in other cases only after importing e.g. a DSF later on. Under linux no crash at all so far, but I suspect we just got lucky for now ...
Saving after importing the above apt.dat will create a single node WED_Chain in earth.ewd.xml, which upon re-loading back into WED 1.6.0b1 is rightfully detected as corrupted data, the user is notified and its corrected by deleting this line marking completely.
1) fix WED_APtIE.cpp importLinearPath() to NOT delete duplicated nodes that are NOT part of a bezier node group
2) instead of 1) add detection of single-line nodes after apt.dat and gateway import, deleting such accidentially created single-node polygons BEFORE the scenery is drawn the first time (where it may crash). That would be similar to what the earth.wed.xml import currently does.
3) find out where WED 1.6.0b1 crashes when displaying single-node WED_Chains
I prefer 1). Thoughts ?