Patch 5.4 Addon Changes – Saved Variables

(Sticky)

Community Manager
We’ve been working hard to combat memory usage errors that users of low-end systems have encountered. There have been select moments where “Out of Memory” complications could cause the game to crash, and new safeguards are being added in Patch 5.4. The first step for us will be adding in a new dialog box should you run out of memory while loading saved variables for an addon.

What this means for users is instead of crashing, you will receive a pop-up message that an addon did not load properly: “Your computer does not have enough memory to load settings from the following AddOn. Please disable some AddOns.”

What this means for authors is in 5.4, your addon could be in a state where the saved variables do not load. If that ends up being the case, the addon will also be prevented from saving data upon logging out of the game. We feel it’s better for everyone to prevent valid data from accidentally being wiped by defaults.

This change will cause an event to fire when a player runs out of memory: “SAVED_VARIABLES_TOO_LARGE” (With the name of the addon as the first argument.) Please test your addons with low memory machines on the PTR and let us know if there are any issues.
Reply Quote
90 Orc Death Knight
9240
This is awesome. Wasnt until 5.3 that i would ever crash and only every now and then when hearthing to two moons with this exact error. Will be a welcomed fix
Reply Quote
90 Goblin Priest
14395
What about dealing with the memory leaks on multi monitor systems when running in Windowed-Fullscreen.
The game brings itself to an absolute crawl fps wise and all but locking up any UI addon after about a dozen or so times tabbing in and out of the game to a web browser or such. Requiring a client re-launch to correct the sub 10fps. Additionally letting the 64-bit version of the game access more than 2.3gb of memory would be awesome.
Edited by Nestar on 6/24/2013 1:40 PM PDT
Reply Quote
90 Human Paladin
17660
This is awesome. Wasnt until 5.3 that i would ever crash and only every now and then when hearthing to two moons with this exact error. Will be a welcomed fix


I had this problem and you know what I found was the main culprit? Recount. It stores so much data it was taking me forever to log out of the game! After disabling all addons and turning them back on one at a time, I found that Recount was the culprit. I switched to Skada, and while at first I missed Recount (the look at feel of it), I am now extremely happy. I only load the parts of the addon that I use and it is a lot easier on my system!

This is a fantastic change, I can't wait to see how it affects my game, if at all!
Reply Quote
90 Gnome Warrior
12235
I'm having trouble triggering SAVED_VARIABLES_TOO_LARGE to test with and I don't have all the parts handy to make a minimum-machine to test.

Can Crithto or anyone else testing on the PTR answer what happens to any existing value of that variable when the event fires?

Did it start overwriting the old savedvariable?
Is the value intact from what it was before the variable would have loaded?

This is mostly in regards to defining default values before the variables are loaded. If they're overwritten or nil'ed then it's easy enough to work around but it could cause addons to break that expect defaults when no savedvariable loaded.
Edited by Ro on 6/24/2013 2:50 PM PDT
Reply Quote
90 Blood Elf Rogue
10705
Tested this on a VM with 768 mb of ram. Ran around org until the memory was maxed out and did a /reload. The event fired successfully, good work guys.
Reply Quote
MVP - Technical Support
90 Blood Elf Hunter
17040
This is an incredibly welcome change. Memory limitations have been pretty much a non-issue for 64-bit players since patch 4.1's inclusion of the large address aware flag, but 32-bit players have continued to be restricted to 2 GB of address space. Unfortunately, short of upgrading their systems, 32-bit players' only option to improve stability is to simply reduce memory usage. Most players still crashing tend to have a good chunk of memory-hungry addons, so this is a fantastic place to start.

What about dealing with the memory leaks on multi monitor systems when running in Windowed-Fullscreen.


What "memory leaks" would these be? I had some issues with memory management in late Wrath/early Cata, but they have since been long resolved. I'm running a good number of monitors too. I have a 2560x1440 primary and two secondary 1920x1080 displays.

Additionally letting the 64-bit version of the game access more than 2.3gb of memory would be awesome.


You should be able to address a significantly higher amount of memory running the 64-bit client. On a 64-bit operating system, the 32-bit client has access to ~4 GB of address space since it is large address aware. The 64-bit client should have - for all intents and purposes - an unfathomably high limitation in the range of 8 TB.

http://msdn.microsoft.com/en-us/library/aa366778(VS.85).aspx
________________________________________________
The wise speak only of what they know. - J.R.R. Tolkien
CORE I7 4770K | 16 GB DDR3-1600 | RADEON HD 7970
Unofficial Tech Support: irc://chat.freenode.net/wowtech
Reply Quote
90 Night Elf Druid
9665
I had this problem and you know what I found was the main culprit? Recount. It stores so much data it was taking me forever to log out of the game! After disabling all addons and turning them back on one at a time, I found that Recount was the culprit. I switched to Skada, and while at first I missed Recount (the look at feel of it), I am now extremely happy. I only load the parts of the addon that I use and it is a lot easier on my system!

This is a fantastic change, I can't wait to see how it affects my game, if at all!


Skada>recount and don't take up as much memory to run
Edited by Lokiside on 6/24/2013 3:43 PM PDT
Reply Quote
90 Dwarf Warlock
8685
Yeah I like Skada much better than Recount. Been using it for a long time now.
Reply Quote
90 Pandaren Warrior
5165
i dont have this problem because i dont use addons, i already have a pretty outdated system, so i dedicate all my cpu's resources to WoW only, well, and vent lol but that is it.
Reply Quote
90 Human Mage
10710
I like the direction, but after displaying the out of memory dialog why not just unload the addon entirely? Seems cleaner to just not have it at all vs. having it in some possibly undesirable state.
Reply Quote
90 Gnome Warrior
12235
Addons can't be unloaded. As Slouken (the UI blue years ago) said, it's like a bowl of soup you can't pick out the ingredients (nevermind I'm always picking celery out of my soup). Everything is already mixed together.

When it gets around to loading saved variables, all non-LoD addons are already loaded.
Reply Quote
90 Human Warlock
7885
You should be able to address a significantly higher amount of memory running the 64-bit client. On a 64-bit operating system, the 32-bit client has access to ~4 GB of address space since it is large address aware. The 64-bit client should have - for all intents and purposes - an unfathomably high limitation in the range of 8 TB.


Remember you HAVE to take into account that video memory is ALSO included in this address space.

If you have a 2G vid card, 32bit windows willl only actually be able to address 2G RAM.
Reply Quote
90 Night Elf Warrior
11515
I like the direction, but after displaying the out of memory dialog why not just unload the addon entirely? Seems cleaner to just not have it at all vs. having it in some possibly undesirable state.
This actually makes more sense than their current implimentation.

A addon which when out of memory partial functions

vs

A addon that is completely unloaded when out of memory

Truthfully baffles me why they make such decisions. Given that a partially working addon isnt always or exactly functioning. So in such states theres no reason fo it to stay loaded and take up memory even in its partial state.

Its as bad as having a car thats not working. And that you need it for work. So you end up pushing the car to work, even though its not running. Theres very little point to do so.

And as far as not being able to unload code. That is not exactly true even if someone is noting a blue from a while back. You most certainly can, it just takes the development team time to impliment nothing more. If I told people that hire me for code work, its impossible. I wouldn't have it as my job.
Edited by Darkreign on 6/25/2013 5:45 PM PDT
Reply Quote
MVP - Technical Support
90 Blood Elf Hunter
17040
Remember you HAVE to take into account that video memory is ALSO included in this address space.

If you have a 2G vid card, 32bit windows willl only actually be able to address 2G RAM.


I wasn't addressing operating system limitations, but per-application ones. Unless you increase the user memory space in 32-bit Windows (which isn't recommended), you're going to be stuck with 2 GB address space for any application you run.

Video memory also isn't required to be mapped to system RAM with DirectX 10+, and for DirectX 9 Microsoft has retooled their driver model so that video memory doesn't use as much application address space. There's a solid write-up detailing this here:

http://support.microsoft.com/kb/940105

Basically, DirectX 9 is a heavily dated API. It's nowhere near as efficient as DirectX 10+ and its memory management does leave a lot to be desired. On my system, WoW's address space sits around ~900 MB in Orgrimmar when running in DirectX 11 mode. If I switch to DirectX 9 mode, it skyrockets to 1.4 GB and I take a sizable hit to performance.

As the ending of the article on Microsoft's site states, "applications will reach the limit for other reasons". In WoW, addons are one of those reasons - and in some cases, they are a highly significant one.

Blizzard is at an interesting point right now. The developers are evolving the game engine to run quite efficiently on the newer, more cutting-edge hardware, all while maintaining backwards-compatibility for systems with hardware that can be close to a decade old. Blizzard can't maintain this backwards-compatibility indefinitely either. It will be interesting to see what's supported and what's not in a year or two down the road. In one year, XP's official support will have finally been dropped and all major supported Windows operating systems will natively support DirectX 10+.

As it stands, World of Warcraft only truly supports a handful of DirectX 9-class hardware from NVidia and AMD. Some of Intel's DirectX 10+ video hardware isn't even supported at this point. It's entirely possible that Blizzard may only support cards with shader model 4.0 or better in the well foreseeable future, and then not long after that 32-bit support may simply be dropped as a whole. Even next-generation consoles greatly exceed what a 32-bit Windows install that isn't making use of PAE can address.

But alas, I digress. Now I'm rambling, and greatly off topic. With addons no longer being able to consume copious amounts of memory on systems with limited resources, Blizzard will be able to more finely tune stability for players still on 32-bit operating systems. They can worry more directly about what the base install of the game will do without throwing third-party variables into the mix.
________________________________________________
The wise speak only of what they know. - J.R.R. Tolkien
CORE I7 4770K | 16 GB DDR3-1600 | RADEON HD 7970
Unofficial Tech Support: irc://chat.freenode.net/wowtech
Edited by Kodiack on 6/25/2013 8:13 PM PDT
Reply Quote
90 Goblin Priest
6535
I welcome the change, especially seeing as I'm now toying with savedvariables myself :) though I doubt any of my addons will ever trigger this event as I'm really picky about the minimalism.
Reply Quote
90 Gnome Warrior
12235
And as far as not being able to unload code. That is not exactly true

Well yeah they have the means to make addons unload-able. Disable and reload is always an option. They could even do it during the loading screen. People who trigger this event would just have a very long load time.

But to have addons unloadable without starting the addon loading process all over would require drastic changes. They could do it. But I doubt they'd want to load up metamethods that burden every addon user just to make this one event cleaner for low-spec systems.

By the time it gets to even attempting to load savedvariables, non-LoD addons are all fully loaded and just waiting for a PLAYER_LOGIN to finish their initialization.
Reply Quote
10 Troll Druid
30
We’ve been working hard to combat memory usage errors that users of low-end systems have encountered. There have been select moments where “Out of Memory” complications could cause the game to crash, and new safeguards are being added in Patch 5.4. The first step for us will be adding in a new dialog box should you run out of memory while loading saved variables for an addon.

What this means for users is instead of crashing, you will receive a pop-up message that an addon did not load properly: “Your computer does not have enough memory to load settings from the following AddOn. Please disable some AddOns.”

What this means for authors is in 5.4, your addon could be in a state where the saved variables do not load. If that ends up being the case, the addon will also be prevented from saving data upon logging out of the game. We feel it’s better for everyone to prevent valid data from accidentally being wiped by defaults.

This change will cause an event to fire when a player runs out of memory: “SAVED_VARIABLES_TOO_LARGE” (With the name of the addon as the first argument.) Please test your addons with low memory machines on the PTR and let us know if there are any issues.


Oh ... my god. <3 Finally something is being done about this.
Reply Quote
90 Human Warlock
13965
Remember you HAVE to take into account that video memory is ALSO included in this address space.

If you have a 2G vid card, 32bit windows willl only actually be able to address 2G RAM.


Interesting. It would appear that Windows Task Manager doesn't include the Video Card overlay when it displays the Physical Memory usage info.

I copied the game to a 32bit system and then opened the Task Manager panel while in Org, letting it run for a while:

Total Physical Memory: 3406892
Available.....................: 1624847
System Cache............: 1347288

-- a snapshot, bounces around but seems to stay within a range close to these values.

So, either the 1Gbyte video card for this system is buried inside the System Cache number, or Windowz isn't including it.

{Also although of course there is a page file, the actually accesses are low.}
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]