Snowman lag

Discussion in 'Suggestions / Bugs' started by CrystalCastles, Dec 21, 2016.

  1. CrystalCastles

    CrystalCastles Active Member

    Joined:
    May 13, 2016
    Messages:
    125
    Likes Received:
    60
    So yesterday I was playing on surf_ace when suddenly, mid-game after I had already beaten it multiple times with no problem, the game started lagging on stage 3. Someone noticed a floating "orb" as they called it but I didn't even look into it at the time. This was happening to everyone, Rhythums was there and can vouch for me. However, I'm playing on boring right now and I decided to turn into a snowman at spawn and I believe I've figured something out. After turning into the snowman it started lagging. I walked away from the spawn and it stopped. So then I turned around and faced the spawn area again and it once more began lagging horribly. That's when I noticed it: the moon from my unusual that typically hangs above my head was frozen there in mid-air along with another player's unusual effect. And every single time it was on frame it would lag, though when it was out of frame the lag would instantly stop. I have no clue how any of this works, of course, but it does seem that this is part of the issue. Here's a link to a demo file I recorded showcasing the issue: https://drive.google.com/open?id=0B2DyMh0CVkOjYy1kQmh1TS1WZE0

    Update: Even after changing back to normal, the moon was still hanging there and I had to rejoin to make it go away. Which is probably the reason it fixed the lag for me and rhythums yesterday after we left and rejoined.
     
    Last edited: Dec 22, 2016
  2. CrystalCastles

    CrystalCastles Active Member

    Joined:
    May 13, 2016
    Messages:
    125
    Likes Received:
    60
    I just watched the demo and noticed that you can't see the floating moon but luckily I got a screenshot before I recorded the demo:
    [​IMG]
     
    Teddi, Rhythums and NeverReady like this.
  3. Rhythums

    Rhythums [BB] Admin Admin

    Joined:
    Feb 14, 2016
    Messages:
    86
    Likes Received:
    56
    you must have super powers or something
     
    CrystalCastles likes this.
  4. CrystalCastles

    CrystalCastles Active Member

    Joined:
    May 13, 2016
    Messages:
    125
    Likes Received:
    60
    Yeah bro, I'm God.
     
  5. Teddi

    Teddi Well-Known Member Bear

    Joined:
    Jul 21, 2007
    Messages:
    9,633
    Likes Received:
    1,114
    Thanks for this bug report, we've been trying to track down what's been causing framerate issues recently :)
     
  6. Kaiden

    Kaiden Administrator Community Manager

    Joined:
    Feb 13, 2008
    Messages:
    4,845
    Likes Received:
    774
    Oh right thought it was my laptop hurr.
     
  7. Killermon

    Killermon Hammer time!

    Joined:
    Jun 6, 2008
    Messages:
    950
    Likes Received:
    267
    We've had numerous reports of this zero point origin moon for a while, but I've never been able to work out why it happens...until now! The Snowman bit of this is what twigged it for me (So good work!) and after a bit of digging through the code, I finally managed to work out what was going on and why it slipped through my testing.

    I’ll try and keep this simple!

    So, this is kind of a mix of two bugs, the first being what my code did, and then secondly, how wonky particles are in source.

    First thing is how the my underlying render code got confused when there was a lack of an attachment point to bind a particle too - what it would do is constantly create a new effect, realise it has nothing to bind it to, and then remove it; this would happen every single frame. Secondly, what seemed to happen is that source wouldn't properly remove a particle effect when it was left in this limbo state; this would lead to a pretty rapid drop in the framerate, which would get worse and worse over time as they just kept getting piled on top of each other

    This bug has, as I said, been happening for a while, but it was very very rare that a player would be both valid, and also have no attachment point - the snowman model breaks this convention as it has no attachment points, which is what exacerbated the issue.

    It's worth noting that this issue wouldn't impact particles that have a lifetime - this is because the particles just eventually expire at their own accord, regardless of their state; the moon particle however does not have a lifetime, which is why it was really the only one impacted. This is why it slipped through my testing, I didn't use this particular particle effect; it can also depend on the map, if the zero point origin is out in the void or never seen by the player, they would never notice this.

    TL; DR Fix incoming.
     
    Kaiden and CrystalCastles like this.
  8. Killermon

    Killermon Hammer time!

    Joined:
    Jun 6, 2008
    Messages:
    950
    Likes Received:
    267
    Oh, and to add, a mighty fine bug report! Seriously, I wish they were all like this (Teddi!)
     
    Kaiden likes this.
  9. Kaiden

    Kaiden Administrator Community Manager

    Joined:
    Feb 13, 2008
    Messages:
    4,845
    Likes Received:
    774
    Make sure to get a computer hat off Teddi if you don't have one already! Guess should be an appropriate award if they already have the hat.
     
  10. Killermon

    Killermon Hammer time!

    Joined:
    Jun 6, 2008
    Messages:
    950
    Likes Received:
    267
    We've agreed a reward of 5 Million cubes and a Monitored Hat - for a verbose bug report and for the impact of this bug, and how long it has been outstanding. You should get it soon™
     
    Kaiden likes this.
  11. harrisns

    harrisns New Member

    Joined:
    Jul 8, 2016
    Messages:
    19
    Likes Received:
    5
    I've seen this a few times before on several different maps, they're all on spawnpoint. Idk this might help ig
     
  12. Teddi

    Teddi Well-Known Member Bear

    Joined:
    Jul 21, 2007
    Messages:
    9,633
    Likes Received:
    1,114
    Crystal has received his items.
     
    Kaiden likes this.