Page 1 of 1

Celestia crashes ~120 Light Years away from binary star

Posted: 11.08.2019, 17:23
by Sirius_Alpha
I've been working on automatically generating binary stars and I've developed a bit of a problem. A couple systems -- 11 Com and DP Leo (and probably numerous others) cause Celestia to crash whenever you get some distance away (a bit over 120 light years in the case of 11 Com). This problem occurred when I modified my programme to add the HIP prefix to the first star rather than the barycenter (otherwise the "OrbitBarycenter" item would produce incorrect system architectures).

I can't tell if this is an encoding problem in the text file or what it is. If I copy the definitions for 11 Com or DP Leo out into a separate .stc, then they work.

If anyone could take a look at the .stc definitions for 11 Com and/or DP Leo and explain to me why it's crashing, I would really appreciate that.

Posted: 11.08.2019, 22:18
by Anthony_B_Russo10
When I tested it, neither of the systems caused my Celestia to crash.

Posted: 11.08.2019, 22:41
by Sirius_Alpha
Oh that's bizarre. Alright, thanks.

Posted: 11.08.2019, 22:58
by selden
You need to specify what version of Celestia that you're using and what hardware you have. Bugs present in one version of Celestia might not be present in another.

Posted: 11.08.2019, 23:23
by Anthony_B_Russo10
I did it in 1.6.1 on my Latitude D820.

Posted: 12.08.2019, 01:00
by Sirius_Alpha
Excellent point.

Windows 10 Home 64 bit operating system, x64-based processor
AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx 2.00 GHz
16.0 GB of RAM

Celestia 1.6.1.

Posted: 12.08.2019, 17:59
by onetwothree
I confirm the issue. Line https://github.com/CelestiaProject/Celestia/blob/master/src/celengine/star.cpp#L1019, here getOrbitBarycenter() returns the star itself instead of the barycentre. Even if you did something wrong Celestia creates incorrect barycentre.

Posted: 13.08.2019, 00:39
by Sirius_Alpha
I think the crashing issue was something else. I had some barycenters missing any IDs. They crashed the programme whenever you got too close to them. 11 Com and DP Leo were just along the line of sight to systems that were incorrectly declared, so they were themselves not at all the problem.

Code: Select all

Barycenter
{
# lines
}


As I expected, this was an error on my end. As for Celestia incorrectly drawing the barycenter, I've simply moved the HIP prefix to the primary star rather than the barycenter. Overall I consider the issue resolved.