Jump to content
meinstein1987

Learned from Debug

Recommended Posts

Can a dev comment on what was learned this weekend from the debug server?

 

I know at one point when i was playing there were at least 50+ on and was just wondering what was learned.

 

I do know  my FPS was at around 24 in areas of battles.

 

AMD FX8320 clock 4.5

windows 10

GTX970 g1 gaming 

SSD 

Share this post


Link to post
Share on other sites

main things is our server is doing much better. 

 

Managed to keep it up around 15fps  where two weeks ago that would have dropped to 3-4 fps

 

A little more progress and we will be in very good shape

Share this post


Link to post
Share on other sites

main things is our server is doing much better.

Managed to keep it up around 15fps where two weeks ago that would have dropped to 3-4 fps

A little more progress and we will be in very good shape

I hope so

Share this post


Link to post
Share on other sites

I remember 1 of you lads saying that you've find and possibly fixed a memory leak somewhere - that's always good news!

Share this post


Link to post
Share on other sites

I don't mean to hijack, but wtf is memory leak? I've heard it being thrown around a bit while playing CPA, but have no idea what it means.

I'm no computer nerd but...

 

A memory leak is the gradual loss of available computer memory when a program (an application or part of the operating system) repeatedly fails to return memory that it has obtained for temporary use.

 

+more info

 

https://en.wikipedia.org/wiki/Memory_leak

Share this post


Link to post
Share on other sites

Basically, a memory leak occurs when you allocate memory for a specific use (variables, arrays, etc) but fail to free it up when you are done with it. Meaning, but if this happens in something that repeats many times (a loop), you can easily run out of memory which can cause a crash or slow your computer drastically.

This is me talking from a C point of view, but c++ does have low level access like in c.

Share this post


Link to post
Share on other sites

In practical application this is often something like an effdct playing but never dying. (This happened with footstep effects once) the engine would never clean up the effects container and eventually the server would have 10s of thousands of these in memory..

Share this post


Link to post
Share on other sites

I don't mean to hijack, but wtf is memory leak? I've heard it being thrown around a bit while playing CPA, but have no idea what it means.

It is like never cleaning your workdesk virtual or real. It eventually fills up and your workspeed is reduced to near zero or ruined entirely.

Share this post


Link to post
Share on other sites

In practical application this is often something like an effdct playing but never dying. (This happened with footstep effects once) the engine would never clean up the effects container and eventually the server would have 10s of thousands of these in memory..

Just out of curiosity, as I have a lot of experience with C++, but haven't had the chance to play around with UE4 yet, are they classic "I forgot to call delete" memory leaks with raw pointers? I would hope UE4 at least allows the use of smart pointers, if not provide their own abstraction on top of them, but I could see how a memory leak could happen if you say, forgot to tell the engine you were done with something and it stayed in scope.

Share this post


Link to post
Share on other sites

Nah, more often than not, it's storing something in an array and forgetting about it that causes leaks.  They aren't true 'leaks' as we don't lose access to those objects.  They are just stored somewhere and forgot about rather than cleaned up.  

 

Unreal Engine has a garbage collector, and objects that have no strong pointers to them are considered garbage and cleaned up.  Sometimes we leave something in an array or the engine doesn't behave as expected and something we don't expect hangs on to a pointer, preventing it from being cleaned up.  This happened a few weeks ago with the sounds, as sound objects are automatically cleaned up when the sound finishes playing, but the streaming sound object we used for the full auto weapon sounds doesn't ever truly 'end'... so they stuck around.  

Share this post


Link to post
Share on other sites

Cool, thanks for the insight. I'm going to have to start digging into UE4, gotta say all those macros make me uneasy at first glance though!

Share this post


Link to post
Share on other sites

Nah, more often than not, it's storing something in an array and forgetting about it that causes leaks.  They aren't true 'leaks' as we don't lose access to those objects.  They are just stored somewhere and forgot about rather than cleaned up.  

 

Unreal Engine has a garbage collector, and objects that have no strong pointers to them are considered garbage and cleaned up.  Sometimes we leave something in an array or the engine doesn't behave as expected and something we don't expect hangs on to a pointer, preventing it from being cleaned up.  This happened a few weeks ago with the sounds, as sound objects are automatically cleaned up when the sound finishes playing, but the streaming sound object we used for the full auto weapon sounds doesn't ever truly 'end'... so they stuck around.  

Roy, I really appreciate your direct and on point in depth communication of all the coding stuff. Realy helps you to understand what is going on! Keep on being so awesome!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×