Profession Shopping List

Profession Shopping List

421k Downloads

SharedXML/Scroll/ScrollBoxListView.lua error

DaGrump2394 opened this issue ยท 12 comments

commented

I only get the error message below when PSL is turned on, by itself or with other addons. I do not get it if PSL is not turned on. The error happens when I transmute something with a cooldown. Transmuting Primals (BC) and Essence of Water cause it to pop up, but arcanite bars do not. It also appeared when I solved an archaeology relic.

Message: Interface/SharedXML/Scroll/ScrollBoxListView.lua:628: attempt to perform arithmetic on a nil value
Time: Fri Nov 17 13:22:38 2023
Count: 2
Stack: Interface/SharedXML/Scroll/ScrollBoxListView.lua:628: attempt to perform arithmetic on a nil value
[string "@Interface/SharedXML/Scroll/ScrollBoxListView.lua"]:628: in function <Interface/SharedXML/Scroll/ScrollBoxListView.lua:587>
[string "=(tail call)"]: ?
[string "@Interface/SharedXML/Scroll/ScrollBoxListView.lua"]:831: in function ValidateDataRange' [string "@Interface/SharedXML/Scroll/ScrollBox.lua"]:708: in function Update'
[string "@Interface/SharedXML/Scroll/ScrollBox.lua"]:258: in function SetScrollPercentageInternal' [string "@Interface/SharedXML/Scroll/ScrollBox.lua"]:250: in function SetScrollPercentage'
[string "@Interface/SharedXML/Scroll/ScrollBox.lua"]:242: in function ScrollToEnd' [string "@Interface/AddOns/Blizzard_Professions/Blizzard_ProfessionsCraftingOutputLog.lua"]:369: in function FinalizePendingResultData'
[string "@Interface/AddOns/Blizzard_Professions/Blizzard_ProfessionsCraftingOutputLog.lua"]:317: in function <...rofessions/Blizzard_ProfessionsCraftingOutputLog.lua:313>

Locals: self =

{
EnumerateFrames = defined @Interface/SharedXML/Scroll/ScrollBoxListView.lua:157
GetFrameExtent = defined @Interface/SharedXML/Scroll/ScrollController.lua:39
SetAcquireLocked = defined @Interface/SharedXML/Scroll/ScrollBoxListView.lua:335
TranslateElementDataToUnderlyingData = defined @Interface/SharedXML/Scroll/ScrollBoxListView.lua:241
ForEachFrame = defined @Interface/SharedXML/Scroll/ScrollBoxListView.lua:141
SetFrameExtent = defined @Interface/SharedXML/Scroll/ScrollController.lua:44
FindElementDataIndex = defined @Interface/SharedXML/Scroll/ScrollBoxListView.lua:195
SetHorizontal = defined @Interface/SharedXML/Scroll/ScrollController.lua:31
ForEachElementData = defined @Interface/SharedXML/Scroll/ScrollBoxListView.lua:183
scrollBox = Frame {
}
GetElementExtentCalculator = defined @Interface/SharedXML/Scroll/ScrollBoxListView.lua:796
PrepareScrollToElementDataByPredicate = defined @Interface/SharedXML/Scroll/ScrollBoxListView.lua:249
CreateTemplateExtentFromElementData = defined @Interface/SharedXML/Scroll/ScrollBoxListView.lua:543
UnregisterEvents = defined @Interface/SharedXML/CallbackRegistry.lua:200
GetExtent = defined @Interface/SharedXML/Scroll/ScrollBoxLinearView.lua:151
SetElementExtentCalculator = defined @Interface/SharedXML/Scroll/ScrollBoxListView.lua:789
GetPanExtent = defined @Interface/SharedXML/Scroll/ScrollBoxLinearView.lua:163
IsScrollToDataIndexSafe = defined @Interface/SharedXML/Scroll/ScrollBoxListView.lua:245
IsVirtualized = defined @Interface/SharedXML/Scroll/ScrollBoxListView.lua:571
Layout = defined @Interface/SharedXML/Scroll/ScrollBoxLinearView.lua:124
GetElementIndent = defined @Interface/SharedXML/Scroll/ScrollBoxLinearView.lua:110
SetElementResetter = defined @Interface/SharedXML/Scroll/ScrollBoxListView.lua:496
templateInfoDirty = true
SetPanExtent = defined @Interface/SharedXML/Scroll/ScrollBoxView.lua:51
HasEqualTemplateInfoExtents = defined @Interface/SharedXML/Scroll/ScrollBoxListView.lua:727
SetVirtualized = defined @Interface/SharedXML/Scroll/ScrollBoxListView.lua:500
SetElementIndentCalculator = defined @Interface/SharedXML/Scroll/ScrollBoxLinearView.lua:106
GetLayoutFunction = defined @Interface/SharedXML/Scroll/ScrollBoxLinearView.lua:114
SetElementInitializer = defined @Interface/SharedXML/Scroll/ScrollBoxListView.lua:448
SetScrollBox = defined @Interface/SharedXML/Scroll/ScrollBoxLinearView.lua:135
ReinitializeFrames = defined @Interface/SharedXML/Scroll/Scrol

commented

Oh, that's an interesting one. Since the bug seems to only reference Blizz code, that might make it tough to see what part of PSL is causing this. Thank you for testing with only PSL enabled, that way we know for sure it's my AddOn being whack.

Are you on the v10.2.0-003 version and have you tried using /psl clear already? There was a bug in the 002 version that may be causing this, and updating to 003 and using that command (in that order) should clear that up.

If you have already done that and are still getting this error, I'll see if I can reproduce this and figure out what part of my code is causing this.

commented

After posting that previous message, I enabled all my other addons (previous attempt was with PSL only), and completed another archaeology solve. I received the same error message again. After that, I used /psl clear and the next 2 attempts did not have the message. So, I don't know what to say. It appears that /psl clear clears up the issue, but something is causing it to return. That something may be a different addon,

commented

It has occurred with 10.2.0-003, but I've been experiencing it for a while. It at least goes back to 10.1.7, It took me a while to decide to dig further and then it's taken quite a while to single out the addon even with 4 characters able to do the daily transmutes (only a few days ago did I discover that the bug also occurred with archaeology).

I know that I've used /psl clear during that time frame, but didn't explicitly test for this error message after it. I tried just now with archaeology and the error message did not appear in two successive solves. I'll try again tomorrow with the alchemists and let you know. That may clear the problem, but I don't know how to identify the original source of the issue. The lua files that the message references don't even appear to exist on my computer.

commented

The lua files that the message references don't even appear to exist on my computer.

No, they are a part of Blizzard files that aren't local it seems. I was able to find the file online somewhere, and the line it gets stuck on is: extentBegin = extentBegin + self:GetElementExtent(dataIndexBegin) + spacing; in function ScrollBoxListViewMixin:CalculateDataIndices(scrollBox, stride, spacing)

In short, this is the Blizzard code for scrolling frames, which is something the PSL addon uses for its windows. So PSL is causing the error, due to Blizzard's handling of its scroll frames. (That is my limit of understanding as well, that sort of code scares me, haha.)

Now I am using a library for those windows, and I can see the scroll template they use is a deprecated one, so possibly that is to blame. I will see if I can manage to update that, and if possibly that is a solution to this problem.

commented

Alright, I've quickly found that I am not in the least bit skilled enough in programming to update the library myself. :')
Now I'm not sure if that would have resolved this particular problem, as I am also seeing some other people are also getting this error: https://us.forums.blizzard.com/en/wow/t/cooking-northern-stew-throws-lua-error/1709964

Some people suggest a complete UI reset could resolve this issue, but I'm always hesitant to offer up such drastic solutions.

The way you are describing the issue it very well could be another addon in combination with PSL is causing this issue. Could you provide me with a list of all the addons you are using? Maybe I can somehow re-create the error. :)

commented

ATT, PSL and Bartender4 were some of the last addons left when I was trying to single out which was the problem. For today's tests...

Test #1
Logged a character in with only ATT, PSL, and Bartender4. Used /psl clear. No error message.

Test #2
Logged in with only PSL. Used /psl clear. Reloaded UI (w/ PSL, ATT, and BT4 enabled). Received the error message.

Test #3
Logged in with only PSL. Used /psl clear. Reloaded UI (w/ only PSL enabled). No error message.

Test #4
Logged in with only PSL. Used /psl clear. Reloaded UI (w/ PSL and BT4 enabled). Received the error message.

Test #5 (archaeology)
Logged in with only PSL. Used /psl clear. Reloaded UI (w/ PSL and ATT enabled). Received the error message.

The only thing I did after reloading in tests 1,3, and 5 was open the Profession window, the Alchemy/Archaeology window and then craft. In tests 2 & 4, the transmute recipe was already added to a toolbar (toolbar wasn't visible w/o BT4). Thus I never opened the profession windows.

Tests #4 and #5 make me wonder if there are other addons that may interact with PSL, leading to this issue. I was unable to repeat the issue when cooking Northern Stew. I'll need to go do some digging in the dirt to do anymore tests before tomorrow's reset. The list of other addons I use is big. I'd rather whittle it down a bit, before putting you through that. It does, however, include big names like DBM, Details, TomTom, and Weakauras. Some of those use the scrollbox like PSL, but I don't see any component of Bartender4 that does.

commented

It's funny you mention BT4, as I did see a similar error popping up for people using that. Nothing with the scrollframe, but also something in the SharedXML folder. I'll see about testing it with BT4 when I can find the time, and thank you so much for testing it this thoroughly! Out of all the AddOns you mentioned at least, BT4 is the only one I personally don't use.

I am wondering if this can't be solved with a UI reset after all. Just for testing purposes, you could try renaming your WTF folder (in the WoW installation folder) to WTF_2 (or something similar) while WoW is not running, and then see if it happens when running PSL, ATT, and BT4. Then when you're done testing, shut off WoW again so you can restore your old WTF folder. That way you won't lose all of your UI and AddOn settings, but we can test if this is the result of some corrupted local settings.

commented

Interestingly, my shaman received the error message last night when casting Flametongue Weapon. However, I couldn't reproduce it later.

I did a "lot" of archaeology so I can do a "little" testing regarding the WTF folder. Early on, it was looking more and more like it's the SavedVariables files that are leading to the issue. Tests 1-4 suggested it was the BT4 SavedVariable file, Test 5 suggested the ATT SavedVariable file could also cause the issue. But Test 6 contradicted that, unless a different addon was corrupting BT4, PSL and ATT. Test 7 makes it look like it's a Blizzard SavedVariable file. Test 8 contradicted test 4, though it demonstrated that the error may go away after it's first appearance of a single log-in, something I couldn't check when I was using just alchemy.

I was getting frustrated with all the conflicting results so starting with test 9, I went all scorched earth. Tests 9-14 were probably the cleanest tests I did and point to PSL, but Test 14 contradicts Test 1 so I'm not sure where to go from here. All these contradicting results make me think there is some hidden variable...something else going on, perhaps with blizzard code itself, that is a major player in all of this.

Test 1
Cleared WTF folder. Logged in with PSL and BT4 enabled. No error message.

Test 2
Cleared WTF folder. Copied BT4 SavedVariables file from original WTF. Logged in with PSL and BT4 enabled. Received error message.

Test 3
Cleared WTF folder. Logged in with PSL and ATT enabled. No error message.

Test 4
Restored original WTF folder. Removed BT4 SavedVariable files. Logged in with "all" addons enabled. No error message.

Test 5 (this & all following tests were using archaeology)
Cleared WTF folder. Copied ATT SavedVariables file from original WTF. Logged in with PSL and ATT enabled. Received error message.

Test 6
Restored original WTF folder. Removed all non-Blizzard SavedVariable files. Logged in with "all" addons. Received error message.

Test 7
Restored original WTF folder. Removed all SavedVariable folders (including Blizzard files). Logged in with "all" addons. Received error message. Tested a second and third time immediately after, No error message for either.

Test 8
Cleared WTF folder. Logged in with "all" addons. Solved 3 relics, Yes, No, No.

Guess it's time for some scorched earth.
Test 9
Cleared WTF/Cache/Interface folders. Ran Scan&Repair. No addons installed. No error message.

Test 10
Continued from Test 9 environment. Installed PSL and BT4 (from zip files). Logged in with both enabled. Received the error message.

Test 11
Cleared WTF/Cache/Interface folders. Installed PSL. Logged in with PSL enabled. Received Error Message.

Test 12
Cleared WTF/Cache/Interface folders. Installed BT4. Logged in with BT4 enabled. No Error Message.

Test 13
Cleared WTF/Cache/Interface folders. Installed ATT. Logged in with ATT enabled. No Error Message.

Test 14
Cleared WTF/Cache/Interface folders. Installed PSL & BT4. Logged in with PSL only enabled. Solved relic. Received Error Message. Reloaded UI enabling BT4 and disabling PSL. Solved relic. No Error Message. Logged out. Logged in with PSL disabled & BT4 enabled. Solved Relic. No Error Message.

commented

Thank you for this very extensive testing! I was just able to re-create the error when solving an Archeology relic, I also managed to get the error once when casting Flametongue Weapon, then not again until I used /reload, but I can re-create it now reliably so that actually makes this whole process a lot easier.

I should hopefully be able to narrow down where this error comes from, as it likely has to do with whenever the player successfully casts a spell (crafting, or otherwise).

commented

I've managed to narrow down the problem! I load the profession UI at the start of the addon, so I can create buttons and stuff in those windows. That seems to be causing the problem. I'll need to find a workaround for that though as I can't just remove it, but I should somehow manage to do that.

In any case there is no more testing required on your part, thank you so much for all the effort so far!

commented

The current 004 release should see this issue resolved.
There might be some other minor mistakes I've made while doing this, but as far as I've tested everything seems to be working.

Once again thank you so much for testing this much, it helped me out a lot!

commented

Glad I could help, and Thank You! both for the responsiveness/openness to look into the issue, but also for the great addon. I find it quite useful on a regular basis.