Upcoming Events! Community Event Calendar

BugSmashers – Episode 16 Written Wednesday 2nd of December 2015 at 03:32pm by CanadianSyrup

A new episode of BugSmashers is here! Check out The Relay’s Transcript TLDR By Dolvak: First server crash happens any time you shoot a gun without a particle effect (or barrel) assigned to it. Fixed...

A new episode of BugSmashers is here! Check out The Relay’s Transcript

TLDR By Dolvak:

First server crash happens any time you shoot a gun without a particle effect (or barrel) assigned to it. Fixed by forcing the code to check if it has a barrel assigned.

Second crash is caused by landing gear geometry that has been broken off or removed in some way. If the ship tries to trigger the animation using the landing gear it crashes. This is fixed by making so that animations that are tied to a ship can be removed without a crash.

Third crash is when the server is sending snapshots to the client for movement and a ship crashes into a local physics grid and managed to get inside it than it’s position is changed to be relative to the local grid teleporting it away and causing a crash. This is fixed by the server and client communicating what grid they are in every snapshot.


Transcript by CanadianSyrup

The Smash

Hey everyone, welcome back to a new episode of bug Smashers. Were pretty much in a brand new office, smashing the same old bugs. Well new bugs, same bugs, old, eh! New bugs.

Today I wanted to show you some of the bugs we have fixed thanks to you guys submitting those issues into the issue council so let’s get started!

Hey everyone, welcome to visual studio. I’m going to show you guys a couple crashes that we have resolved thanks to you guys reporting them in the issue council. So this first crash that we got is anytime you shoot a gun and it doesn’t have a particle effect or I should say it doesn’t have a barrel assigned to it. So on our guns we have one barrel guns, like a standard weapon and then we have other weapons such as one where it has a triangle, where it shoots the top one then the bottom one and then the right one. Basically designers will go crazy with these weapons and you can just assign multiple barrels and how they shoot and interact, it’s pretty cool.

Unfortunately we have weapons that don’t have barrels and when they try to pick an effect off a barrel the game crashes. We’ll probably have to fix that in the design XML so that we have a barrel on the weapon but for now we can at least prevent this crash from happening. It’s actually really simple, we just take this bit of a code and plop it down in a nice safe area that checks to make sure that well, we actually have barrels. This was a code change done by jesse in the UK and it has resolved our dedicated servers from crashing, [Wooo!] Go jesse!

I’m going to show you guys the next guy. So here we are in our lovely landing gear system. We have our ship and it has little, pretend this is a landing [Holds up a pen], little landing things where when I land down it might deploy out and if I go away it might deploy back. These are not entities, but just pure geometry that gets controlled by one master entity.

So we can have a bunch of geometry everywhere and they don’t have be a bunch of entities, it’s just one that controls them all. If we ever break the ship and split it, at the moment we used to just hide the geometry, but unfortunately those pieces of geometry are still bound to the vehicle animation. So if sometime later they would get removed because that debris piece, we stick those things on the debris piece, it will crash because the vehicle still thinks it owns them in the animation and it still tries to access them and it goes BOOM!

So by using this little bit of code, this new code done by steven in the UK, he’ll actually get the vehicle and the action controller which is basically the thing that controls the animations for the vehicle and if we basically remove this bit of attachment, we make sure to clear any animations that are tied to this thing on the vehicle. Once that’s done we remove the attachment and this thing can be attached to other things, removed or do whatever we want and we won’t crash. That was a pretty cool little crash thing there.

Finally we have a fun little crash that Paul Rendell has done. Well this one is a little tricky. We have our vehicle and he moves and he sends information to the server and the server sends information to the clients and we keep track of the history so that we can send basically snapshots. So I can send information here and information here and maybe information over here and as the other client moves he will interpolate between those points to simulate him moving. We don’t want to send too many snapshots because that would introduce lag, so we introduce just enough that they’re far away that we can interpolate between them.

Now in this interpolation we are sending pure world space coordinates and then we’re assigning the position based off that directly in the physics. The problem is if I’m in world space here and over here I am now in a local entity grid, like say a retaliator or constellation and the hornet decides to smack into it, he may enter that grid or if the ship explodes and splits in half, the grid of that ship might enter the grid now because the grid has become separated.

There are all sorts of funness but basically a vehicle can enter a grid and when that happens we’re still sending world space coordinates, but physics is thinking that is local space. So when you send that big, gigantic, huge position into this grid, it’s thinking it’s relative to that space. So the world space might be 2000x2000x2000, but we’re doing it local to the grid and it’s position might be 2000x2000x2000, but it’s going to be relative to this so it’s going to get to the position here and then move it 2000×2000 way over there even though it should be here.

If you get it big enough, you’ll actually crash inside because in our local grid we only capture 32-bit precision because don’t need that much in a local space and if you’re sending in this huge big number you’ll overflow it and then you get some naughty numbers and physics goes OMG and then [Makes a fart sound] Explodes. So what Paul has done is if we are sending a snapshot, recording a snapshot, we make sure we are recording the grid we are in and anytime we set or get positions it will be now relative to that grid. So if I have a world space and I have a world space here, it will get transformed to the entity grid here and it will be in a position that’s not world space but relative to that grid. So this new world, this will be to the grid and now we can interpolate between those points and everything will work fancy dancy.

That was actually a pretty naughty crash and there were a couple things going back and forth, but it seems to be doing okay. Finally there were some good crashes fixes getting done by Chris Rain in the Frankfurt office. He’s been going up and down, chasing physics trying to find all these naughty dangling pointers, thread issues, allocation things, you know if a thread here and a thread here decide to access the same thing and thread A is like: “I’m going to remake all the memory”, and B is like: “I’m going to touch that, KABOOM”. We have a lot of crashes going on and a lot of guys working on some fixes, but thanks to you guys posting on the issue council we’ve been able to track those down and get them fixed. Hope you guys enjoyed, till next time?

Hope you guys enjoyed this episode of BugSmashers. Thanks to you guys for posting those issues on the issue council we’re able to track down some problems, fix a bunch of crashes. I mean all those studios, the LA studio, the UK studio, the Austin studio, even the frankfurt studio were all looking for these bugs that you guys have been reporting. Fix after fix after fix. Just today I saw a bunch from the UK and frankfurt office and a whole bunch of crash fixes so keep it up! We’re going to make this build stable and we’ll see you next time!

This video made possible by the ICC Stellar Surveyors and subscribers like you.


Director of Transcripts

A polite Canadian who takes pride in making other peoples day brighter. He enjoys waffles with Maplesyrup, making delicious puns and striving for perfection in screaming at the T.V. during hockey games.