View Issue Details

IDProjectCategoryLast Update
0025885AI War 2Graphical BugDec 19, 2021 9:45 pm
ReporterChris_McElligottPark Assigned ToChris_McElligottPark  
Severityminor 
Status resolvedResolutionfixed 
Product VersionBeta 3.765 Easier Upgrades And Necromancer Surge 
Fixed in VersionBeta 3.769 Neinzul Custodians And Total Conversions 
Summary0025885: Ships don't explode (but icons still do).
DescriptionThis is some sort of display error that came in during the last couple of months, when I was fixing some sort of memory leak. If you just watch the icons, they explode just fine when a ship dies, but ships themselves just disappear.

What should be happening is that the main ship gets thrown into a "dying ships" list, and then a little animation plays via the shader. All that main code is untouched, so I suspect that one of three things is happening:

Option 1: It's not triggering the "explode" code, and instead says "die instantly." I strongly doubt this, because the icons explode.

Option 2: The ship visual is for some reason not being used like it was before. This is is very likely. Previously, the ship may have been still on the squad object (visually) and thus exploding in place. I think I tried to move that to a central list. It's possible that these are instead going back to the pool way too soon.

Option 3: The ship visual might actually be working just fine, but since the underlying squad is missing (this is correct!), it might think that there's an error and immediately clear itself. This had to do with the phantom ships. If this is happening, then the ship itself should basically be "don't clear me while in exploding mode until my explosion is done."
TagsNo tags attached.

Relationships

child of 0025884 resolvedChris_McElligottPark Parent: Todo prior to beta exit 

Activities

tom.prince

Dec 14, 2021 2:38 pm

developer   ~0063454

This might be because r14957 is using LazyLoadSquadWrapper which returns null, if the squad is going to be removed at end of frame, which means the visualizer doesn't get a chance to notice the ship is dying. As suggested in the commit message, having either a version of the wrapper, or a new method on it, that lets the visualizer get a dying ship might address this issue.

Chris_McElligottPark

Dec 14, 2021 3:58 pm

administrator   ~0063456

This bug predated r14957, so I don't think it's that. But it's possible that doesn't help.

Chris_McElligottPark

Dec 19, 2021 9:45 pm

administrator   ~0063526

Turns out my thing for "don't draw when dead" was the first gate, and your squad lazy load wrapper was the second. In the end it was much easier to solve than I had worried it might be; I went up a very wrong path for a while, but now it's sorted!

* Refactored the ShipVisualizer to no longer use the lazy load wrapper, and to keep drawing even if the related in-game squad is dead. Between these two sets of changes, explosions of ships had stopped happening. They now work again, and should do so without risk of cross-threading exceptions.

Issue History

Date Modified Username Field Change
Dec 14, 2021 9:42 am Chris_McElligottPark New Issue
Dec 14, 2021 9:42 am Chris_McElligottPark Relationship added child of 0025884
Dec 14, 2021 2:38 pm tom.prince Note Added: 0063454
Dec 14, 2021 3:58 pm Chris_McElligottPark Note Added: 0063456
Dec 19, 2021 9:45 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Dec 19, 2021 9:45 pm Chris_McElligottPark Status new => resolved
Dec 19, 2021 9:45 pm Chris_McElligottPark Resolution open => fixed
Dec 19, 2021 9:45 pm Chris_McElligottPark Fixed in Version => Beta 3.769 Neinzul Custodians And Total Conversions
Dec 19, 2021 9:45 pm Chris_McElligottPark Note Added: 0063526