Author Topic: Hunting the most dangerous game: a bug  (Read 3187 times)

Offline Ts4EVER

  • Banner of THeTA0123
  • Developer
  • ******
  • Posts: 7.581
    • View Profile
Hunting the most dangerous game: a bug
« on: 26-09-2015, 19: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.



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:



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):



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.

Offline Slayer

  • Freeze Veteran
  • FH-Betatester
  • ***
  • Posts: 3.792
    • View Profile
Re: Hunting the most dangerous game: a bug
« Reply #1 on: 26-09-2015, 20:09:55 »
Can I get "Freeze Veteran" under my nick instead of Masterspammer? ;)

Offline Airshark79

  • Jr. Member
  • **
  • Posts: 453
    • View Profile
Re: Hunting the most dangerous game: a bug
« Reply #2 on: 26-09-2015, 20:09:41 »
nice

Offline gamerjer

  • Jr. Member
  • **
  • Posts: 173
    • View Profile
Re: Hunting the most dangerous game: a bug
« Reply #3 on: 26-09-2015, 20:09:40 »
awesome job guys looks verry nice!  ;D ;)

Offline Eat Uranium

  • Tea Drinker
  • Global Moderator
  • *****
  • Posts: 4.479
  • Today's news will contain [REDACTED]
    • View Profile
    • FH2 Music
Re: Hunting the most dangerous game: a bug
« Reply #4 on: 26-09-2015, 20:09:00 »
Can I get "Freeze Veteran" under my nick instead of Masterspammer? ;)
Done :D

Offline Ivancic1941

  • Jr. Member
  • **
  • Posts: 972
    • View Profile
Re: Hunting the most dangerous game: a bug
« Reply #5 on: 26-09-2015, 20: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.
« Last Edit: 26-09-2015, 20:09:27 by Ivancic1941 »
Floppy Wardisc or Floppy Wierdbear

Offline Wilhelm

  • FH-Betatester
  • ***
  • Posts: 553
  • Betatester
    • View Profile
Re: Hunting the most dangerous game: a bug
« Reply #6 on: 26-09-2015, 20: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!  ;)).
« Last Edit: 27-09-2015, 19:09:55 by Wilhelm »

Offline MaJ.P.Bouras

  • Masterspammer
  • ****
  • Posts: 3.208
  • A Hellenic version of Jackie Chan.
    • View Profile
Re: Hunting the most dangerous game: a bug
« Reply #7 on: 26-09-2015, 22: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!

Offline Slayer

  • Freeze Veteran
  • FH-Betatester
  • ***
  • Posts: 3.792
    • View Profile
Re: Hunting the most dangerous game: a bug
« Reply #8 on: 26-09-2015, 23:09:01 »
Can I get "Freeze Veteran" under my nick instead of Masterspammer? ;)
Done :D
Cool, thx!

Offline Roughbeak

  • Science of Hooting, PhD
  • Developer
  • ******
  • Posts: 1.422
    • View Profile
Re: Hunting the most dangerous game: a bug
« Reply #9 on: 27-09-2015, 00:09:05 »
Quite a bug, that KT! :D

Online Matthew_Baker

  • FH-Betatester
  • ***
  • Posts: 1.352
    • View Profile
Re: Hunting the most dangerous game: a bug
« Reply #10 on: 27-09-2015, 01: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 ;)

Offline Turkish007

  • Masterspammer
  • ****
  • Posts: 4.005
  • Mini-mod necromancer
    • View Profile
Re: Hunting the most dangerous game: a bug
« Reply #11 on: 27-09-2015, 10: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!

Offline Oberst

  • Jr. Member
  • **
  • Posts: 812
    • View Profile
Re: Hunting the most dangerous game: a bug
« Reply #12 on: 27-09-2015, 11:09:20 »
Really awesome read! This are the stories, which makes me feel respect for all the work everyone puts into this mod!

Offline Skalacy

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Hunting the most dangerous game: a bug
« Reply #13 on: 27-09-2015, 12:09:39 »
outstanding!  :D

Offline Roughbeak

  • Science of Hooting, PhD
  • Developer
  • ******
  • Posts: 1.422
    • View Profile
Re: Hunting the most dangerous game: a bug
« Reply #14 on: 27-09-2015, 14:09:37 »
That is some frustrating work, looking for a single bug for hours...

More like months.. :)