Thread Tools Display Modes
11/13/14, 05:15 PM   #1
mrme73
Join Date: Nov 2014
Posts: 4
Crash at stablemaster

Hi, it took me a while to narrow down the suspects but I managed to.
I have Inventory Grid View, JunkIt, and Sous Chef addons, and upon changing mounts at the stable master the game will either hang for 2-5 seconds or just crash.
I'm not sure what other info would be helpful to solving it :\
  Reply With Quote
11/13/14, 05:39 PM   #2
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by mrme73 View Post
Hi, it took me a while to narrow down the suspects but I managed to.
I have Inventory Grid View, JunkIt, and Sous Chef addons, and upon changing mounts at the stable master the game will either hang for 2-5 seconds or just crash.
I'm not sure what other info would be helpful to solving it :\
I looked at it, it seems if the horse you switch to has a lower capacity than the horse you had active it forces a slot update on all bank & bag inventory slots. I'm not sure why since you can not switch to a horse with lower capacity if it would mean you would not have enough free slots for the items in your inventory. So I don't know why any slots would need to be updated.

Either way that is a lot of slots to call updates on at once. I can see the possibility of JunkIt causing a slight second delay, but I don't see any reason it would cause a crash. I'm looking at it now I'll let you know what I find.

Last edited by circonian : 11/13/14 at 06:49 PM.
  Reply With Quote
11/13/14, 06:51 PM   #3
mrme73
Join Date: Nov 2014
Posts: 4
thanks, it is only when all 3 of those are enabled at the same time. Inventory grid view by itself causes a 2 second hang, the others just cause the normal hiccup.

Last edited by mrme73 : 11/13/14 at 06:54 PM.
  Reply With Quote
11/13/14, 06:55 PM   #4
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by mrme73 View Post
thanks, it is only when all 3 of those are enabled at the same time otherwise it seems to just hang for 3 seconds normally.
Yeah, I looked at it a little closer. No matter what, even with all addons off, the game hangs for about a second. I don't think JunkIt caused the crash. I don't know about those other addons, but if they also use slotUpdate I can see where the 3 together all updating every slot in your inventory & bank could add up to a longer delay.
  Reply With Quote
11/15/14, 08:22 AM   #5
mrme73
Join Date: Nov 2014
Posts: 4
well hopefully ingeniousclown, katkat, or crazydutchguy see this and can provide more insight on the other addons :\
Client crashes using a different computer so I don't think its hardware. I also did a client repair but it didn't help any.
  Reply With Quote
11/15/14, 02:23 PM   #6
katkat42
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 155
Do you have SousChef set to sort ingredients in your inventory? (It's the last option in the menu.) If so, you might try turning that off first, to see if it has any impact. The issue might be LibSort. Otherwise, there's a little bit of optimization that can be squeezed out of the AddRankToSlot function, but not much.

Randactyl, can you speak for InventoryGridView?
  Reply With Quote
11/15/14, 08:30 PM   #7
mrme73
Join Date: Nov 2014
Posts: 4
I do not have SousChef set to sort ingredients. I attached the saved variables for the 3 addons if that helps any. let me know if there is anything else I can get to help.
I posted on the inventory grid view comments earlier also and linked to this thread.
Attached Files
File Type: lua SousChef.lua (55.5 KB, 519 views)
File Type: lua JunkIt.lua (264.8 KB, 538 views)
File Type: lua InventoryGridView.lua (2.3 KB, 535 views)
  Reply With Quote
11/17/14, 03:53 AM   #8
Criscal
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 14
inventory updates

Hi,

I worked around a similar issue with my addon. Changing a horse can lead to many item update events. Since 1.3 or so the client crashes seemingly on purpose when the response takes too long. I solved it by only calculating results when my window was actually visible as well as throttling the recalculation frequency. So if there is now something like horse change start and or post event you could throttle it easily.
  Reply With Quote
11/17/14, 04:10 PM   #9
Randactyl
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 251
Echoing what I said on IGV's comments:

I'm with circonian. I have no idea why each inventory slot needs to be updated when switching mounts - seems silly.

IGV and I'm guessing Sous Chef adds its (our) info to items when the item controls are created. It sounds like the slowdown is because each of the item controls are being recreated when changing mounts. The problem is we cant really change when we assign this info - it would possibly not be ready when the user needed it.

Maybe we can get in touch with
ZOS_ChipHilseberg and figure out why those slots need to be recreated or possibly work on changing that practice.

Expanding on that:

I don't want to say too much, as I still haven't had time to thoroughly look through the issue. If there are horse events, maybe we can ignore updating info if the reason comes from opening the stable/changing your horse - provided our added data isn't erased in that refresh process.
  Reply With Quote
11/17/14, 08:58 PM   #10
Sasky
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 231
Originally Posted by Randactyl View Post
I'm with circonian. I have no idea why each inventory slot needs to be updated when switching mounts - seems silly.
Not sure how exactly it's implemented, but if these are true they do need to repack on horse capacity switch:
- slot indexes not guaranteed filled 1-20 for 20 items (probably true)
- no item can have a slotIndex greater than the capacity

Example:
You're 120/120, remove items with slotIndex 1-30 to get to 90/120. Switch to 100-capacity horse. There'd still be items with slotIndex >100, so they'd have to be moved down.

Now, they could still rework how they repack stuff to limit the number of items that have to switch slots (only move those that'd be over capacity) or even remove that 2nd limitation altogether. I suppose there's a chance they'd do something, since it does hiccup on even normal game switch, but I wouldn't count on it.

----------------------------------------
From the author end, the best bet is probably to just make sure you don't do slotUpdate during a horse swap. If there isn't an event for that, you can tie into showing/hiding the stable scene. It's possible you might not have to even do a scan afterwords. (If you cache slotIndex, you probably will, but think that's probably it.)
  Reply With Quote
11/17/14, 10:27 PM   #11
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by Sasky View Post
Not sure how exactly it's implemented, but if these are true they do need to repack on horse capacity switch:
- slot indexes not guaranteed filled 1-20 for 20 items (probably true)
- no item can have a slotIndex greater than the capacity
I just tested that & it looks like your right. It does move all of the stot indexes down and if you have data stored in the items dataEntry table it does get erased, so If your storing data in there it seems you have no choice but to go along with it and do the update to all of the slots.
  Reply With Quote
11/18/14, 02:27 AM   #12
farangkao
 
farangkao's Avatar
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 59
I've had the same problem with my Addon Mobile Bank Extended.
Since i never switched my Horse, i never had the experience myself,
but one of the Users reported that problem.

The Solution was simpel: only do your logic if the Item is "New" ,which is one of the parameters of the Event.


Lua Code:
  1. EVENT_MANAGER:RegisterForEvent("MobileBank", EVENT_INVENTORY_SINGLE_SLOT_UPDATE, MB.SingleSlotUpdate)
  2.  
  3. function MB.SingleSlotUpdate(eventCode,bagId, slotId, isNewItem, itemSoundCategory, updateReason)
  4.  
  5. -- EVENT_INVENTORY_SINGLE_SLOT_UPDATE (integer eventCode, integer bagId, integer slotId, bool isNewItem, integer itemSoundCategory, integer updateReason)
  6. local bagname = "Unknown"
  7.  
  8.    if bagId == BAG_BACKPACK then bagname = "Backpack" end
  9.    if bagId == BAG_BANK then bagname = "Bank" end
  10.    if bagId == BAG_BUYBACK then bagname = "Buyback" end
  11.    if bagId == BAG_GUILDBANK then bagname = "Guildbank" end  
  12.    if bagId == BAG_WORN then bagname = "Worn" end
  13.  
  14.    debug("Event SingleSlotUpdate fired: " .. bagname .. " Slot: " .. tostring(slotId) .. " (New: "  ..tostring(isNewItem) .. ") / Reason: " .. tostring(updateReason))
  15.  
  16.   if bagname == "Backpack" and isNewItem then
  17.     MB.SavePlayerInvent()
  18.   end
  19. end



Hope this info helps the Authors to fix their Addons.
  Reply With Quote
11/18/14, 03:19 PM   #13
Sasky
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 231
Nice, farangkao.

Better yet, put the check right at the beginning so you exit as quickly as possible:
Lua Code:
  1. function MB.SingleSlotUpdate(eventCode,bagId, slotId, isNewItem, itemSoundCategory, updateReason)
  2.     if not isNewItem then
  3.         return
  4.     end
  5.  
  6.     -- Actual code here
  7. end


Though as circonian noted, it does remove details in the dataEntry table. So if you use that or cache the slotIndex values, you're going to need to update the slots instead of this (and should probably do it as a delayed full scan).
  Reply With Quote
11/19/14, 12:04 PM   #14
Randactyl
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 251
Yeah, that makes sense Sasky.

I've got some rewriting in my future
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Crash at stablemaster


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