Mctalian / RPGLootFeed

A non-intrusive way to see what you just looted.
MIT License
2 stars 2 forks source link

LUA Error - Reputation.lua #85

Closed maximumdata closed 2 weeks ago

maximumdata commented 2 weeks ago

Hey, just installed the addon for the first time. Got this LUA error on first log in after installing.

Message: Interface/AddOns/RPGLootFeed/Features/Reputation.lua:42: script ran too long

==== Addon Info RPGLootFeed v1.5.1-1-5e51694 ====

Please report this issue @ github: McTalian/RPGLootFeed

Time: Sun Sep  1 21:06:15 2024
Count: 1
Stack: Interface/AddOns/RPGLootFeed/Features/Reputation.lua:42: script ran too long

==== Addon Info RPGLootFeed v1.5.1-1-5e51694 ====

Please report this issue @ github: McTalian/RPGLootFeed

[string "@Interface/AddOns/DBM-Core/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua"]:54: in function `Fire'
[string "@Interface/AddOns/GatherMate2/Libs/AceEvent-3.0/AceEvent-3.0.lua"]:120: in function <...ddOns/GatherMate2/Libs/AceEvent-3.0/AceEvent-3.0.lua:119>

Locals: self = <table> {
 recurse = 1
 events = <table> {
 }
}
eventname = "PLAYER_ENTERING_WORLD"
oldrecurse = 0
events = <table> {
 MINIMAP_UPDATE_TRACKING = <table> {
 }
 CHAT_MSG_LOOT = <table> {
 }
 PLAYER_ENTERING_WORLD = <table> {
 }
 UNIT_SPELLCAST_SENT = <table> {
 }
 MINIMAP_UPDATE_ZOOM = <table> {
 }
 MAJOR_FACTION_RENOWN_LEVEL_CHANGED = <table> {
 }
 LOOT_READY = <table> {
 }
 UI_ERROR_MESSAGE = <table> {
 }
 UNIT_SPELLCAST_STOP = <table> {
 }
 CVAR_UPDATE = <table> {
 }
 CHAT_MSG_COMBAT_FACTION_CHANGE = <table> {
 }
 CHAT_MSG_MONEY = <table> {
 }
 PLAYER_XP_UPDATE = <table> {
 }
 CURSOR_CHANGED = <table> {
 }
 COMBAT_LOG_EVENT_UNFILTERED = <table> {
 }
 CURRENCY_DISPLAY_UPDATE = <table> {
 }
 SKILL_LINES_CHANGED = <table> {
 }
 UNIT_SPELLCAST_INTERRUPTED = <table> {
 }
 UNIT_SPELLCAST_FAILED = <table> {
 }
}
registry = <table> {
 recurse = 1
 events = <table> {
 }
}
target = <table> {
 embeds = <table> {
 }
 messages = <table> {
 }
 events = <table> {
 }
 frame = AceEvent30Frame {
 }
}
Mctalian commented 2 weeks ago

Thank you! I'll see what's going on here

Mctalian commented 2 weeks ago

@maximumdata would you be willing to give this package a try?

https://github.com/Mctalian/RPGLootFeed/actions/runs/10659304693/artifacts/1880256407

maximumdata commented 2 weeks ago

I deleted my SavedVariables, removed the previous version, and installed the one from the above package. On login, it hung for several seconds as before, and I then got these two LUA errors:

Message: Interface/AddOns/RPGLootFeed/Features/Reputation.lua:42: script ran too long

==== Addon Info RPGLootFeed v1.5.0-3-g00c37d0-69-00c37d0 ====

Please report this issue @ github: McTalian/RPGLootFeed

Time: Sun Sep  1 21:49:56 2024
Count: 1
Stack: Interface/AddOns/RPGLootFeed/Features/Reputation.lua:42: script ran too long

==== Addon Info RPGLootFeed v1.5.0-3-g00c37d0-69-00c37d0 ====

Please report this issue @ github: McTalian/RPGLootFeed

[string "@Interface/AddOns/RPGLootFeed/Features/Reputation.lua"]:144: in function `func'
[string "@Interface/AddOns/Details/Libs/AceTimer-3.0/AceTimer-3.0.lua"]:57: in function <...ce/AddOns/Details/Libs/AceTimer-3.0/AceTimer-3.0.lua:50>

Locals: 

and

Message: Interface/AddOns/RPGLootFeed/AddonScope.lua:36: script ran too long
Time: Sun Sep  1 21:49:56 2024
Count: 1
Stack: Interface/AddOns/RPGLootFeed/AddonScope.lua:36: script ran too long
[string "@Interface/AddOns/RPGLootFeed/AddonScope.lua"]:36: in function `fn'
[string "@Interface/AddOns/RPGLootFeed/Features/Reputation.lua"]:144: in function `func'
[string "@Interface/AddOns/Details/Libs/AceTimer-3.0/AceTimer-3.0.lua"]:57: in function <...ce/AddOns/Details/Libs/AceTimer-3.0/AceTimer-3.0.lua:50>

Locals: self = <table> {
 defaults = <table> {
 }
 addonVersion = "v1.5.0-3-g00c37d0-69-00c37d0"
 LootDisplay = <table> {
 }
 localeName = "RPGLootFeedLocale"
 L = <table> {
 }
 options = <table> {
 }
 TestMode = <table> {
 }
 addonName = "RPGLootFeed"
 list = <table> {
 }
 db = <table> {
 }
 dbName = "RPGLootFeedDB"
 RLF = <table> {
 }
 DisableBossBanner = <table> {
 }
}
(*temporary) = false
(*temporary) = nil
(*temporary) = "script ran too long"
Mctalian commented 2 weeks ago

Interesting, thank you. I'll have to take a different approach

maximumdata commented 2 weeks ago

if there's anything more I can add that would be useful, happy to do so. i know how frustrating it can be to debug something you're not seeing on your own machine or test environment.

also, (perhaps) unsurprisingly, if I disable "Enable Reputation in Feed" and then re-log, I don't get the loading hang or the error.

Mctalian commented 2 weeks ago

if there's anything more I can add that would be useful, happy to do so. i know how frustrating it can be to debug something you're not seeing on your own machine or test environment.

Thanks! I truly appreciate that. Yeah this has been the first one that I'm having a tough time quickly finding the root cause.

What kind of tech specs are you running? Would you say you have a lot of addons? I'm going to try to find a solution that will work regardless of these answers, but it may help me figure something out.

also, (perhaps) unsurprisingly, if I disable "Enable Reputation in Feed" and then re-log, I don't get the loading hang or the error.

Well that is a good sign that the modules are working as expected! And at least there is some sort of workaround, but I intend to get this fixed tonight 🤞🏼

Mctalian commented 2 weeks ago

Oh! And do you have a LOT of reputations? I've taken quite a few breaks and haven't had a single character where I've played throughout so I have always wondered if there was a scaling issue with someone having a ton of reputations 🤔

maximumdata commented 2 weeks ago

subset of my dxdiag:

      Time of this report: 9/1/2024, 22:01:48
         Operating System: Windows 11 Home 64-bit (10.0, Build 22631) (22621.ni_release.220506-1250)
                 Language: English (Regional Setting: English)
      System Manufacturer: ASUS
                Processor: 12th Gen Intel(R) Core(TM) i5-12400 (12 CPUs), ~2.5GHz
                   Memory: 65536MB RAM
      Available OS Memory: 65278MB RAM
                Page File: 24723MB used, 44650MB available
              Windows Dir: C:\WINDOWS
          DirectX Version: DirectX 12

           Card name: NVIDIA GeForce RTX 3050
        Manufacturer: NVIDIA

with regard to addons, i have 37 installed but that includes 10 separate DBM modules. as far as reputations go, i have standing with nearly every rep in the game. i've been playing the character i'm testing this with since a month before BC launched, so that may be a useful avenue to explore. I'll re-log, create a new character and see if it occurs.

maximumdata commented 2 weeks ago

update: i cleared savedvariables, switched back to the release available through curseforge, and created a new character. there was NO loading hang, and NO LUA errors on that character.

Mctalian commented 2 weeks ago

Tech specs look more than fine.

with regard to addons, i have 37 installed but that includes 10 separate DBM modules. as far as reputations go, i have standing with nearly every rep in the game. i've been playing the character i'm testing this with since a month before BC launched, so that may be a useful avenue to explore. I'll re-log, create a new character and see if it occurs.

Yup, ok, that makes a lot of sense. I have an idea for how to break this up, but yeah if I'm trying to build a snapshot of every rep standing you have, because as far as I've seen there's no event for me to hook into for "You just gained X rep with Y faction" to get the faction and the amount. I have to calculate it. I had to do the same thing with experience, but that's just a single bar vs. reputation which is a TON to track.

I'll try something and send another package. Thanks for the quick replies, this is very helpful!

maximumdata commented 2 weeks ago

happy to help, and i'm the one that should be thanking you for the quick replies! i love the idea of this addon, and it seems like such a no-brainer to create even though i've never seen one like it in the ~15 years i've been playing.

Mctalian commented 2 weeks ago

Ok I have an idea, but I think it'll be a pretty big overhaul. It may take a little longer than I hoped but it should work 🤞🏼

Mctalian commented 2 weeks ago

Ok this one definitely shouldn't impact startup time and you should be able to play with the Reputation module enabled. It drastically simplifies reputation calculation, but we lose a few minor cosmetic features. So I will try to think of how to add those back, eventually, but this should be way more stable in the long run.

https://github.com/Mctalian/RPGLootFeed/actions/runs/10661603829/artifacts/1880760418

maximumdata commented 2 weeks ago

@Mctalian I've tested this build out on multiple characters for a couple hours total, and can say for sure I haven't encountered the loading hang or lua errors, and i'm seeing rep gains roll in through the interface as expected. definitely seems like it solves the issue i raised to me!

Mctalian commented 2 weeks ago

@maximumdata that's great news!

I'm curious about this build: https://github.com/Mctalian/RPGLootFeed/actions/runs/10672385120/artifacts/1883402413

I tried to add the faction colors back to the rep messages, but this may get back to "not working with characters with a large number of reputations"

If you'd be willing to give this one a shot on your character with a lot of reputation factions, I'd really appreciate it 🙏🏼

maximumdata commented 2 weeks ago

i just tested this build out, and since i'm juggling a couple things right now it's not as extensive as the last build, but i was not seeing any rep gain in the RLF frame, although i was seeing them in the chat frame. this is only based on 7 world quests across two characters, but i saw the same behavior on both (these are both pre-BC era toons)

Mctalian commented 2 weeks ago

Thanks for checking it out! Seeing no rep in the feed at all but no Lua errors? Hmmm 🤔

Well I might just revert back to the old build for now and put a pin in getting the colors back.

Thanks for testing! I'll get this released at some point today 😊

Mctalian commented 2 weeks ago

@maximumdata last try before I truly give up and go back to the one build that worked for you 🤞🏼

https://github.com/Mctalian/RPGLootFeed/actions/runs/10673286642/artifacts/1883598528

If you don't have time, no worries!

Mctalian commented 2 weeks ago

@maximumdata last try before I truly give up and go back to the one build that worked for you 🤞🏼

https://github.com/Mctalian/RPGLootFeed/actions/runs/10673286642/artifacts/1883598528

If you don't have time, no worries!

Actually, I am able to test on another machine which turned up an error so I think I can work through this 😸