Author Topic: M21 Artillery Bug Found (previously: M21 Artillery Bug Vanishes Under Logging)  (Read 1343 times)

0 Members and 1 Guest are viewing this topic.

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
M21 Artillery Bug Found (previously: M21 Artillery Bug Vanishes Under Logging)
EDIT: We found the artillery bug!

Seems to be caused by having one of the valid artillery targets targeted at the moment it dies, causing the "targeted" SEXP to lock into "ALWAYS FALSE" thereby rendering the whole event "ALWAYS FALSE", making it unusable thereafter. We now return you to your regularly scheduled blowing things up.


ORIGINAL POST:

So last night, after Axem found the airframe bug in Her Finest Hour was caused by Campaign Persistent Variables being bugged, I decided to take it upon myself to do some thorough testing of the "Artillery Bug". I didn't actually encounter that bug the first time I played through Tenebra (like most players probably did, I just assigned targets at the start of the mission and then later didn't have time to give specific targets so I just told them to fire free), and I wanted to see what it did for myself. So I must've played through Her Finest Hour a few dozen times last night (including getting beamed by Mjolnirs twice which, despite initial concerns, appears to have just been bad luck and not some weird bug whereby Mjolnirs have started targeting fighters), and encountered the "Artillery Bug" every single time.

Let me repeat that. Every. Single. Time. Well, maybe not the time I died ten seconds into the mission from a lucky Mjolnir shot, but any time I survived long enough to have taken out the front Mjolnirs and the Auroras and started delivering the sentry virus, I'd suddenly find myself unable to designate or remove artillery targets. "Well," said I, "at least it's reproduceable!" After initially coming to the conclusion that it was triggering every time both the Mjolnirs and the Auroras were down, I then had a run where the bug popped up with an Aurora still alive and said "**** it, it must just kick in after a certain amount of time passes."

I wanted to use the event log to take a closer look at the problem, but I couldn't find any documentation for it. Then tonight, niffiwan managed to find the thread introducing the thing (and helpfully pasted the information on the wiki), so I decided to test HFH while logging the artillery event.

The bug didn't occur.

Let me repeat that. Despite the bug being guaranteed to occur whenever I played last night, and me using the exact same build tonight, the bug did not occur when I told that event to output to the event log.

Now, once could have been a fluke; after all, the first time, I'd foolishly told it to log both true and false to the event log, and not disabled any of the other event's logging flags, so I had an 80 megabyte log by the end of the run (it was horrifying; I didn't even try to read through it). So I cleaned out the unneccessary logging flags and tried it again, and got a nice, trim, 60 kilobyte event.log... and the bug still didn't happen.

Now, I'm perfectly willing to play through Her Finest Hour another fifty times to help track down this bug, but it's 10:30 at night and I have work tomorrow and the bug has ****ing vanished on me the moment I started trying to log it. Just in case I'm the victim of horribly bad luck, here is a link to a modified version of Her Finest Hour that just logs whenever the fire control target picker event becomes true. If you can get the bug to happen with this version of the mission, it would be a big help if you would record how far into the mission you were, try to hit the "2" key one last time, and then share a copy of your event.log (including the time you noted) so we can see if the event returned true after that point (which would be a big help in diagnosing where the problem is occuring).

If nobody can get the bug to happen with this version of the mission, then clearly we are dealing with deep magic and I ****ing give up.
« Last Edit: May 30, 2014, 02:20:52 pm by AdmiralRalwood »
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: M21 Artillery Bug Vanishes Under Logging
disregard that, caught the ****ing thing: http://pastebin.com/uGeRSkBj

EDIT: Slightly unrelated bug, but the when-argument list for the fire control reset event (that untags the ships in the list) is missing the last two entries (for Mjolnirs Alpha and Beta), so they don't untag when you set fire control to "fire free". I just noticed it as I was editing the mission in a text editor to experiment with argument invalidation to see if it avoids triggering the "targeted" bug.
« Last Edit: May 30, 2014, 02:27:43 pm by AdmiralRalwood »
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Scotty

  • 1.21 gigawatts!
  • 211
  • Guns, guns, guns.
Re: M21 Artillery Bug Found (previously: M21 Artillery Bug Vanishes Under Logging)
Truly there has been more done for that mission in the last two days than since release.  Good show.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: M21 Artillery Bug Found (previously: M21 Artillery Bug Vanishes Under Logging)
That's not particularly true.