Subliminal
Bugsmashers

Star Citizen: Bugsmashers! - AI Constellation Crashes

1 March 201700:07:13151 linesWatch on YouTube ↗

Transcript — every row opens the video at that moment

  1. 00:00:06

    [Music] hey everyone welcome to bug Smashers I'm your host Mark gent I'm here to take you behind the scenes on how we smash bugs bug bashes so hey guys I am here in another fun test level and got a report of a bug or I should say a crash when we bring in an AI uh constellation so let's give this a try constellation drag that guy in let it load oo big ship now it's building all the shaders for him all

  2. 00:00:54

    right so let's pop in the game pop out of the game and see if we can get that crash and crash ah crash so this is actually a specialty crash uh we have these things known as fatal errors when uh the code gets into a specific section of code the programmer may add this fatal eror saying you should never get here if you get here here is a complete um call stack so that we could log it and try to figure out how we got to that spot and so this specific um call stack or I should say crash uh save not save the level hit the breakpoint we'll go to here uh so this is our component batch up data so we

  3. 00:01:43

    have an entity our this constellation and it may be composed of a bunch of entity or I'm sorry components like uh physics geometry interactions all sorts of things and if they want to do an update they go through this batch updator so they could get batched in a multi-threaded update or in the regular main thread update and you're not supposed to be able to register these updates when the entity is shutting down because when we shut down the entity we remove all the components we remove all the updates and so if you're trying to register an update during this phase well bad things will happen so we want to know when people will get to this point and unfortunately the editor is a little special child where on the same frame that we destroy the uh interior or I

  4. 00:02:35

    should say the all the entities in the level we actually create it again so what we have is um uh the constellation getting deleted and then getting created and when something gets deleted we mark it as garbage and that's how we know it's going away but it doesn't necessarily mean it's going to be removed just it's basically oh I have some trash cans I throw some trash away garbage man hasn't picked it up yet but he might tomorrow might today might sometime later and this bit of code was only checking to see if it was in the garbage bin uh technically uh you shouldn't be able to register when you're in an update um when you're in garbage but it shouldn't be a fatal error either because it you could register but it

  5. 00:03:22

    should just abort out and only during the actual shutdown phase should this go so we're going to change this bit of code so if we're in garbage and our entity is actually really really shutting down the garbage man's coming to pick them up then we'll fatal air because something serious has gone wrong otherwise we'll just skip out because well and we only want actually we just want to skip out all the time but we only want the Fatal air if we're shutting down the actual

  6. 00:04:14

    entity so we threw it in the garbage bin if someone um registers for an update it'll just get ignored because this thing's going to get deleted there's the it's just a little one of those funky things where yeah you marked is deleted but none of the components on there know it's getting deleted yet because well we're not in the process so for now we just go yeah we'll just ignore this update because trust us it's going to get removed and we won't crash the game horribly instead we'll just softly ignore it and then the game code will delete it sometime later and everyone will be happy all right so let's give this a compile all right we're back back in the amazing test level see what happens when

  7. 00:05:02

    we plop down another AI constellation let it load ha there we go and now we'll hop in game mode and then pop out of game mode and no crash right right ah no crash perfect so you know the end deletion phase is a little bit tricky CU you always have to uh inform certain systems some things are getting deleted but you don't want to inform certain things until you're in the actual yes this is a deleted phase uh since this is one of those you know

  8. 00:05:50

    lower end systems it needs to know where exactly we're at and then once we get to the actual shutdown then the component opponents can know where they're at too uh so that in between phase is kind of one of those weird things where you have to get just right especially when you have editor and game code which do things a little bit differently hope you guys enjoyed till next time so as you guys saw we had a little bit of a issue with the designers they were hitting part of a code that would stop the game because they're hitting a spot where um we did not want the code to run in that area but at the same time the editor was doing something special where getting to that section of the error was technically a legit path so we had to change the code a bit so that it

  9. 00:06:38

    will still not hit that specific section while still allowing the editor to do its little specialty uh just another day in game development and I hope you guys enjoyed till next time thank you for watching so if you want to keep up with the latest and greatest and Star Citizen and Squadron 42's development please follow us on our social media channels see you soon

Transcript from YouTube’s automatic captions — punctuation and Star Citizen jargon are approximate. The video itself is hosted by CIG on the official channel.

Squadron 42

LiveSQ42 Launch Subathon

$2,094of $3,000

Getting Sub to Manchester for the Squadron 42 launch

Next giveawaySubscriber Store pick
$6.27to go