Bug Hunting

Revolution v1.5 beta

Rev 1.5-12+ has been out of the beta and into the “official” release for a while. I had a lot of feedback during the beta, but they were not always very large or busy games. In the first few Tricky’s games with 1.5-14 we saw a few crashes. These all had one thing in common:

  • Crash to desktop when the aircraft you are flying is destroyed

This is obviously not good, but it is also not easy to provoke in all cases. With problems like this we can only go backwards in the version history to try to find some version that no longer exhibits the bug.

But..

I run CC2 A LOT. I test my mods 99% of the time as single player and desktop hosted games, with just me, occasionally I use the spectator mode mode I made to help. Out of hours and hours and may dead mantas or petrels, I’ve locally had ONE crash.

While playing on Trickys, with a full compliment of players (24) I believe we had about 7 crashes, players were able to rejoin and continue.

I have the bug captured on video from Pupboy9000, and nothing especially new or unusual is happening, he gets shot and the game crashes.

The fact that it is virtually instant tells us that it’s probably the result of a call made by the vehicle_hud.lua script, as this is the only lua script running at full 30fps at this moment. If it were one of the others it’d take between 0.5 and 1.0 seconds to crash. So we’ve got that going for us..

Crashes usually come from making lua method calls into objects that have a native portion, these are mainly vehicle, tile and missile objects.

All of these objects are only safe to use for the single game tick you first get them for. If you keep one and access it in the next tick of the game, you are likely to crash the game engine. So it’s a fair assumption that this is what is happening.

I’ve made some defensive changes to the scripting in the HUD involved in scanning the map for units, I hope this helps, but again, I simply can’t get it to crash myself.

By:

Posted in:


Leave a comment