Forgotten Hope Public Forum

Announcements => Developer Blogs => Topic started by: Ts4EVER on 26-09-2015, 20:09:27

Title: Hunting the most dangerous game: a bug
Post by: Ts4EVER on 26-09-2015, 20:09:27
Disclaimer: Everything in here is extremely WIP and won't be in the first Russian release.

Hunting and squashing bugs is the bread and butter of FH2 development and usually it is a quite boring and simple affair. Little oversights and inconsistencies are reported and consequently fixed.
However, some bugs are different, only talked about in hushed tones around the beta testing campfire. Mention of the Operation Cobra crash bug, later traced to the Opel Blitz with twin MG34s, will still lead to thousand yard stares among the testers, same with that one bug where the server crashed when you changed seats in a captured apc. Usually with these bugs, the problem is not fixing them, but finding out what exactly causes the crash, meaning lots of testing time, with trial and error as the only option. However, none of these was as annoying as this one...

Some backstory first. Some time after Dukla Pass I started working on a map called Ogledow. The idea was for a map where the Germans need to break through some defensive lines using heavy armor. I thought having a map with more than one kingtiger would be nice.

(http://i.imgur.com/SDBHAqs.jpg)

Sweet

So we put the map into beta and tested it. All was going well until a tester's game froze out of nowhere. This is in itself unusual: Normally a game will crash, which means we can get an error message. In this case, the whole application froze and had to be killed in the task manager. To make matters worse, soon another froze... and another... until the whole server had experienced the bug. So now the trial and error began.

In order to fix a bug such as this, you need to be able to reliably reproduce it. This proved impossible at first. Usually the freezing would start some time into the round, but not at any predetermined point in time. Simply idling on the server or spending time on the map in local did not reproduce it, but it occured during testing without fail. At this time, the map did not have any unusual assets that were not used on other maps, with the exception of an unusual kingtiger skin that was so far unused, but had been in the game since 2.2. However, the bug occured even when it was replaced with the Operation Goodwood Kingtiger.

I decided that more drastic measures were necessary and deleted all static objects (buildings etc) from the map. Sadly, no screenshot survives of this, however, it failed to fix the bug. We could conclude, that the problem was either with the terrain, or something in the gameplay objects. So next we tested the map without any vehicles and were unable to trigger the freeze. At the same time we had noticed that the freeze usually occured in the German mainbase or by looking in its direction.

This gave me an idea. The next time we managed to trigger it, I walked into the German base backwards, carefully avoiding to look at anything. Once in the base, I slowly turned around counter-clockwise, looking at one asset after another. This is the last thing I saw:

(http://i.imgur.com/c5hjfal.jpg)

As you may be able to tell from the minimap, the next thing to come up would be the kingtigers.

We now knew how to trigger it... kind off. Clearly looking at the kingtiger caused the freeze, but why only after 20 minutes or so of gameplay? Our beta tester Wilhelm finally figured it out, managing to reliably reproduce the bug on a local server. Turns out:

The kingtiger freezes your game when you look at it, but only if it was destroyed more than a kilometer away from its original spawnpoint and respawned after that.


A lot of good testing hours died to bring you this information. By the way, for any custom mappers: This is still the case in the public version of FH2 and affects all Kingtiger variants, as well as possibly some other tanks.

Earlier I said that once the bug is known, it can usually be fixed quickly. Well, in this case it was so weird that even repeated attempts, including re-exports, did nothing to fix it. It was only today that Harmonikator finally managed to squash it. Apparently it was caused by some wheel animation issue. In the end, it took two lines of code to fix this legendary bug, which I will henceforth call the "Ogledow basilisk". (Cause it kills you when you look at it. Get it?)

Now you might ask: How was this never noticed? Well let's look at which maps have kingtigers on it:

Operation Goodwood and Eppeldorf: 1x1km, too small
Meuse River: 2x2km, but most of the space unused, no chance of triggering it
Bastogne: 2x2km, almost impossible to trigger due to spawning conditions

Ogledow however is 2x2km and very, very long (about 1.6km):

(http://i.imgur.com/SayvGw4.jpg)

I hope you enjoyed this little peek behind the scenes, even if the topic was a bit more mundane than usual. I would like to use this opportunity to thank all the testers who spent hours on the test server trying to get their computer to freeze and of course Stubbfan and Harmonikator, who after lots of tries managed to fix it.
Title: Re: Hunting the most dangerous game: a bug
Post by: Slayer on 26-09-2015, 21:09:55
Can I get "Freeze Veteran" under my nick instead of Masterspammer? ;)
Title: Re: Hunting the most dangerous game: a bug
Post by: Airshark79 on 26-09-2015, 21:09:41
nice
Title: Re: Hunting the most dangerous game: a bug
Post by: gamerjer on 26-09-2015, 21:09:40
awesome job guys looks verry nice!  ;D ;)
Title: Re: Hunting the most dangerous game: a bug
Post by: Eat Uranium on 26-09-2015, 21:09:00
Can I get "Freeze Veteran" under my nick instead of Masterspammer? ;)
Done :D
Title: Re: Hunting the most dangerous game: a bug
Post by: Ivancic1941 on 26-09-2015, 21:09:04
WHAT??????????
"The kingtiger freezes your game when you look at it, but only if it was destroyed more than a kilometer away from its original spawnpoint and respawned after that."

I just cant believe.
P.S.Very nice looking map.
Title: Re: Hunting the most dangerous game: a bug
Post by: Wilhelm on 26-09-2015, 21:09:16
I am glad this bug has finally been squashed!  Good work Harmonikater, Stubbfan, and everyone else!  ;D

Also, thanks for writing this article Ts4EVER.  I always enjoy these kind of development stories (even when you find yourself a part of them!  ;)).
Title: Re: Hunting the most dangerous game: a bug
Post by: MaJ.P.Bouras on 26-09-2015, 23:09:11
>Calling it Ooga booga bug
>Not calling it Medusa Bug.

Ts4ever pls


Goddamn the effort going into bug killing and play testing! GJ!
Title: Re: Hunting the most dangerous game: a bug
Post by: Slayer on 27-09-2015, 00:09:01
Can I get "Freeze Veteran" under my nick instead of Masterspammer? ;)
Done :D
Cool, thx!
Title: Re: Hunting the most dangerous game: a bug
Post by: Roughbeak on 27-09-2015, 01:09:05
Quite a bug, that KT! :D
Title: Re: Hunting the most dangerous game: a bug
Post by: Matthew_Baker on 27-09-2015, 02:09:27
So happy this is fixed and a huge thanks to guys like Wilhelm & Slayer for spending hours trying to reproduce it.

Thank God we don't have to compromise Ogledow cause it's an awesome map ;)
Title: Re: Hunting the most dangerous game: a bug
Post by: Turkish007 on 27-09-2015, 11:09:23
That is some frustrating work, looking for a single bug for hours... Thank you, all developers and betatesters for your altruism, trying to crank out the best!
Title: Re: Hunting the most dangerous game: a bug
Post by: Oberst on 27-09-2015, 12:09:20
Really awesome read! This are the stories, which makes me feel respect for all the work everyone puts into this mod!
Title: Re: Hunting the most dangerous game: a bug
Post by: Skalacy on 27-09-2015, 13:09:39
outstanding!  :D
Title: Re: Hunting the most dangerous game: a bug
Post by: Roughbeak on 27-09-2015, 15:09:37
That is some frustrating work, looking for a single bug for hours...

More like months.. :)
Title: Re: Hunting the most dangerous game: a bug
Post by: elander on 27-09-2015, 17:09:19
Nice reading!

Hillarious bug and well done by the testing team!
Title: Re: Hunting the most dangerous game: a bug
Post by: Mudzin on 28-09-2015, 14:09:48
Hmm... Stoumont strange server crashes are probably now clear...
Title: Re: Hunting the most dangerous game: a bug
Post by: Ts4EVER on 28-09-2015, 16:09:19
No, the bug is client side.
Title: Re: Hunting the most dangerous game: a bug
Post by: Mudzin on 28-09-2015, 16:09:39
So server didn't crash at all?
Title: Re: Hunting the most dangerous game: a bug
Post by: Ts4EVER on 28-09-2015, 16:09:16
No. In fact you could rejoin after and wouldn't freeze. It was a weird bug.
Title: Re: Hunting the most dangerous game: a bug
Post by: Pr0z4c on 28-09-2015, 18:09:11
'Stop; Tiger time!
https://www.youtube.com/watch?v=otCpCn0l4Wo
Title: Re: Hunting the most dangerous game: a bug
Post by: Ivancic1941 on 28-09-2015, 23:09:49
Why it wont be in first realese?Maybe first realise is closing up....
Title: Re: Hunting the most dangerous game: a bug
Post by: Zoologic on 04-10-2015, 17:10:55
Goodwood and Meuse is notorious for crashing in SP, also suspecting that it was the King Tiger that caused the crash. But the issue is not this specific. Perhaps, my system is a bit older, so the King Tiger doesn't have to do much for the issues to overwhelm my system.
Title: Re: Hunting the most dangerous game: a bug
Post by: Darman on 04-10-2015, 23:10:10
:D A rather weird bug indeed. I can totally feel your pain though - been there done that, more times than I can count actually. Its a constant part of developing modifications, no matter what base game.

As always, the active development is one thing, but the big time goes into testing, bug finding, bug fixing and gameplay balance adjustments. Good thing you have such capable testers around, one doesn't always have that support available. Kudos to all you folks involved in the QA process ensuring the community will get the highest quality and polished experience possible.
Title: Re: Hunting the most dangerous game: a bug
Post by: Mattitatti on 05-10-2015, 02:10:44
This map will a rapefest for the germans!  ;D
Title: Re: Hunting the most dangerous game: a bug
Post by: Flippy Warbear on 05-10-2015, 14:10:57
Yeah, germans getting raped by T-34-85's.
Title: Re: Hunting the most dangerous game: a bug
Post by: Kelmola on 05-10-2015, 18:10:15
This bughunt brought back fond memories of chasing the notorious "Opel with ZW36" gamecrasher bug when even us pubbies were drafted into finding it. :) Oh the hilarity of being ORDERED to bunny hop and TK in the main :)
Title: Re: Hunting the most dangerous game: a bug
Post by: Slayer on 05-10-2015, 21:10:56
This bughunt brought back fond memories of chasing the notorious "Opel with ZW36" gamecrasher bug when even us pubbies were drafted into finding it. :) Oh the hilarity of being ORDERED to bunny hop and TK in the main :)
Yeah that one is certainly in the top 3 together with this one imo. 3rd place goes to the switch seat APC I guess, but maybe there were more infanous ones to take the nr 3 spot.
Title: Re: Hunting the most dangerous game: a bug
Post by: Berkolok on 31-10-2015, 02:10:56
Yeah, germans getting raped by T-34-85's.

2 kt little bit  overkill though
Title: Re: Hunting the most dangerous game: a bug
Post by: Flippy Warbear on 31-10-2015, 08:10:21
2 kt little bit  overkill though

Nope.