View Single Post
01-08-09, 05:09 PM   #2294
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
Exclamation The "memory leak" and FPS drag/screen tearing issue...

Okay...

There are quite a few people reporting issues with sudden FPS drops, screen tearing on a regular interval and "memory leaks" -- it's important to note that there are thousands of people reporting this problem on the Bliz boards who are NOT using nUI -- I've spent a good deal of time testing this evening and I've pinned the problem down to the source.

The issue is, quite simply put, the garbage collector in WoW is broken. This seems to have happened within the last patch or two. I'm not sure exactly when.

In any event, I can force the problem to reproduce itself by putting the garbage collector on a regular interval. For testing purposes, I set up an update timer to run the garbage collector twice a second.

The theory here is that by running the collector on short intervals, there should never be much if any garbage to collect which, in turn, would result in an inperceptable delay when the garbage collector fires (since there's so very little "work" to be done when it does).

So much for theory.

What is happening instead is that the garbage collector tears the screen when it fires causing a very noticeable hiccup in the graphics engine on the exact same interval as the garbage collector is running. Furthermore, if you purposely load the system with a lot of garbage, the garbage collector freezes the entire WoW screen when it fires and until it completes the collection process.

The conclusion is, first, if you have any mods installed that run a garbage collector on a regular schedule, you're going to see screen tearing on an interval that matches their collection frequency... if you have more than one mod that runs garbage collection in an update loop, you're going to see screen tearing on a modulated frequency based on their individual timers.

If you do not have any mods that are collecting garbage on an interval and you get into a situation where garbage collection is not occurring due to game load or whatever other reason, you're going to take a HUGE hit in frame rate and may well experience complete game freeze when the garbage collection finally does take place.

The severity of the frame tearing and duration of FPS hits/screen freezes is going to be directly related to the power of your computer, CPU load and how much garbage needs to be collected.

That said, I have *no* clue as to a solution to the problem at this time. I'm playing with it, but I have very low expectations of being able to resolve it. This bug is at the core of WoW's game engine and if you have the bug, I'm afraid you have the bug, period.

If anyone has any ideas or comes across any information, please feel free to pass it along!
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/

Last edited by spiel2001 : 01-08-09 at 05:17 PM.