EDCD / EDDI

Companion application for Elite Dangerous
Other
440 stars 81 forks source link

EDDI counting main star twice in undiscovered systems #2522

Closed Darkcyde13 closed 1 year ago

Darkcyde13 commented 1 year ago

What's Wrong (please be as specific as possible)

Expected

The number of stars to be counted correctly when scanning a system previously not fully discovered.

Observed

The main star is added twice to the bodies of the system.

Steps to reproduce

  1. Find a system that has not yet been discovered by any player (or one that has not been fully discovered?).
  2. Fully scan the system.
  3. Note that EDDI says there is one more star than actually exists.

Configuration

My Investigation

Investigation Notes

(Copied from my forum post)

I have managed to find a few undiscovered star systems around 2.5K Ly from the bubble to test this all out with. I tested with my personality, and with the EDDI default (made a copy and included code to report number of bodies and body names). This is what I've found...

The main star is being counted twice in systems that have not been fully discovered by any other Cmdr. I first thought, like you, that it was only happening in systems that had never been visited by anyone, but I found one that has both stars discovered (but no planets) and that had the same bug: EDDI said 3 star and 15 bodies, when there were only 2 stars and 15 bodies. Both stars had already been discovered, but the 15 bodies had not.

When getting EDDI to list the names of the stars, it repeats the first star: Flyae Drye GY-X b48-0 A, Flyae Drye GY-X b48-0 B, Flyae Drye GY-X b48-0 A. So, however EDDI builds it's database of bodies, it's adding the first star again. Sometimes this is at the end, sometimes at the beginning.

When scanning an undiscovered system, both the EDDI default, and my personality, will correctly say the number of stars BEFORE the system is fully scanned, but report one more star AFTER the system has been completely scanned. This happens even when you ask for a list of stars before the system is fully scanned, it will say "2 stars and 15 bodies", but will list 3 star names.

I then tried to see when EDDI corrects this error:

So, in the end, yes this definitely is a bug in EDDI, and not in any scripts. For the most part, it's just an annoyance and nothing critical. It appears to only have an effect after the system has been fully scanned (though more data may be needed to confirm), and it does fix itself after jumping out of the system or reloading EDDI.


Additional info: I found three systems that exhibited this problem, which hopefully are in the below logs. Flyae Drye FS-Z b47-1 Flyae Drye GY-X b48-0 Flyae Drye HT-X b48-1

I seem to be in an area with few discovered systems, so I can probably do more tests if needed.

When using a FOR loop to run through all bodies in reportSystem.bodies, there is one more star than exists. Amending the code to list the body names, I found the main star is listed twice.

EDDI Logs

eddi.log

Player journals

Looking over these, I couldn't see anything wrong, no double entries for the main star. Journal.2023-03-25T151933.01.log

Tkael commented 1 year ago

It has to do with the temporary star we create when you select a star system in-game (as a part of the "Next system" event). We have very limited data (no name, no body id value, etc.) about the primary star from the journal before your actual visit and we were not matching and replacing the temporary star data intelligently enough. Should be fixed for the next release now.