Subliminal
Bugsmashers

Star Citizen: Bugsmashers! - Spectator Mode Crash

29 March 201700:07:54148 linesWatch on YouTube ↗

Transcript — every row opens the video at that moment

  1. 00:00:06

    [Music] everyone welcome to bug smashers I'm your host mark abent I'm a senior gameplay programmer here at CSULA and I'm here to show you the bugs so hi everyone we're here and our fancy-dancy vanduul swarm and we're going to replicate this crash where if we enter spectate mode see if I enter it there I'm in spectator mode everything works as expected everything's moving around but as soon as I disconnect I should crush do-do-do-do BAM crash this was an

  2. 00:01:02

    interesting crash it's actually HUD code accessing the item court system the an important system of course is our system which we use to connect like weapons to the player player to the ship all sorts of crazy shenanigans and for some reason the parent I should say it's the parent port parent port or this particular port is garbage it might be this it either way it doesn't like something there's some nasty it's parent part that's actually garbage and when access it when it was like whoa you're actually seeing memory that was deleted so what's happening in a why well let's step back close all the games and we're gonna really

  3. 00:01:51

    run it and explain the issue so I ran the wrong thing I click too fast come on there you go all right so what's happening here is anytime we sit into a seat we have to switch the player to this link-state it's in this actor link state code right here and this is basically the area that you hit when you enter or where you get removed from a seat you'll get the link event and the D Link event and under normal situations you should be going here so if you want to go into a ship you should get the link event so let's get processed if you want to do something like inter spectator mode leave the seat and go to

  4. 00:02:39

    this bit of code what these bit of code here is we basically take the player and we don't attach them to exactly an item part we just set his parent what that allows us to do is have his radar communicate to the vehicles radar and have the vehicles radar communicate to the players radar it's like this is how they the to communicate to the items and sub-items so the player can players visor could see all the items on the ship and vice versa and that's what basically this bit of code does and this bit of code the d-link will clean it all up so that we completely separate and if we don't get the proper D linking and unlinking Arleen linking and unlinking will never reach these bits of code and so if we have the ship and we delete it but the player never got the the link

  5. 00:03:30

    event or we and then we switch to observer mode this is gonna leave a dangling pointer and the item port code because we never cleaned up so when we sit down we tell the player that you are now linking to the vehicle we switched to observer mode we moved the player delete the vehicle well we never got this D links thing so now the player never cleaned up his item port so he's still pointing to this memory that was just gone so we need to make sure that we get to here before we go to observer mode and the observer code is so if I request to observe so we'll get it process it and ultimately come here and what it's doing is summary of the code when we delete

  6. 00:04:18

    the ship it will exit him but before it could actually get to the link state it's just completely setting a state machine to something completely else so even if we remove them from the seat he's this bit of code just ignores that all stuff and just directly a sciences new state machine and we never get to dealing the fix of course is to make sure that we properly exit the seat so that the state machine could pretend the required e-link we could remove all the admin port pointers and then we're not wanting to envelop memory and we're actually out of the seat correctly and then we can now see then snap to the required spectate mode so we're gonna hit recode do compile in place and as that code goes up and running

  7. 00:05:13

    bacon here that crunch go bacon alright recoat is finished so now we can connect to the server and of course connect things then take a bit of time so wonder what we can do I know bacon yes that's right you're just gonna watch me eat bacon for the next minute I'm okay with this bacon all right we're back into the game put

  8. 00:06:09

    the bacon aside and now we're gonna eggs go to spectate mode and we properly eggs to this sick seat we went to observer mode so now everything should have cleaned up correctly so when I exit I should not crash from that particular crash and as you can see I haven't crashed it's now loading the main menu all as well so you could go to spectate mode exit the game come back get out of the spectator mode going to seat do whatever your heart's content and you'll no longer crash because we have no more dangling pointers hope you guys enjoyed time for more bacon as you guys saw we had a fun little bug there where you

  9. 00:06:57

    join in and your co-op and you want to enter spectate mode and all sudden everything's fine and dandy you leave the game and all the sudden BAM everyone crashes spectator mode wasn't taking us out of the seat correctly in fact it was just kicking the vehicle away and then moving us in the spectate while everyone thought you're still in the seat so now spectate mode will actually remove you from the seat before moving you in to spectate mode now no more crashes when anyone leaves and all is good hope you guys enjoyed until next time thank you for watching so if you want to keep up with the latest and greatest in star citizen the squadron 42 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