ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Crashes and SINGLE_SLOT_UPDATE (https://www.esoui.com/forums/showthread.php?t=4811)

QuadroTony 06/19/15 08:25 AM

Crashes and SINGLE_SLOT_UPDATE
 
how to deal with it?
my experience started from this topic
http://www.esoui.com/forums/showthread.php?t=4620

i have alot of addons but they all important to me and i havent addons with duplicate features, they all doing their job so i cant delete any1 of them

sometimes i got CTD
when:

- open a guild bank
- pickup alot of items
- autosell alot of junk
- when guard took away stolen items from me
- etc etc

i think
EVENT_LOOT_RECEIVED
not connected with guild bank so im looking for
EVENT_INVENTORY_SINGLE_SLOT_UPDATE in all my addons

here is the list:
CharInfoInspector(private addon from eShinobu)
FilteIt
GreymindQuickslotBar - already fixed
JunkIt
Khrill Master Cook
Khrill Merlin the Enchanter
LootDrop - fix in progress
MasterRecipeList
PotionMaker - not a problem if open not outside the station
QuickEnchanter
RaetiaInfoHub
Roomba
Srendarr
TweakIt
WeaponChargeAlert
YssEquipmentIndicator

QuadroTony 06/20/15 12:13 AM

i can for example turn off 3 addons - one of the enchanter, lib silencer and weapon charge

but still alot addon with this function remains...

QuadroTony 06/20/15 05:04 PM

any ideas?:D

Sasky 06/20/15 10:47 PM

Not much has changed, really. Your options are pretty much:
A. Change each addon to use EVENT_SINGLE_SLOT_UPDATE the minimum it can. How this is implemented depends on the addon (some might be able to avoid using it at all).
B. Have them all use a common library that buffers the events to make sure it doesn't process too much at once.
C. Hooking would require loading an addon first then overriding the RegisterForEvent handler. The only way an addon can be guaranteed to load first is if all other addons depend on it. (So again, change each of the addons.)
D. Have ZOS implement some sort of fix for the event buffer and/or EVENT_SINGLE_SLOT_UPDATE. Note: this might require changing the API for that event, which would require changing each addon.
E. Don't use that many addons with EVENT_SINGLE_SLOT_UPDATE

QuadroTony 06/21/15 01:29 AM

thanks for info! i will try to cooperate all addon's authors for this

sirinsidiator 06/21/15 02:50 AM

I don't crash but I also get annoying freezes when I am caught by a guard and in some other situations where many items get moved/scanned. I just whipped up a small addon for testing purposes, which throttles the event callbacks on single slot updates.
You can download it here.
You then need to add
Code:

## DependsOn: LibInventorySingleSlotUpdate
into the addon manifest of every addon that registers for EVENT_INVENTORY_SINGLE_SLOT_UPDATE.

It may or may not reduce your crashes.

QuadroTony 06/21/15 11:04 AM

thanks i change first post with state about each addon progress
will see if crashes remains after all changes:)

Ayantir 06/21/15 11:04 AM

one easy partial fix could be :

Lua Code:
  1. if IsUnderArrest() then return end

Why?

This function returns true while you interact when a guard. If there is a single slot update at this moment, it could only be the justice system removing your items

It should solve problem for this precise moment.


For some other addons, it could also being removed at other moments.
ex: do Lootdrop (who monitors loots) would run when you interact at bank ? when you restack items ?

Ravalox Darkshire 06/21/15 08:15 PM

Quote:

Originally Posted by QuadroTony (Post 21641)
how to deal with it?
my experience started from this topic
http://www.esoui.com/forums/showthread.php?t=4620

i have alot of addons but they all important to me and i havent addons with duplicate features, they all doing their job so i cant delete any1 of them

wykkydsAchievementTracker
wykkydsQuestTracker
author refuse to change anything
YssEquipmentIndicator

Just to address the addons listed above in blue ... Neither call the event you are referencing, nor does LibSilencer as explained in response to your post on Achievement Tracker's comments tab here: http://www.esoui.com/downloads/info7....html#comments

Unless I am missing something you are looking for authors of addons that include registration and calls for "EVENT_INVENTORY_SINGLE_SLOT_UPDATE". I cannot find this event being used in any of the Wykkyd addons you referenced.

I am not refusing to change anything, I advised that there isn't a problem in the addons you listed, and I suggested that you use the solution that was provided in the form of a library (LibInventorySingleSlotUpdate) that sirinsidiator made for this.

Since none of these three addons reference inventory there would be no reason to register or call this event. Unless there is another event you have a concern with, please remove the unaffected addons from your list. (I would also recheck your scan of the files to make sure the rest are really impacted)

Ravalox

QuadroTony 06/21/15 11:37 PM

thanks for explanatio! now im know why
i will delete this addons from the list
:)
i see its only reference to libFactory


so ye you are right

QuadroTony 06/23/15 12:31 PM

i can test lootdrop when tweaked version wil be rdy :)

QuadroTony 06/24/15 04:36 AM

nice comment i got!

Quote:

Originally Posted by Phinix
Quote:

Originally Posted by QuadroTony
thanks for update looks like i can delete Khrill master cook now, this addon have all i need

whan about crashes i posted?
can crash at guildbank be connectedwith this addon too?

If you are referring to the issue with EVENT_SINGLE_SLOT_UPDATE then no, this addon can not contribute to crashes at the bank. That is because ESOMRL already has it's own checks built in and doesn't run any code at all when EVENT_SINGLE_SLOT_UPDATE fires due to interaction with a bank.

There are basically two approaches to optimizing an addon for use with a specific event:
  1. Throttle the use of the event globally as a "catch all" so that performance is less reliant on authors coding proper checks on their own and...
  2. Apply proper checks on the function called by the event so that there is no need for additional third party throttling.

ESO Master Recipe List handles the later. Granted, there are certain addons such as loot managers that delete certain items you loot based on filter settings, or Loot Drop type addons that display statistics about every looted item, that could potentially benefit from such throttling, though most of these will also not be related to bank crashes because they apply the same checks as ESOMRL, specifically the "isNewItem" check.

To understand what this means, consider the following values are available to the function return of the EVENT_SINGLE_SLOT_UPDATE event (meaning any addon which registers for this event has these values sent to whatever function they specify whenever the event fires):

Code:

eventCode, bagId, slotId, isNewItem, itemSoundCategory, updateReason
The "isNewItem" value is a Boolean (true or false) which will be true if the item just had a unique ID generated, meaning it was just looted (from a mob or crate, etc.), and false if it was already seen, like when you take something out of the bank.

ESOMRL only uses EVENT_SINGLE_SLOT_UPDATE for the auto-junk and auto-delete feature for ingredients and recipes, and there are several checks including "isNewItem" which will prevent any of the function code from ever running if these criteria are not met.

For example, if the item is added to your inventory from a bank and not from a monster or loot source in the world, the function doesn't run. If the item is not a recipe or ingredient, the function doesn't run. If Roomba is running, if you are under arrest, or if the item is already marked as junk, the function doesn't run.

There is very little overhead generated by the proper use of EVENT_SINGLE_SLOT_UPDATE to selectively parse specific items being added to the player in specific scenarios, as ESOMRL does. It isn't like ANY use of this function automatically breaks things!

As I said there may be some addons that do a lot of work for every single item added to any inventory in any scenario, however ESOMRL isn't one of them.

I do think it can be helpful for people who run a lot of addons (some of which might either be badly coded or have a real need to do a lot of processing on every single item you add to any inventory) and who's systems are already taxed to the limit in terms of memory and CPU usage to have a third party library do throttling on the entire workload of that addon. HOWEVER, I want to be clear (as others have mentioned) that not every addon will need to use this simply because they use EVENT_SINGLE_SLOT_UPDATE, nor will throttling in addons that are already properly coded prevent crashes related to CPU/memory bottlenecking.

Thanks for taking an interest, and I hope you are able to work out crash the issues you are having. :)


QuadroTony 06/26/15 12:15 AM

can any1 know why i got crash when trying to choose one guild from guild UI?

weird


sirinsidiator 06/26/15 01:18 AM

Because you use way too many addons :P

But seriously. We as addon authors cannot tell you why it crashes from just a screenshot and a sentence saying "i got crash when trying to choose one guild from guild UI".
There are no tools for us to do this and until ZOS gives us a crash log which tells us the exact line of code that caused the crash, we cannot do anything about it.

Unless you give us steps to reproduce the crash 100% reliably, a dump of your addon folder, some time and some money.

QuadroTony 08/19/15 11:46 PM

stil lexperienced crashes on guildbank opening....

cant narrow down the problem
i suspect Inventory insight or smthing

Baertram 08/20/15 09:13 AM

I got crashes at the gild bank too sometimes and I do not use these addons.
But the crash happens as I select a new guild AND the guild bank withdraw panel is open AND there are shown many items (like the material filter is selected and there are plenty of materials to scan).
If I open the local inventory view (bank deposit tab) the crash never happens!

One possible solution to track this down would be:
-Check each of your addons which are using events if the guild bank opens
-Check each addon which is using EVENT_INVENTORY_SINGLE_SLOT_UPDATE etc.
-Write a debug message into the callback functions with the addon name (at the point where the callback funcitons really is executed, and not stricktly at the first line, which could be "if isNew == false then return end" or something similar that will stop the function.

-Maximize your chat window, play opening the guild banks and switching around until if it crashes and have an eye on the chat window to see which addons are actually called, in what order, how often, etc.

This would be an attempt but I guess as long as the chat won't be dumped automatically each x seconds you wouldn't be able to fully see what is happening :(

QuadroTony 08/30/15 01:21 AM

Quote:

Originally Posted by Baertram (Post 22840)
If I open the local inventory view (bank deposit tab) the crash never happens!

but befor you do this you will see guild bank tab anyway, and i got alot of crashes with it

Quote:

Originally Posted by Baertram (Post 22840)
-Check each of your addons which are using events if the guild bank opens

what is this events? write a sentence pls i will try to CTRL+F it

crash at guildbank - FilterIT, 99%

Baertram 08/30/15 02:51 PM

Oh, I don't remember the exact wording but check the Esoui WIKI for the events at guild banks please.
There should be something like event_guild_bank_open or event_guild_bank_ready (for the part where the guild back withdraw tab is responsive to take stuff).

Ayantir 08/30/15 07:09 PM

EVENT_GUILD_BANK_ITEMS_READY

if oftens triggers 3/4 times for large guild banks so a flag with a zo_callLater is needed.

QuadroTony 08/31/15 01:11 AM

thanks all, crashes at the guild bank gone with new version of FilterIt
but crashes on the PTs with another function still persist
look at this topic if you have an ideas
http://www.esoui.com/forums/showthread.php?t=5093


All times are GMT -6. The time now is 08:59 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI