View Issue Details

IDProjectCategoryLast Update
0020871AI War 2[All Projects] Bug - GameplayJan 9, 2019 7:50 am
ReporterKahunaAssigned ToBadgerBadger 
Severityminor 
Status resolvedResolutionfixed 
Product Version0.809 Divide By Human 
Fixed in Version0.810 Brace for Cross Planet Attack 
Summary0020871: Ships teleport to a far away location when going through a wormhole
DescriptionSome times when you order ships to go through a wormhole they teleport to a far away location from the wormhole after having gone through it,

Steps to reproduce:
-Start a new game with Raptors (I think it works better with fast ships)
-Build a full cap (60) of Mark I Raptors on planet A
-On planet A move the Raptors far away from planet B's wormhole
-Order them to go through planet B's wormhole (Screenshot A) and DO NOT look at planet B yet because if you're viewing planet B it wont happen
-Pause the game when about half of the Raptors seem to have gone through the wormhole (Screenshot B)
-Look at planet B and see how some of the Raptors have teleported to a far away location from the A-->B wormhole (Screenshot C)

Attached a save file and 3 screenshots. Load the save file and simply unpause the game and the Raptors will fly trough the wormhole. You can try viewing and not viewing the planet B and see how it affects this bug.
TagsNo tags attached.

Relationships

related to 0020769 resolvedBadgerBadger Ships warping to incorrect position after wormhole 
related to 0020397 resolvedBadgerBadger Ship icons appearing and disappearing in the middle of the planet 
related to 0020665 resolvedBadgerBadger When moving through a wormhole while paused, some ships appear on random places in the target system 
related to 0020356 resolvedBadgerBadger If units have not enough place, they will teleport to other place on the map 
related to 0020800 resolvedBadgerBadger Some ships enter new galaxy not at wormhole 

Activities

Kahuna

Dec 28, 2018 4:59 am

reporter  

A.jpg (985,751 bytes)
C.jpg (1,031,553 bytes)
Bug Hunt.save (842,541 bytes)
B.jpg (970,454 bytes)

Dune

Dec 29, 2018 2:20 pm

administrator   ~0050686

Thanks. This is related to a number of other cases as well.

BadgerBadger

Jan 8, 2019 11:27 pm

manager   ~0050704

Last edited: Jan 8, 2019 11:49 pm

View 3 revisions

I think this is a race with the wormhole traversal and decollision code. In DoEntityStepLogic_Ship we check if the ship is going to go through a wormhole, and if it is then we call
this.Planet.ShipsReadyForWormholeTraversalAtEndOfThisFrame.Add( this );

Then we call this.Inner_CheckForPlannedMove();
this function checks the outcome of the decollisiion logic, then updates the ship's location appropriately.

I think the location update in Inner_CheckForPlannedMove() can under some circumstances happen after the wormhole traversal code run from EntitySimLogicImplementation.cs (which handles the ShipsReadyForWormholeTraversalAtEndOfThisFrame list), causing ships to first change planets, but then wind up at the location the decollision logic intends for them.

A tentative fix is checked in, where we simply omit handling updates from the decollision thread for the first second after a ship changes planets. It's a bit hacky, but it seems to work.

RocketAssistedPuffin

Jan 9, 2019 7:50 am

developer   ~0050705

After testing with this case, as well as 3,000 ludicrously fast ships in several ways of entering wormholes, this issue appears to be fixed at last.

Issue History

Date Modified Username Field Change
Dec 28, 2018 4:59 am Kahuna New Issue
Dec 28, 2018 4:59 am Kahuna File Added: A.jpg
Dec 28, 2018 4:59 am Kahuna File Added: B.jpg
Dec 28, 2018 4:59 am Kahuna File Added: C.jpg
Dec 28, 2018 4:59 am Kahuna File Added: Bug Hunt.save
Dec 28, 2018 5:06 am Kahuna Description Updated View Revisions
Dec 29, 2018 2:20 pm Dune Assigned To => x4000Bughunter
Dec 29, 2018 2:20 pm Dune Status new => assigned
Dec 29, 2018 2:20 pm Dune Note Added: 0050686
Dec 29, 2018 2:20 pm Dune Relationship added related to 0020769
Dec 29, 2018 2:21 pm Dune Relationship added related to 0020397
Dec 29, 2018 2:22 pm Dune Relationship added related to 0020665
Dec 29, 2018 2:22 pm Dune Relationship added related to 0020356
Dec 29, 2018 2:22 pm Dune Relationship added related to 0020800
Jan 8, 2019 11:27 pm BadgerBadger Note Added: 0050704
Jan 8, 2019 11:40 pm BadgerBadger Note Edited: 0050704 View Revisions
Jan 8, 2019 11:40 pm BadgerBadger Assigned To x4000Bughunter => BadgerBadger
Jan 8, 2019 11:49 pm BadgerBadger Note Edited: 0050704 View Revisions
Jan 9, 2019 7:50 am RocketAssistedPuffin Status assigned => resolved
Jan 9, 2019 7:50 am RocketAssistedPuffin Resolution open => fixed
Jan 9, 2019 7:50 am RocketAssistedPuffin Fixed in Version => 0.810 Brace for Cross Planet Attack
Jan 9, 2019 7:50 am RocketAssistedPuffin Note Added: 0050705