New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Luna breaks EnumerateFrames #145
Comments
Nope but one of the used libraries might do that. |
Pretty sure thats an error on your end. I can call EnumerateFrames perfectly fine. If one of the frames you get from it doesn't contain the object you are looking for you have to account for that. |
No, the function is used like this |
After some experimenting i can say that at some point EnumerateFrames encounters a table (not a frame) that has no data. Passing this table back into it causes the error. I do however not know what would cause this since i don't do fancy table stuff in my code that would cause this. |
The issue is caused by some of the embedded libs (DruidManaLib-1.0, HealComm-1.0, FivSecLib-1.0, CastLib-1.0). Their library tables are frames, which are then passed to AceLibrary which proceeds to copy them to new tables and "destroy" the original tables (a frame), as can be seen here. These destroyed tables then become invalid frames, causing EnumerateFrames to fail. |
Thank you very much! I really struggled to figure this out. |
I suggest you can try to use my Ace3 vanilla version if you wanna rewrite some lib. It's still under development and I'm doing the tests to make sure it works correctly, see my Ace3test repo. Most features except GUI will be soon available. The AceLibrary in Ace2 can cause some problem when it copy the data from old table to new table. I think today the PCs are more powerful so there's no need to care too much about garbage collect. I compare the codes of Ace2 and Ace3 and think Ace3 is much clear so I turned into Ace3 and only use Ace2 as some kind of reference. PS: I will do the translation during the weekend and push ASAP |
I don't see the point of ACE3 in vanilla. All the existing addons are ACE2 and the main benefit is that all the addons share their library code. So making Luna ACE3 would increase the memory of everyone using it and other addons drastically. To make it sensible you would have to port lots and lots of old addons to your ACE3. Also while i haven't looked at your code the thing that makes everything better are the elipsis (...) the select() and wipe() functions. Which can be emulated but never will reach the performance benefit of them beiing written in C and be provided to the LUA environment. |
Well it's only a suggestion, I'm not asking to make a Luna3 :P. For me it's some kind of experiment. In fact i don't think Ace3 will use much more memory than Ace2 ("drastically" as you said), using the variable arguments will surely increase a bit usage but as I said I don't think this is a big issue for PC nowadays. What I like is the the code of Ace3 seems to be more clear and reusable. I also considered the compatibility between 2 and 3, maybe it will be possible. |
http://wowwiki.wikia.com/wiki/API_EnumerateFrames
With Luna enabled iterating through the frames with this function throws a "couldn't find 'this' in current object" error. Not sure how this could happen. Maybe it's deleting the userdata from a frame table?
The text was updated successfully, but these errors were encountered: