OpenXcom Forum

Contributions => Programming => Topic started by: 7Saturn on May 23, 2015, 09:53:49 pm

Title: Hovering Avenger
Post by: 7Saturn on May 23, 2015, 09:53:49 pm
I noticed an odd behavior, just after shooting down an ufo. Normally, the Avenger shoots one down, and immediately the question window pops up, if you want to land there, or not. (Of course not with an empty Avenger.) But for 1-2 weeks now, it happens randomly, that this question is not asked, but the Avenger seems to patrol over the crash site. It's not automatically returning, nor is it trying to go to a waypoint. It simply doesn't seem to be able to land. Only when sending it again to that crash site (even if it already is there), the question window is shown. Can somebody confirm that?
Title: Re: Hovering Avenger
Post by: Arthanor on May 23, 2015, 10:31:15 pm
Yup, I've had the same issue. Craft shoots down a UFO and hangs out on top of the crash site. If you click the craft, it will say that it is targetting the site even though it is making no progress getting there. As soon as you assign the crash site as a new target, you get the popup.

By opposition, if the UFO was downed by interceptors and you make it afterwards, the craft works fine.
Title: Re: Hovering Avenger
Post by: 7Saturn on May 23, 2015, 10:54:51 pm
As I never use the lightning, I have no idea if this is only an Avenger-related issue. Does anybody have that with Lightnings as well?
Title: Re: Hovering Avenger
Post by: Arthanor on May 23, 2015, 11:45:13 pm
I am actually experiencing that with the Piratez crafts. I would expect it happens with all fighter-transports
Title: Re: Hovering Avenger
Post by: 7Saturn on May 23, 2015, 11:46:23 pm
I would expect it happens with all fighter-transports
I believe so, too.
Title: Re: Hovering Avenger
Post by: Hobbes on May 23, 2015, 11:53:28 pm
It may not be related but have you checked Warboy's comment in one of the latest nightlies?

Quote
don't put rulesets in the common folder. ever.
it causes the primary master to get indexed.
that's bad.
Title: Re: Hovering Avenger
Post by: 7Saturn on May 23, 2015, 11:56:23 pm
Well, as I don't have changed anything (as a matter of fact, I just even copied one mod into the mod-folder but never activated it), I don't think, there should be any ruleset-files where they don't belong. Except, if they are moved somewhere by the make install command.
Title: Re: Hovering Avenger
Post by: Arthanor on May 24, 2015, 01:18:57 am
It may not be related but have you checked Warboy's comment in one of the latest nightlies?
Since I am running Piratez, I am using an older version of OpenXCom. April 28th or something.. The problem is there, but I don't know if it has been solved or not.
Title: Re: Hovering Avenger
Post by: 7Saturn on May 24, 2015, 01:38:48 am
My Nightly is about 2 days old, so apparently not. But I can try to compile again, if there there is a change to be expected.
Title: Re: Hovering Avenger
Post by: Alex_D on May 24, 2015, 03:28:27 am
I noticed as well, with several mods, several nighties ago. Multiple craft that downed an usually large UFO, hover at the UFO crash site until they run out of fuel. I have to manually select each of them the order of return to base. These affected craft can be just interceptors, not necessarily troop carriers.
Title: Re: Hovering Avenger
Post by: 7Saturn on May 24, 2015, 03:30:27 am
The size of the ufo doesn't seem to matter at my end. Even with medium scouts I experience this problem.
Title: Re: Hovering Avenger
Post by: Arthanor on May 24, 2015, 03:36:15 am
I just had a sort of opposite: I attacked a UFO with 3 crafts. My transport asked to deploy and I said no (no night time mission if I can avoid it, thanks!). Then it went back to base but the two fighter crafts I had didn't, they just hovered on top of the crash site..
Title: Re: Hovering Avenger
Post by: pilot00 on May 24, 2015, 05:18:22 pm
The "problem" is occuring mainly if you have a multiple interception and usually a transporter/fighter transporter is in there. I havent faced on single interceptors. And I think it happens on vanilla as well.
Title: Re: Hovering Avenger
Post by: Arthanor on May 24, 2015, 05:53:36 pm
It's odd how it says that it is targeting the crash site, but doesn't do anything. It's like the code checks what to do for 1 craft when the target crashes, then forgets to deal with the others so they just hang out there. Is that possible?
Title: Re: Hovering Avenger
Post by: 7Saturn on May 24, 2015, 06:12:06 pm
I also have this with just one Avenger craft. No others are in the air, yet it simply refuses to land, without sending it to the wreck a second time.
Title: Re: Hovering Avenger
Post by: 7Saturn on August 06, 2015, 11:56:33 pm
Well, it's a few months later, now, I already reported that bug, but even with current nightly (downloaded a few minutes ago) the problem of hovering Avengers seems to be still an issue. Any hope, that it might be fixed any time soon? I saved you a game, just after the problem occured. Sent an Avenger to intercept an ufo, shot it down and then – nothing happens, at all. It just hovers above the wreckage. (Uses a few mods, tough but the problem also occurs without any mods.) The reported bug is this one (https://openxcom.org/bugs/openxcom/issues/915).
Title: Re: Hovering Avenger
Post by: doctor medic on August 09, 2015, 04:12:55 pm
I think the reason why the avenger doesnt land sometimes might have to do with the fact that the game might confuse that craft as a interceptor and not as a landing craft
Title: Re: Hovering Avenger
Post by: 7Saturn on August 09, 2015, 04:19:47 pm
But then they would return from the crashsite immediately after reaching it. They don't...
Title: Re: Hovering Avenger
Post by: Arthanor on August 09, 2015, 07:56:14 pm
Even interceptors occasionally hover over UFOs that they just shot down. I'm not sure what the issue is, and it is not saveable as far as I can tell..

I tried to save it, and when I did, the game loads the crafts with their targets, which they immediately reach and then update the trajectory so interceptors return and avengers land.

As far as I have experienced, the confusion only occurs while playing, upon shooting down a UFO. Sometimes the game seems to not update all crafts, so some still are trying to intercept the crash site. If you click the craft and assign them again, it works. If you click and hit cancel, they remain in this weird state.
Title: Re: Hovering Avenger
Post by: Neo23 on August 09, 2015, 08:50:11 pm
I can confirm this bug and I reported it a while ago also:
https://openxcom.org/forum/index.php/topic,3682.0.html (https://openxcom.org/forum/index.php/topic,3682.0.html)
...but no response yet.
Title: Re: Hovering Avenger
Post by: doctor medic on August 09, 2015, 09:05:37 pm
does it have to do with the 30 minute detection rate?
Title: Re: Hovering Avenger
Post by: Arthanor on August 09, 2015, 09:18:51 pm
I suspect it's something that got broken with above ground missions/interceptions related to TftD. The timing would be about right. We've had 30 minutes interception windows since a long time ago, but this bug is relatively new.
Title: Re: Hovering Avenger
Post by: doctor medic on August 11, 2015, 08:11:20 am
I believe that if the ufo is about accelerate to run away from the ship and you decide to down it now the intercepter would stay still next to downed ufo.Atleast that what happened in xpiratez,but i dont think interception is changed that much
Title: Re: Hovering Avenger
Post by: Arthanor on August 11, 2015, 08:14:15 am
Just saw an example of this in Meridian's LP (https://www.youtube.com/watch?v=zNqUfgyWAa8&index=67&list=PLe0K-GUDQkNIFsiJLbZIfaoRVsY5qmx09) at 30:30. His crafts hover and he needs to select them (you quickly see that the target is still the crash site, despite them being interceptors) and send them home manually.

I just added it to the bug tracked, can't hurt.. We'll see if something happens

For reference, what version of OpenXCom are you guys using when seeing the issue? It would be good to be able to get the nightly versions.
Title: Re: Hovering Avenger
Post by: doctor medic on August 11, 2015, 10:52:24 am
Just saw an example of this in Meridian's LP (https://www.youtube.com/watch?v=zNqUfgyWAa8&index=67&list=PLe0K-GUDQkNIFsiJLbZIfaoRVsY5qmx09) at 30:30. His crafts hover and he needs to select them (you quickly see that the target is still the crash site, despite them being interceptors) and send them home manually.

I just added it to the bug tracked, can't hurt.. We'll see if something happens

For reference, what version of OpenXCom are you guys using when seeing the issue? It would be good to be able to get the nightly versions.
Im using extented with xpiratez which i believe doesnt use the latest nightly,im not sure
Title: Re: Hovering Avenger
Post by: Warboy1982 on August 11, 2015, 11:03:05 am
THIS is why you need to post bugs on the tracker.
Title: Re: Hovering Avenger
Post by: 7Saturn on August 11, 2015, 11:52:24 am
Already done. By two people independently.
Title: Re: Hovering Avenger
Post by: Warboy1982 on August 11, 2015, 01:13:03 pm
perhaps, but today was the first time i read this thread.
Title: Re: Hovering Avenger
Post by: 7Saturn on August 11, 2015, 01:26:37 pm
Does it help?  ;D
Title: Re: Hovering Avenger
Post by: Arthanor on August 11, 2015, 03:52:44 pm
Did you also link to the post in your report from the bug tracker 7Saturn? I did, that might be the difference? To be fair, even when looking for the post it took me a while as I expected this would be in Troubleshooting, not in Development.

As for it helping.. I don't know. My report is now marked as "Not a bug" and my understanding of it is that until we can duplicate it, it won't be looked at (too much other stuff to do?). I was sort of thinking that would happen, since we don't know how to make the bug happen, but hoping that seeing it in Meridian's LP would be enough proof that it would be considered a bug under investigation, rather than "Not a bug".

I guess the conclusion is: Pay attention to your interceptions, if it happens, log everything that happened before and let's build up some proof.
Title: Re: Hovering Avenger
Post by: Warboy1982 on August 11, 2015, 04:47:36 pm
i closed it because it was a duplicate ;)

but yeah, i've been trying all day to replicate this one with no success whatsoever. if someone comes up with a save that shows this in action, i'll give you cookies.
Title: Re: Hovering Avenger
Post by: Arthanor on August 11, 2015, 05:02:19 pm
AH!! That makes more sense :D Thanks for the explanation.

As far as I know, it is impossible to save this behaviour. If you had interceptors hovering above a crash site and not going anywhere, saving and reloading will actually send them home, since upon reload, the game checks their destination, notices that they're there and can't do anything, so sends them back (or prompts for the ground battle if it is a fighter transport).

That's why I thought Meridian's LP clip was neat, because it shows the bug in action and we can see everything that leads up to it. But it doesn't help me reproduce it either :(

I'll try to play an interception game tonight, see if I can make it happen. Maybe it has something to do with having waypoints first, and only targeting a UFO with the craft later, while in flight? If you send your interceptors straight from base, I don't think it happens. But if you redirect a bunch of time (like Meridian did in his LP linked above, to deal with the 2 terror ships), something gets confused. That also would make sense that we see it more in Piratez, where patrolling and redirecting occurs more often than in vanilla.
Title: Re: Hovering Avenger
Post by: Warboy1982 on August 11, 2015, 05:25:13 pm
true, but i can manipulate the code to avoid that.
Title: Re: Hovering Avenger
Post by: 7Saturn on August 11, 2015, 05:49:42 pm
Did you also link to the post in your report from the bug tracker 7Saturn?
First Posting on the second page of this thread. Yes, I did. =) Not at first, but later.
I was sort of thinking that would happen, since we don't know how to make the bug happen, but hoping that seeing it in Meridian's LP would be enough proof that it would be considered a bug under investigation, rather than "Not a bug".
Problem is, I'm playing the game a lot, keeping track of what I did before this problem occurs and I really don't know, what's provoking that bug. There's no pattern, I can see. Some days it nearly doesn't happen at all, then the other day, it happens around every third crash-site.
I'll try to play an interception game tonight, see if I can make it happen. Maybe it has something to do with having waypoints first, and only targeting a UFO with the craft later, while in flight? If you send your interceptors straight from base, I don't think it happens.
Yes, it does. In comparison, I use waypoints rather rarely. Almost always I send them straight to the ufo. It even seems not to matter, in which order you do send them. Having multiple Avengers on targets simultaneously, most of them simply shoot the ufo down, asking to land. But then, one of them simply doesn't trigger that question-window.
Title: Re: Hovering Avenger
Post by: Warboy1982 on August 11, 2015, 07:41:02 pm
i've got my money on floating point precision error, who wants to take null pointer?
Title: Re: Hovering Avenger
Post by: Meridian on August 11, 2015, 07:57:12 pm
true, but i can manipulate the code to avoid that.

Well, if you can manipulate it, then here is a save I made just now.
RAVEN-1, RAVEN-2, RAVEN-4 and RAVEN-5 were attacking all at once... after shooting UFO down ravens 4 and 5 stayed on place, raven 1 and 2 were returning.
Of course, after making this save and reloading it also ravens 4 and 5 started returning.

OpenXcom: openxcom_git_master_2015_08_11_1441.zip
Mods: only FMP v1.6.2, no other mods
Config file: also attached

Sorry for FMP, but I don't have saves from vanilla game at the moment and it would take a lot of time to get there.
Title: Re: Hovering Avenger
Post by: Meridian on August 11, 2015, 08:27:44 pm
Here's a save "before" the incident... send ravens 1 2 4 5 after the UFO-57 and make them all attack at once (aggresive attack)... in about 20 such attempts I got the bug twice.
Title: Re: Hovering Avenger
Post by: Meridian on August 11, 2015, 09:44:05 pm
OK, I was able to reproduce it (at least I hope it is the same thing) with 100% success.

Here is the video how to do it: https://youtu.be/SICBrduP4TU

Starting save is attached.
Title: Re: Hovering Avenger
Post by: Arthanor on August 12, 2015, 01:25:55 am
Nice work Meridian!

So it happens when the interceptors are slightly off the UFOs when they enter combat.. that was strange to begin with. Didn't craft just appear to be right on top of the UFO in vanilla while you had the interception window minimized?
Title: Re: Hovering Avenger
Post by: Warboy1982 on August 12, 2015, 09:25:52 am
try again with the latest build, i think i can see exactly what went wrong in meridian's video, so thanks for that.

sorry, but i'm not gonna install the FMP over a debug exe, 10 minute load times aren't conducive to me getting anything done.
Title: Re: Hovering Avenger
Post by: 7Saturn on August 12, 2015, 10:01:32 am
I'll try it as well.
Title: Re: Hovering Avenger
Post by: Solarius Scorch on August 12, 2015, 06:06:52 pm
sorry, but i'm not gonna install the FMP over a debug exe, 10 minute load times aren't conducive to me getting anything done.

Does it take so much longer in debug mode? Ouch.
Title: Re: Hovering Avenger
Post by: Arthanor on August 12, 2015, 06:58:46 pm
Everything takes longer in debug mode. I tried it once thinking it would help me when the game crashes because I messed up something in the XAE, but it was painful. Even playing the game gets slower because it tracks a lot more stuff.
Title: Re: Hovering Avenger
Post by: Warboy1982 on August 12, 2015, 07:34:14 pm
Does it take so much longer in debug mode? Ouch.

just to be clear - debug executable, not debug mode in the config.

if it's any consolation, piratez is worse ;)
Title: Re: Hovering Avenger
Post by: Meridian on August 12, 2015, 09:29:53 pm
This is gonna be a complicated post, but please bear with me and read carefully.

1/ the functional issue with interceptors staying on place after shooting down UFO is now fixed (or at least I couldn't reproduce anymore)

2/ there is still a visual issue that some interceptors are exactly over the UFO, but some are visibly some distance from it... I don't care as long as it works, but it looks funny. Visual issue can be seen here: https://youtu.be/3vngZKRhrWg

3/ this visual issue (and also the description of the bug in the tracker) reminded me that I also had an issue with skyranger following UFOs which land... the skyranger for some reason didn't start the mission after the UFO landed... and I could reproduce this now also on the newest build

Again I used the same trick with "1 Day" speed, but I have seen it also on much lower speeds (e.g. "5 Min"), there is even a proof somewhere in my LP, but I don't know which episode. Anyway, this video: https://youtu.be/sE7k7foX98s shows the issue... I am doing the same there 3-times, first on "5 Min" speed, then on "1 Hour" speed and lastly on "1 Day" speed. First two speeds correctly result in a mission... but the third speed causes that the mission never starts.

If useful, the save used in the video is attached here. Uses nightly build from today (version visible in video) and FMP 1.6.2, nothing else.

PS: @warboy trying to look smart, I guess you may need to add another condition for ufo.isLanded() just like you added ufo.isCrashed()... but of course, that's just my wild guess
Title: Re: Hovering Avenger
Post by: Warboy1982 on August 16, 2015, 03:30:48 am
try now
Title: Re: Hovering Avenger
Post by: Meridian on August 16, 2015, 09:14:09 am
1/ the functional issue with interceptors staying on place after shooting down UFO is now fixed (or at least I couldn't reproduce anymore)

Fixed. Re-test OK.

2/ there is still a visual issue that some interceptors are exactly over the UFO, but some are visibly some distance from it... I don't care as long as it works, but it looks funny. Visual issue can be seen here: https://youtu.be/3vngZKRhrWg

Fixed with the newest nightly (openxcom_git_master_2015_08_16_0227.zip).

3/ this visual issue (and also the description of the bug in the tracker) reminded me that I also had an issue with skyranger following UFOs which land... the skyranger for some reason didn't start the mission after the UFO landed... and I could reproduce this now also on the newest build

Again I used the same trick with "1 Day" speed, but I have seen it also on much lower speeds (e.g. "5 Min"), there is even a proof somewhere in my LP, but I don't know which episode. Anyway, this video: https://youtu.be/sE7k7foX98s shows the issue... I am doing the same there 3-times, first on "5 Min" speed, then on "1 Hour" speed and lastly on "1 Day" speed. First two speeds correctly result in a mission... but the third speed causes that the mission never starts.

This last issue is not fixed yet.
Title: Re: Hovering Avenger
Post by: Warboy1982 on August 16, 2015, 09:57:34 pm
damn, i was hoping the last two were linked
Title: Re: Hovering Avenger
Post by: Warboy1982 on August 18, 2015, 04:27:45 am
good news everyone!

we're sending your rookies to a ufo landing site to make sure this bug is fixed, so they can all die gloriously in battle!

now, hurry along! you don't want to be late.
Title: Re: Hovering Avenger
Post by: Meridian on August 18, 2015, 10:06:55 am
All 3 bugs fixed.
(All rookies died in a blaze of glory.)