Project

General

Profile

Bug #20769

Waypoint list gets duplicates inserted on each scene switch.

Added by Dunbaratu over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Severity:
Low
Assignee:
-
Category:
Application
Target version:
Start date:
12/28/2018
% Done:

100%

Version:
Platform:
Windows
Expansion:
Core Game
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

This started happening with the five new stock waypoints added in KSP 1.6.
The end user won't notice this bug at first, but mod writers trying to work with the waypoint list will definitely notice this. It also may be causing a small memory leak.

WaypointManager.Instance().Waypoints has the same 5 duplicated waypoints appended to it again and again. The duplicates seem to be added each time you switch scenes.

The first time you launch a vessel to the launchpad, the list contains these 5 waypoints, as it should:

At index 0: "Island Airfield"
At index 1: "Woomerang Launch Site"
At index 2: "Dessert Airfield"
At index 3: "Dessert Launch Site"
At index 4: "KSC"

Then you switch to the tracking station, then back to flying the ship again, and now the list has 15 items in it like so:

At index 0: "Island Airfield"
At index 1: "Woomerang Launch Site"
At index 2: "Dessert Airfield"
At index 3: "Dessert Launch Site"
At index 4: "KSC"
At index 5: "Island Airfield"
At index 6: "Woomerang Launch Site"
At index 7: "Dessert Airfield"
At index 8: "Dessert Launch Site"
At index 9: "KSC"
At index 10: "Island Airfield"
At index 11: "Woomerang Launch Site"
At index 12: "Dessert Airfield"
At index 13: "Dessert Launch Site"
At index 15: "KSC"

The more times you have switched scenes, the more extra copies of these 5 waypoints exist in the list.

This is more of an "under the hood" game infrastructure problem that for now the user won't notice on the surface. But I mention it because it might cause trouble in other areas.

screenshot52.png (1.84 MB) screenshot52.png Dunbaratu, 01/28/2019 10:04 PM
43434

History

#1 Updated by nightingale over 5 years ago

Can confirm this one. Also, I'll likely put a workaround in the Waypoint Manager mod, since this bug causes serious problems for it.

#2 Updated by Nebbie over 5 years ago

  • Status changed from New to Confirmed
  • % Done changed from 0 to 10

#3 Updated by Dunbaratu about 5 years ago

43434

Further information:

I discovered that the "duplicates" are not quite exact duplicates. The new waypoint copy often appears a few meters away from the previous one. And the next one a few meters away from that, and so on.

I have a screenshot of about 10 waypoints for the KSC runway, spread along the length of the runway. Some in the middle, some toward one end, some toward the other end. Interestingly they DO all have the same latitude, but not quite the same longitude. I wonder if this might be because I was performing scene switches going back and forth to the tracking station and to vessels, while those vessels were all the way out by Duna. Maybe that was far enough from home for the waypoints to start introducing a bit floating point error in their positions when they were getting spawned? I have no clue. But I do know that they weren't all exactly the same latitude/longitude. Just very close.

This was relevant because I wanted to introduce a workaround where I would scan the list for duplicates and cull them out of my own uses, but detecting duplicates is a problem when doing so requires a fuzzy match on "good enough" similarity instead of an exact equality match.

Note, the screenshot below uses the "waypoint manager" mod to display what I mean about the runway waypoints not all being the same exact spot. The mod does not cause the problem. I only installed it to help visualize the problem to make a screenshot. The problem was already there without it.

#5 Updated by Dunbaratu about 5 years ago

According to the KSP 1.7 changelog, this issue is fixed in KSP 1.7.

Thanks for addressing it, but at the same time I have to wonder, what is the point of this public bug reporting site for KSP if there's nothing being done to make the information here correct? This issue is still marked as only 10% done. I was assuming it was getting ignored entirely because it hasn't changed for months. Then I find the recent release actually fixed it, so why was this issue sitting here stuck unchanged for that long?

#6 Updated by chris.fulton about 5 years ago

  • Status changed from Confirmed to Ready to Test
  • Target version set to 1.7.0
  • % Done changed from 10 to 80

Changes in 1.7 has addressed this issue. Setting the bug to RTT.

#7 Updated by Dunbaratu about 5 years ago

chris.fulton wrote:

Changes in 1.7 has addressed this issue. Setting the bug to RTT.

For my clarification, does "ready to test" mean you expect the original issue reporter (me) to test it and tell you if I'm satisfied, or does that mean someone working for Squad needs to test it? The only reason I ask is that I would presume Squad already tested it before releasing KSP 1.7, so I started wondering if this alternate meaning is what you wanted.

In other words, are you waiting for me to say something or is my involvement done?

#8 Updated by Dunbaratu almost 5 years ago

  • Status changed from Ready to Test to Resolved
  • % Done changed from 80 to 100

This was fixed. I don't see it anymore. I didn't know the users were supposed to change the status themselves when it becomes RTT.

#9 Updated by chris.fulton almost 5 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF