[Kstars-devel] Subtlety regarding adding stars (esp. dynamically loaded ones) to the Observing List

Akarsh Simha akarshsimha at gmail.com
Thu Dec 11 05:09:11 UTC 2014


Hi

When we add objects to the observing list, we store pointers. With the
dynamic star loading system that we developed during 2008 summer,
especially for Tycho-2 and USNO NOMAD star catalogs, we are not
guaranteed that a star that is once loaded into memory remains in
memory. I think what happens is that although the StarObject remains
in memory (so we will not be dereferencing invalid pointers), its data
is over-written by another star. So there is a possibility that you
might add star HD#### and later find that HD#### is not at all present
in the observing list.

Also, there is no easy way to make sure that this does not happen. It
is not easy to remove a StarObject from the recirculating system of
dynamic stars. This is because the system does not recirculate
StarObjects, but it recirculates StarBlocks, which essentially keep
stars as QVector<StarObject>.

Of course, one solution is to just prevent any star that is part of
the dynamic loading system from being used in the observing list, but
that is not a user-friendly solution. Another solution might be to
list the the trixels that contain stars in the observing list, as
"being shown" in spirit. That way, we will prevent the overwriting of
StarObjects in those trixels. Maybe the better solution is to have
some sort of reference counting system for StarBlocks. This seems
somewhat non-trivial, and I'm not very sure about how to do this. Any
ideas on solving this problem shall be appreciated!

Regards
Akarsh


More information about the Kstars-devel mailing list