Aurora 4x

C# Aurora => C# Bug Reports => Topic started by: Steve Walmsley on November 27, 2023, 09:11:30 AM

Title: v2.2.1 Bugs Thread
Post by: Steve Walmsley on November 27, 2023, 09:11:30 AM
Please post potential bugs in this thread for v2.2.1

First, please check the Known Issues post before posting so see if the problem has already been identified or is working as intended.
http://aurora2.pentarch.org/index.php?topic=10637.0

'Me too' posts for unresolved bugs are fine as it shows they are affecting more than one person. Any extra information you can provide in 'me too' posts is very welcome.

Please do not post bugs from previous versions unless you confirm they are still present in v2.2.1

When you post, please post as much information as possible, including:
The function number
The complete error text
The window affected
What you were doing at the time
Conventional or TN start
Random or Real Stars
Is your decimal separator a comma?
Is the bug is easy to reproduce, intermittent or a one-off?
If this is a long campaign - say 75 years or longer - let me know the length of the campaign as well
Title: Re: v2.2.1 Bugs Thread
Post by: jatzi on November 27, 2023, 10:55:34 AM
I'm noticing in the governor tab for colonies whenever I click automated assignment or whatever it doesn't stick. Like it'll be fine but if I close the window and reopen it it's defaulted back to manual assignment or no commander required. And as such new governors aren't being assigned automatically when someone dies and they're not being rotated around either, if they're supposed to be.

EDIT: I've just noticed in the 2.2.1 changes thread this has been fixed but I'm using 2.2.1 and I'm still having the issue
EDIT2: I had downloaded the game from the 2.2.0 installation thread after it said it had 2.2.1 included. I reinstalled 2.2.1 using the separate specific patch and the governor thing went away. Super weird but all good! Sorry for this

SJW: No problem. There was an earlier v2.2.1 with just the Commander fix. I should have numbered the next patch as v2.2.2.
Title: Re: v2.2.1 Bugs Thread
Post by: stabliser on November 27, 2023, 12:42:44 PM
Event: 'cannot unload colonists from one species at population of a different species'

but the population is zero, this is the first colonist delivery... albeit of Species 2.0


This is a 2.2.0 game patched to 2.2.1  This issue appeared before and after the patch
playing as Aliens in a non-Sol start, Random stars.

Easy to reproduce: load geneticaly modified colonists onto ship and transport to brand new colony.
probably something to do with species at a colony being chosen when the colony is claimed rather than when they are dropped off.

Edit: I see I get to choose the species if I Create colony in the fleet window but not in the system window...

SJW: Not a bug. Only one species per population allowed. On system window, Species is top right.

Edit: Ah, Thats how it works, Thanks.  Any chance the event message could also tell us which ship had the unloading problem.
Title: Re: v2.2.1 Bugs Thread
Post by: Froggiest1982 on November 27, 2023, 05:05:49 PM
Still not 100% sure it was identified as a bug or not, but since it has been mentioned multiple times, is it possible for civilians to do not spawn mining colonies when the civilians are turned off, please?

SJW: Civilian Mining Colonies are unaffected by Shipping Lines being turned off.
Title: Re: v2.2.1 Bugs Thread
Post by: Indefatigable on November 27, 2023, 06:02:26 PM
Colonists loaded in Ark Modules orbiting a colony

- they don't show up as colony population
- there is no internal ark population growth with space available

Tested previous version (2.1.1): orbital population works, no ark growth

SJW: Fixed, but will require a database update release.
Title: Re: v2.2.1 Bugs Thread
Post by: nuclearslurpee on November 27, 2023, 07:54:28 PM
Quote
Fixes
  • Ground units now deleted correctly when parent colony is deleted.

Does not appear to work. Ground units at a deleted colony still show up in the Order of Battle when the Location checkbox is unchecked.

SJW: Cannot reproduce.
Title: Re: v2.2.1 Bugs Thread
Post by: Ulzgoroth on November 27, 2023, 09:57:02 PM
After developing TN tech in a conventional start game, I did not automatically obtain Duranium armor. Was that feature intentionally removed? It is still referenced in the Aurora changes table of contents.

SJW: Working as intended. You need to research it.
Title: Re: v2.2.1 Bugs Thread
Post by: nuclearslurpee on November 27, 2023, 10:01:10 PM
After developing TN tech in a conventional start game, I did not automatically obtain Duranium armor. Was that feature intentionally removed? It is still referenced in the Aurora changes table of contents.

This has not been the case for a while, at least since several grades of conventional armor were added.
Title: Re: v2.2.1 Bugs Thread
Post by: nuclearslurpee on November 27, 2023, 10:28:57 PM
Continuing to play around with the new toys...

Bug: "Refit To" cost fraction is displayed incorrectly. In the Class Design window, Priorities / Misc tab, the "Refit To" section of the central panel shows the cost as a percentage of the new class cost. These should be shown as a percentage of the current class cost, since that is what influences whether shipyards can build both classes.

It looks like the "Refit From" section is showing the cost fraction relative to the current class cost. I'm not sure if this is the intention, or if these two sections got their logic flipped by accident. I would think the latter, since the refit cost as a fraction of the original class cost is usually more important to the player.

SJW: Working as Intended, but modified to add extra function. See replies below.
Title: Re: v2.2.1 Bugs Thread
Post by: nuclearslurpee on November 27, 2023, 11:00:56 PM
Bug: Ground formation completion dates are given incorrectly.

Economics window, GU Training tab. See the attached image showing that my ground units under construction will be completed in just 10 days (start date is 1 Jan 4000). For reference, my total ground unit build rate is 2,500, so at 10% of this or 250 BP/year a mechanized infantry brigade will take 2.5 years.

I believe the likely cause is that the Completion Date is calculated by dividing by the allocation percentage instead of dividing, or alternatively the integer value of allocated percent is being used instead of the percentage value. Unfortunately, since there is no way to change the allocated percentage of a task (this seems like an oversight...) I cannot test to find out which is the case.

SJW: Bug fixed for v2.2.2. Noted on lack of Modify option
Title: Re: v2.2.1 Bugs Thread
Post by: Steve Walmsley on November 28, 2023, 04:34:02 AM
Continuing to play around with the new toys...

Bug: "Refit To" cost fraction is displayed incorrectly. In the Class Design window, Priorities / Misc tab, the "Refit To" section of the central panel shows the cost as a percentage of the new class cost. These should be shown as a percentage of the current class cost, since that is what influences whether shipyards can build both classes.

It looks like the "Refit From" section is showing the cost fraction relative to the current class cost. I'm not sure if this is the intention, or if these two sections got their logic flipped by accident. I would think the latter, since the refit cost as a fraction of the original class cost is usually more important to the player.

Eligibility for refit is based on size, not cost.

The reason the 'refit to' cost is based on the new class is because the intended comparison is between building a new ship or refitting an old one.

Same logic for the 'refit from' cost. Cost comparison between building a new ship or refitting an old one.

I'll add some text to the window so the logic is clear.
Title: Re: v2.2.1 Bugs Thread
Post by: nuclearslurpee on November 28, 2023, 09:09:46 AM
Continuing to play around with the new toys...

Bug: "Refit To" cost fraction is displayed incorrectly. In the Class Design window, Priorities / Misc tab, the "Refit To" section of the central panel shows the cost as a percentage of the new class cost. These should be shown as a percentage of the current class cost, since that is what influences whether shipyards can build both classes.

It looks like the "Refit From" section is showing the cost fraction relative to the current class cost. I'm not sure if this is the intention, or if these two sections got their logic flipped by accident. I would think the latter, since the refit cost as a fraction of the original class cost is usually more important to the player.

Eligibility for refit is based on size, not cost.

The reason the 'refit to' cost is based on the new class is because the intended comparison is between building a new ship or refitting an old one.

Same logic for the 'refit from' cost. Cost comparison between building a new ship or refitting an old one.

I'll add some text to the window so the logic is clear.

Fair enough. For me, it would be more useful to know if I can build two classes from the same shipyard, but since the raw BP cost is also shown I can work this out for myself.  :)
Title: Re: v2.2.1 Bugs Thread
Post by: Steve Walmsley on November 28, 2023, 10:53:52 AM
Fair enough. For me, it would be more useful to know if I can build two classes from the same shipyard, but since the raw BP cost is also shown I can work this out for myself.  :)

I've updated the section to show both sets of information.
http://aurora2.pentarch.org/index.php?topic=13346.msg166321#msg166321
Title: Re: v2.2.1 Bugs Thread
Post by: Desdinova on November 28, 2023, 12:36:24 PM
My current game seems to be stuck with an endless loop of:

Function #1954: Object reference not set to an instance of an object
Function #1943
Function #478

I managed to save the db, advancing time in two 5 day increments should replicate the issue. Unfortunately it seems as if the save has been rendered unplayable.
Title: Re: v2.2.1 Bugs Thread
Post by: Impassive on November 28, 2023, 06:21:28 PM
In my current game on v2.2.1 I set the field position using the new GU organisation tab, however when constructed they don't remember them.

SJW: Fixed for v2.2.2
Title: Re: v2.2.1 Bugs Thread
Post by: nuclearslurpee on November 28, 2023, 06:37:28 PM
In my current game on v2.2.1 I set the field position using the new GU organisation tab, however when constructed they don't remember them.

Me too.
Title: Re: v2.2.1 Bugs Thread
Post by: jatzi on November 28, 2023, 10:27:02 PM
I'm noticing PD protection priority for classes is the same for each. As in when I change it for one it changes for all of them. And it doesn't stick, when I close the window and open it back up it's back to the default 1

SJW: Fixed for v2.2.2. Its a display bug. The value is set, but selecting a class doesn't display the value.
Title: Re: v2.2.1 Bugs Thread
Post by: lumporr on November 28, 2023, 10:45:08 PM
Woo! Can't wait to start the new update!

However, I encountered two instances of a bug - "2.2.1 Function #2939: Object reference not set to an instance of an object." This error first occured when I created a new Random Stars game, as soon as I created the final race. The game froze, and upon closing and reopening Aurora, the system name was blank. The error showed up again after sucessfully creating another Random Stars game, and clicking the "Create Habitable" button. Exploring jump points with SM mode does not throw the error, but Create Habitable has thrown the error twice in a row now (after reloading). My decimal separator is NOT a comma - but a period!

DB attatched.

These were my first attempts at game creation post fresh download and patch.

EDIT: Don't know why I got mixed up about my decimal separator, it's a period.

SJW: Fixed for v2.2.2
Title: Re: v2.2.1 Bugs Thread
Post by: nuclearslurpee on November 28, 2023, 10:46:53 PM
My decimal separator is a comma.

Decimal separator needs to be a period. I'll bet you 100 duranium this is the cause of the error.
Title: Re: v2.2.1 Bugs Thread
Post by: Steve Walmsley on November 29, 2023, 05:56:55 AM
The Raiders are completely non-functional for v2.2 due to a simple typo. An 'if' should have been 'else if'.

When v2.2.2 comes out, the Raiders will only function in new games.
Title: Re: v2.2.1 Bugs Thread
Post by: Steve Walmsley on November 29, 2023, 06:29:03 AM
Quote
Fixes
  • Ground units now deleted correctly when parent colony is deleted.

Does not appear to work. Ground units at a deleted colony still show up in the Order of Battle when the Location checkbox is unchecked.

I can't reproduce this one. They are deleting correctly for me. Did you try closing and re-open the ground forces window?
Title: Re: v2.2.1 Bugs Thread
Post by: Desdinova on November 29, 2023, 12:04:08 PM
Admin commands are throwing an error when you try to delete them: 2.2.1 Function #1675: Object reference not set to an instance of an object.

Reproduction steps:
Open the Naval Organization window.
Select the top-level admin command.
Click "Create Admin", enter a name, and hit OK.
Select the new admin command.
Click the Assign Admin Commander button.
Close the Naval Organization window.
Reopen the Naval Organization window.
Select the new admin command.
Click Delete.

Reopening the naval organization window sometimes allows the admin command to be delted normally.

SJW: Fixed for v2.2.2
Title: Re: v2.2.1 Bugs Thread
Post by: nuclearslurpee on November 29, 2023, 12:44:24 PM
Quote
Fixes
  • Ground units now deleted correctly when parent colony is deleted.

Does not appear to work. Ground units at a deleted colony still show up in the Order of Battle when the Location checkbox is unchecked.

I can't reproduce this one. They are deleting correctly for me. Did you try closing and re-open the ground forces window?

Yes, and advancing the construction increment. Note that these units show up in the Order of Battle tab if you uncheck the Location box - if you're not able to reproduce, check that you're seeing them under this condition. Otherwise, maybe you've once again accidentally fixed it without knowing?
Title: Re: v2.2.1 Bugs Thread
Post by: Steve Walmsley on November 29, 2023, 12:49:19 PM
I can't reproduce this one. They are deleting correctly for me. Did you try closing and re-open the ground forces window?

Yes, and advancing the construction increment. Note that these units show up in the Order of Battle tab if you uncheck the Location box - if you're not able to reproduce, check that you're seeing them under this condition. Otherwise, maybe you've once again accidentally fixed it without knowing?

Yes, I have been turning the location on and off and they aren't there.
Title: Re: v2.2.1 Bugs Thread
Post by: nuclearslurpee on November 29, 2023, 12:58:09 PM
I can't reproduce this one. They are deleting correctly for me. Did you try closing and re-open the ground forces window?

Yes, and advancing the construction increment. Note that these units show up in the Order of Battle tab if you uncheck the Location box - if you're not able to reproduce, check that you're seeing them under this condition. Otherwise, maybe you've once again accidentally fixed it without knowing?

Yes, I have been turning the location on and off and they aren't there.

I guess you accidentally fixed it for 2.2.2 then, since I've reproduced this multiple times in the 2.2.1 release. Another one down!  ;D
Title: Re: v2.2.1 Bugs Thread
Post by: Steve Walmsley on November 29, 2023, 01:02:20 PM
I can't reproduce this one. They are deleting correctly for me. Did you try closing and re-open the ground forces window?

Yes, and advancing the construction increment. Note that these units show up in the Order of Battle tab if you uncheck the Location box - if you're not able to reproduce, check that you're seeing them under this condition. Otherwise, maybe you've once again accidentally fixed it without knowing?

Yes, I have been turning the location on and off and they aren't there.

I guess you accidentally fixed it for 2.2.2 then, since I've reproduced this multiple times in the 2.2.1 release. Another one down!  ;D

Is that the original v2.2.1 that just fixed the commanders window, or the other v2.2.1 that was released the next day? :)

Does the Copy button exist on the Ground Forces window (as well as Copy + Upgrade) ?
Title: Re: v2.2.1 Bugs Thread
Post by: nuclearslurpee on November 29, 2023, 01:05:44 PM
Is that the original v2.2.1 that just fixed the commanders window, or the other v2.2.1 that was released the next day? :)

I am using the most recent EXE version as far as I know.

EDIT: I notice in the change log:
Quote
Deleted populations disappear immediately from list when deleted (rather than requiring a refresh).
So I bet this is where the "accidental fix" has happened.  ;)
Title: Re: v2.2.1 Bugs Thread
Post by: Aloriel on November 29, 2023, 02:49:04 PM
Bit of an issue with 2.2.1:

GU Copy + Upgrade creates multiple copies of identical items. I have a company HQ that I use in all my company sized formations. Using the copy + upgrade button on each company sized formation created 7 copies of that HQ, all identical.

Perhaps there could be a check to see if something with that exact design already exists? If so, don't duplicate?

EDIT:
To complicate matters further, it creates a new series for each item it duplicates, regardless of the fact that I already had series for each GU.

SJW: Fixed for v.2.2.2
Title: Re: v2.2.1 Bugs Thread
Post by: Froggiest1982 on November 29, 2023, 07:27:10 PM
When clicking on Rename Series under Unit Series tab of the Ground Forces you have the following error if you have selected the unit instead of the series:


2.2.1 Function #3355: Unable to cast object of type 'f6' to type 'f5'.

I don't remember experiencing this before. I am sure it's not the first time I highlighted the wrong part  ;D

SJW: Fixed for v2.2.2. Added a check that series is selected before trying to rename.
Title: Re: v2.2.1 Bugs Thread
Post by: Uran on November 30, 2023, 02:47:33 AM
Wrong Geo Survey value in the Naval Organization window -> Fleet tab -> 3-rd string. 

The Geo Survey value takes in to account only ship officers bonuses and does not calculate bonuses from the Admin Commands. 

We have discovered this issue together with nuclearslurpee in the hxxp: aurora2.  pentarch.  org/index.  php?topic=13340.  msg166385#msg166385

nuclearslurpee checked it we know that real in-action bonuses are calculated correctly.   The issue is only with the displayed Geo Survey value in Naval Organization window Fleet tab. 

EDIT: From another point of view, the Geo Survey value displayed for fleet itself and may be it should not be dependent on the chain of command above the fleet.
I do not know what is correct in this case.
But in any case it will be great if we can see (somewhere) actual Geo Survey for the fleet with all bonuses in it. 

SJW: Fixed for v.2.2.2
Title: Re: v2.2.1 Bugs Thread
Post by: Kaiser on November 30, 2023, 06:32:04 AM
Hi Steve, I am asking just to understand the deadlines as I am playing a little bit as everyone else but not playing any major campaign.

Are you going to release the 2.2.2 soon (today or in the weekend for example) or will it be a long term update (months) and will it contain the fixes that require the database update?

Thank you
Dani
Title: Re: v2.2.1 Bugs Thread
Post by: Steve Walmsley on November 30, 2023, 06:50:39 AM
Hi Steve, I am asking just to understand the deadlines as I am playing a little bit as everyone else but not playing any major campaign.

Are you going to release the 2.2.2 soon (today or in the weekend for example) or will it be a long term update (months) and will it contain the fixes that require the database update?

Thank you
Dani

There will be a new release this week. If there are any other DB bugs, it will be a database release. Otherwise, I might release both v2.3 and v2.2.2. so that people can choose whether having Ark modules is worth breaking existing saves.
Title: Re: v2.2.1 Bugs Thread
Post by: Uran on November 30, 2023, 02:07:16 PM
Should the ground forces window update itself after next time increment?

I had the Ground Force window opened to monitor the replacement process.  I done 1 day increments 12 times and saw now changes in my formations.  Once I closed the Ground Force window and open it again.  I noticed than replacement took its place already. 

I do not see any events in the log about replacement take place.  Is it ok?
Title: Re: v2.2.1 Bugs Thread
Post by: Impassive on November 30, 2023, 02:11:43 PM
Bit of an issue with 2.2.1:

GU Copy + Upgrade creates multiple copies of identical items. I have a company HQ that I use in all my company sized formations. Using the copy + upgrade button on each company sized formation created 7 copies of that HQ, all identical.

Perhaps there could be a check to see if something with that exact design already exists? If so, don't duplicate?

EDIT:
To complicate matters further, it creates a new series for each item it duplicates, regardless of the fact that I already had series for each GU.

SJW: Fixed for v.2.2.2

This can also break organisation tab construction of GU forces and their assignment to the correct formation. Also with the copy + upgrade, when you build the new formation, numbering is starting from 1 again :(
Title: Re: v2.2.1 Bugs Thread
Post by: nuclearslurpee on November 30, 2023, 03:40:44 PM
I seem to have come across a bug where I have multiple contact IDs for the same alien ships (i.e., ClassName 001, ClassName 002, etc. representing the same ship). I'm not sure what causes this, it may be the same ship detected in different systems or may be caused by the "Renumber Ships" button. Since this is related to NPRs it is proving difficult to study.
Title: Re: v2.2.1 Bugs Thread
Post by: Steve Walmsley on November 30, 2023, 05:31:10 PM
Should the ground forces window update itself after next time increment?

I had the Ground Force window opened to monitor the replacement process.  I done 1 day increments 12 times and saw now changes in my formations.  Once I closed the Ground Force window and open it again.  I noticed than replacement took its place already. 

I do not see any events in the log about replacement take place.  Is it ok?

Not everything refreshes, as refreshing everything on every open window would slow turns down considerably.
Title: Re: v2.2.1 Bugs Thread
Post by: Coleslaw on November 30, 2023, 07:58:07 PM
I put together an armored division organization and ordered the construction of three of them on Earth. As the formations are being constructed they are being put under the order of battle of an infantry corps I had previously constructed (except the divisions command formations, since I did not create a corps organization, just a division organization.) Screenshots attached. I think this happened because I use the same regiment, brigade, division, corps command formations and just rename them appropriately after construction depending on the subordinate combat battalions.

EDIT: Actually now I'm not certain why this is happening because battalions and artillery sections are now also getting assigned underneath my artillery sections, which shouldn't normally be possible (when I try manually click dragging an armored battalion under an artillery section, it says that's not possible.) I would attach another screenshot showing this but I think if I do it overwrites the pics already attached.
Title: Re: v2.2.1 Bugs Thread
Post by: Ragnarsson on December 01, 2023, 01:49:55 AM
First chance to play with 2.2.1, decided to test out the new "Create Habitable" feature.
After generating a number of systems, I'd say 10 or so, I clicked "Create Habitable" as usual and received the following error:

2.2.1 Function #2939: Object reference not set to an instance of an object.

This error message disappeared after clicking "Ok", but resulted in Aurora freezing, requiring me to force close it.

This occurred without any modifications or alterations to anything, using a newly created, non-real stars game. Just activated SM and started clicking "Create Habitable".

I then attempted to replicate the issue. Upon relaunching Aurora, it recurred on the second habitable system created, with the same symptoms as before. Replication is simple: launch the game, start a new game with Known Stars turned OFF, turn on SM, start clicking the appropriate button until it happens.

EDIT 1: To reflect the fact that this issue happened in a newly created, non-real stars game.
EDIT 2: I just had the same error (Function #2939) occur when attempting to create a new game on a freshly unzipped, clean 2.2.0 database. The only setting altered was to deselect "Known Stars"
EDIT 3: It also occurs when turning on SM and clicking "Create System". Not every time a system is created, but eventually. I suspect this is related to the similar bug that was discovered in the previously released version involving non-Known Stars game and system creation, it's just too similar.

SJW: Fixed for v2.2.2
Title: Re: v2.2.1 Bugs Thread
Post by: Steve Walmsley on December 01, 2023, 03:41:47 AM
First chance to play with 2.2.1, decided to test out the new "Create Habitable" feature.
After generating a number of systems, I'd say 10 or so, I clicked "Create Habitable" as usual and received the following error:

2.2.1 Function #2939: Object reference not set to an instance of an object.

This error message disappeared after clicking "Ok", but resulted in Aurora freezing, requiring me to force close it.

This occurred without any modifications or alterations to anything, using a newly created, non-real stars game. Just activated SM and started clicking "Create Habitable".

I then attempted to replicate the issue. Upon relaunching Aurora, it recurred on the second habitable system created, with the same symptoms as before. Replication is simple: launch the game, start a new game with Known Stars turned OFF, turn on SM, start clicking the appropriate button until it happens.

EDIT 1: To reflect the fact that this issue happened in a newly created, non-real stars game.
EDIT 2: I just had the same error (Function #2939) occur when attempting to create a new game on a freshly unzipped, clean 2.2.0 database. The only setting altered was to deselect "Known Stars"
EDIT 3: It also occurs when turning on SM and clicking "Create System". Not every time a system is created, but eventually. I suspect this is related to the similar bug that was discovered in the previously released version involving non-Known Stars game and system creation, it's just too similar.

#2939 is a small function for calculating the orbits of companion stars. This function runs fairly often, so looks like an intermittent bug. The only objects referenced are the Star Type and the Parent Star, so perhaps the function is running when the latter doesn't exist - maybe for the primary. I'll add a check for that.

BTW I've just generated about 50 systems in a random stars game without the bug appearing, so it does seem fairly rare. Hard to fix though unless I can reproduce it. I'll keep trying.
Title: Re: v2.2.1 Bugs Thread
Post by: Ragnarsson on December 01, 2023, 03:56:06 AM
#2939 is a small function for calculating the orbits of companion stars. This function runs fairly often, so looks like an intermittent bug. The only objects referenced are the Star Type and the Parent Star, so perhaps the function is running when the latter doesn't exist - maybe for the primary. I'll add a check for that.

BTW I've just generated about 50 systems in a random stars game without the bug appearing, so it does seem fairly rare. Hard to fix though unless I can reproduce it. I'll keep trying.
Thank you for investigating!

I just created 90 systems without issue, using the "Create System" button, so I'd agree it's relatively rare.

It seems decidedly less rare when using "Create Habitable", occurring within an average of 4-5 created systems, up to a maximum in my testing of 12 - I assume this is due to a large number of systems being created and discarded behind the scenes to find viable habitable targets.
Title: Re: v2.2.1 Bugs Thread
Post by: Steve Walmsley on December 01, 2023, 03:58:39 AM
#2939 is a small function for calculating the orbits of companion stars. This function runs fairly often, so looks like an intermittent bug. The only objects referenced are the Star Type and the Parent Star, so perhaps the function is running when the latter doesn't exist - maybe for the primary. I'll add a check for that.

BTW I've just generated about 50 systems in a random stars game without the bug appearing, so it does seem fairly rare. Hard to fix though unless I can reproduce it. I'll keep trying.
Thank you for investigating!

I just created 90 systems without issue, using the "Create System" button, so I'd agree it's relatively rare.

It seems decidedly less rare when using "Create Habitable", occurring in an average of 4-5 created systems, up to a maximum in my testing of 12 - I assume this is due to a large number of systems being created and discarded behind the scenes to find viable habitable targets.

Triggered it once. It seems to be caused by the third component of a star system not having a parent star, although struggling to figure out why. I am going to try to trigger it again, but with a breakpoint earlier in the code so I can check parent star assignment.
Title: Re: v2.2.1 Bugs Thread
Post by: Steve Walmsley on December 01, 2023, 04:17:04 AM
Fixed now. There was a combination of circumstances where a third star was generated but the parent was not recorded, resulting in a bug when the subsequent orbit calculation could not find anything to orbit around.

I just ran a long sequence of Generate Habitable with no problems.