Thread Tools Display Modes
06-10-15, 10:46 AM   #1
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Quick question on AddOn memory warning

Hi,

I was trying to figure out why I am getting this error:


So I tried making my code more efficient with no luck so then I deleted ALL code so "MUI_Core" contained nothing at all and restarted the WoW Client with only that AddOn enabled and all others were removed from the AddOns folder and to my shock I STILL got the error dialog box pop up! This should be impossible and the computer I am using as 8GB of RAM and is pretty damn good so no clue why this is happening.

I'm worried because users may think the AddOn I am working on is very bad on performance or something.
Does anyone know why this is happening or can I ignore it?

I just wanted some info to put a stop to my confusion,
Thanks for reading

EDIT: Also it says the MUI_Core AddOn is using 0KB which is as expected but still shows the dialog box.

Last edited by Mayron : 06-10-15 at 10:49 AM.
  Reply With Quote
06-10-15, 11:07 AM   #2
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Ah I think it maybe to do with the 2 files in the SavedVariables folder (the .lua and .lua.bak ones) because when I deleted them and the system remade them, it fixed the issue and I cannot seem to replicate them. I noticed that .lua.bak with inconsistent with the .lua one which some old data in it which I deleted from the .lua one a while ago but I could be wrong about this. If I'm not then that could be the reason.

This may help someone else would is having this issue because it seems to be a popular one.
  Reply With Quote
06-10-15, 12:04 PM   #3
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
It sounds like you're progressively writing to the SV table until it gets to the point where the game refuses to load it, essentially a memory leak.
  Reply With Quote
06-10-15, 12:42 PM   #4
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Just keep in mind that (unless something changed since they introduced this) the dialog just blames the addon that didn't fit not the one that consumes the most memory.

If x,y,z addons that load before MUI_Core had large SVs you could get the issue and it having nothing to do with the addon in message.
  Reply With Quote
06-10-15, 01:06 PM   #5
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
I also run into this issue, and i'm quite sure it's a buggy false alarm, since i got it for a skeleton saved variables only. If you delete the saved vars it won't show up again. But i have no clue what's triggering it. Maybe it's a metatable isse?
  Reply With Quote
06-10-15, 02:12 PM   #6
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Originally Posted by Resike View Post
I also run into this issue, and i'm quite sure it's a buggy false alarm, since i got it for a skeleton saved variables only. If you delete the saved vars it won't show up again. But i have no clue what's triggering it. Maybe it's a metatable isse?
I definitely had metatable's in the code before I deleted the entire body of the file. Somehow something got corrupted in the AddOn's SavedVariable files. A metatable issue could have caused it and then when I shut down the WoW Client, deleted all the code in the AddOn but still had the addOn enabled, and logged back in I still got the message. So to me that means it was trying to access the savedvariable and an issue occurred but still that doesn't make sense to me. It's the only thing that I can think of though.

Never knew metatables were a potential cause to this. Very strange.
But maybe the meteatable was trying to access the savedvariable too much.

like what semlar said:

Originally Posted by semlar View Post
It sounds like you're progressively writing to the SV table until it gets to the point where the game refuses to load it, essentially a memory leak.
No clue how you could bypass this problem since the SV Table needs to be accessed on login for most AddOns to work..

Originally Posted by Dridzt View Post
Just keep in mind that (unless something changed since they introduced this) the dialog just blames the addon that didn't fit not the one that consumes the most memory.

If x,y,z addons that load before MUI_Core had large SVs you could get the issue and it having nothing to do with the addon in message.
That would make sense but the MUI_Core AddOn was the only AddOn (besides the Blizzard ones) that I had enabled at the time.

Last edited by Mayron : 06-10-15 at 02:14 PM.
  Reply With Quote
06-10-15, 03:00 PM   #7
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
What I mean is, something in your addon could be inserting elements into a table and not clearing out old data, so it just keeps growing until the game won't load the file any more.

I managed to create a 2gb SV file once simply because I had an infinite loop as a result of a typo.

Interestingly, the game actually did load that, it just took forever to launch.
  Reply With Quote
06-10-15, 04:21 PM   #8
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Mayron View Post
I definitely had metatable's in the code before I deleted the entire body of the file. Somehow something got corrupted in the AddOn's SavedVariable files. A metatable issue could have caused it and then when I shut down the WoW Client, deleted all the code in the AddOn but still had the addOn enabled, and logged back in I still got the message. So to me that means it was trying to access the savedvariable and an issue occurred but still that doesn't make sense to me. It's the only thing that I can think of though.

Never knew metatables were a potential cause to this. Very strange.
But maybe the meteatable was trying to access the savedvariable too much.

like what semlar said:



No clue how you could bypass this problem since the SV Table needs to be accessed on login for most AddOns to work..



That would make sense but the MUI_Core AddOn was the only AddOn (besides the Blizzard ones) that I had enabled at the time.
The weird thing is that i have multiple addons with metatable saved var usage which never introduced the problem in the past 3-4 years, then i copy pasted the same code into my new addon then i got the error.

And this is just a wild guess but not only the file's size could trigger this error, but actually how frequently you update the variables. There are a lot of Wow "events" which pointlessly gets triggered multiple times even in one frame update which might cause this with an active metatable.

Last edited by Resike : 06-10-15 at 04:25 PM.
  Reply With Quote
06-10-15, 05:07 PM   #9
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Originally Posted by semlar View Post
What I mean is, something in your addon could be inserting elements into a table and not clearing out old data, so it just keeps growing until the game won't load the file any more.

I managed to create a 2gb SV file once simply because I had an infinite loop as a result of a typo.

Interestingly, the game actually did load that, it just took forever to launch.
Oh that makes sense, I see. In that case I don't think that was my problem but the problem seems to have fixed itself but I can't remember what I changed. I don't think I did anything special except delete the files in the SV but that doesn't make any sense so I guess I could have fixed the leak if there was one.
  Reply With Quote
06-10-15, 05:15 PM   #10
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Originally Posted by Resike View Post
The weird thing is that i have multiple addons with metatable saved var usage which never introduced the problem in the past 3-4 years, then i copy pasted the same code into my new addon then i got the error.

And this is just a wild guess but not only the file's size could trigger this error, but actually how frequently you update the variables. There are a lot of Wow "events" which pointlessly gets triggered multiple times even in one frame update which might cause this with an active metatable.
That sounds very similar to how I triggered this. It seems to be due to an inconsistency between the saved variable stored, and how the addon loads the saved variable just as a wild guess and perhaps the multiple events being executed could be involved but I give up. All that matters is that I don't think the code in the addon was actually the problem so I will have to ignore it and hope it doesn't show up again. If it didn't show up for you after 3-4 years I think I can live with that
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Quick question on AddOn memory warning

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off