Posted by: ExChairman
« on: August 05, 2022, 12:16:33 AM »About error #1415: Can it have with commanders, had a lot of retirements and 4 times as many changes in rank and so on, but had to hold down enter for 40 seconds with repeated 1415s, in the hundreds, not as many events on the commander side, but a thought.
Its a very short function that only involves contacts and fleets.
This is the entire code in function #1415 for v1.13
public void UpdateContactStartPoint(Fleet f)
{
try
{
List<Contact> Contacts = ContactList.Values.Where(x => x.ContactType == AuroraContactType.Ship).Where(x => x.ContactShip.ShipFleet == f).ToList();
foreach (Contact c in Contacts)
{
c.IncrementStartX = f.Xcor;
c.IncrementStartY = f.Ycor;
}
}
catch (Exception error) { GlobalValues.ErrorHandler(error, 1415); return; }
}
The only place I can see this being an issue is if you somehow have a ship contact for a ship that doesn't exist. If you have access to the database, trying running the following SQL. The result should be 0. If not, that is the problem
Select Count(*) from FCT_Contacts Where ContactType = 1 AND ContactID NOT IN (Select ShipID from FCT_Ship)
I've changed the main line of code in v2.0 to check that ContactShip is not null in case this is the issue.
List<Contact> Contacts = ContactList.Values.Where(x => x.ContactType == AuroraContactType.Ship && x.ContactShip != null).Where(x => x.ContactShip.ShipFleet == f).ToList();
Don`t have access to the program, but I have noticed a strange happening, I am losing ships, not to any specific reason, they just vanish...
First it was some 200 destroyers/light cruisers, SM them back but now my carrier fleet is going away, also after checking, entire "fleets/groups" of specific ships in class design is gone, the design is there but no ships/bases are left...