Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-16-05, 06:39 AM   #1
Goatus
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 18
Memory cannot be "read" bug

Well i run out of ideas on that one... it happens to me rarely and randomly. I tried to reproduce it and nail it by turning off and on diffrent Addons but no luck

Worst thing is that i don't know if it is my addons fault or other authors addons and since bug sometimes appear and sometimes not i dont have any way to check this,

So im asking wow ui scripting gurus, maybe you know when this bug occur? I'm almost sure that it has something to do with two addons trying to read same memory adres in same time but no idea how that is possible.

Well maybe it is coz i use in all my addons saved variables per player char ie. table with fields named same as char. Can this be the reason? Code looks like that (example)

function SomethingOnEvent()

if ( event == "UNIT_NAME_UPDATE" ) then
if ( arg1 == "player" and UnitName("player") ~= "Unknown Entity" ) then
this:UnregisterEvent("UNIT_NAME_UPDATE");
initFunction();
end
end

end

function inintFunction

local name = UnitName("player");

if (saved_var ~= nil) then
if (saved_var[name] == nil) then
saved_var[name] = {};
saved_var[name].someOption = 1;
end
else
saved_var = {};
saved_var[name] = {};
saved_var[name].someOption = 1;
end
end

for me it looks perfectly ok... but maybe im doing some false logic thinking ;p

Well there is also other possibility... it _may_ be WoW bug but it is very unlikly...

Thanks

Edit: eek! it ate my tabs.... ah well nvm..
BTW sorry for my english
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » Memory cannot be "read" bug


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