View Issue Details

IDProjectCategoryLast Update
0020417AI War 2Bug - GameplayOct 2, 2018 6:36 pm
ReporterZeusAlmighty Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version0.776 A Legible Galaxy Map 
Fixed in Version0.778 I'm Talking To HIM, Not You! 
Summary0020417: ships automatically going to grav well; not all go through worm hole
DescriptionHaving issues control my raiders--they act erratically regardless of FDR mode. Gave group command for fleet to go to distant planet and some would stay behind near each worm hole
TagsNo tags attached.

Activities

ZeusAlmighty

Oct 1, 2018 6:15 pm

manager  

ships moving bug.save (933,310 bytes)

BadgerBadger

Oct 1, 2018 6:27 pm

manager   ~0049667

Hey Chris, this is a really good reproduction scenario. Load the game, select all the Raid Starships and have them move around that planet grav well (I would send them from one end to another). Every 3 or 4 times I would issue the command they would do something wacky.

Chris_McElligottPark

Oct 2, 2018 5:25 pm

administrator   ~0049684

I can duplicate it!!! Happy day!

...even after all my fixes so far today on this build, this is still there. But now I can fix it. :)

Chris_McElligottPark

Oct 2, 2018 5:59 pm

administrator   ~0049685

This save is such a goldmine... I'm so excited! The data in here is so messed up, it's glorious. It's nothing that will make the save unplayable, but it's revealing some cross-threading issues with the pooling. Finally something I can test repeatedly and thus fix!

RocketAssistedPuffin

Oct 2, 2018 6:14 pm

reporter   ~0049686

Is this what a programmers dream christmas is?

Chris_McElligottPark

Oct 2, 2018 6:29 pm

administrator   ~0049688

Thanks! Finally nailed it. :)

* Found and fixed a REALLY nasty bug that was causing entities to get their orders confused and do all sorts of insane things.
** This was a cross-threading issue where two different threads (short term planning and AI order reevaluation) would be both clearing out dud orders and putting the same order back into the pool multiple times.
** Now it is a lot more careful with how things go into and out of the pool, using the appropriate multithreading locks, as well as making it so that in the (very frequent) even that two orders try to go back into the pool at once, it only puts them in there once.
** There is also a lot more error checking and logging in there that throws out clearly-bogus orders and throws visible errors when finding an incorrect case. This is a lot better than it just getting subtly incorrect in a quasi-hidden way!

Chris_McElligottPark

Oct 2, 2018 6:36 pm

administrator   ~0049689

Finding a juicy bug repro case and being able to fix it? You bet. :D

Issue History

Date Modified Username Field Change
Oct 1, 2018 6:15 pm ZeusAlmighty New Issue
Oct 1, 2018 6:15 pm ZeusAlmighty File Added: ships moving bug.savemet
Oct 1, 2018 6:15 pm ZeusAlmighty File Added: ships moving bug.save
Oct 1, 2018 6:27 pm BadgerBadger Note Added: 0049667
Oct 2, 2018 5:25 pm Chris_McElligottPark Note Added: 0049684
Oct 2, 2018 5:25 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Oct 2, 2018 5:25 pm Chris_McElligottPark Status new => assigned
Oct 2, 2018 5:59 pm Chris_McElligottPark Note Added: 0049685
Oct 2, 2018 6:14 pm RocketAssistedPuffin Note Added: 0049686
Oct 2, 2018 6:29 pm Chris_McElligottPark Status assigned => resolved
Oct 2, 2018 6:29 pm Chris_McElligottPark Resolution open => fixed
Oct 2, 2018 6:29 pm Chris_McElligottPark Fixed in Version => 0.778 I'm Talking To HIM, Not You!
Oct 2, 2018 6:29 pm Chris_McElligottPark Note Added: 0049688
Oct 2, 2018 6:36 pm Chris_McElligottPark Note Added: 0049689