Thread Tools Display Modes
04/16/15, 01:35 AM   #1
DerBombo
 
DerBombo's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 29
Question Looking for addon causing a bug

Hey there,

I have an annoying bug for quite some time, and I can't figure out, which addon is actually causing it. It doesn't happen all the time, but rather sporadic. Sometimes, when I try to use the context menu in my inventory, to either Destroy and item or get one from my bank, I get the following message:

EsoUI/Ingame/Inventory/InventorySlot.lua:903: attempt to access a private function 'PickupInventoryItem' from insecure code
stack traceback:
EsoUI/Ingame/Inventory/InventorySlot.lua:903: in function 'InitiateDestroyItem'
EsoUI/Ingame/Inventory/InventorySlot.lua:1453: in function 'OnSelect'
EsoUI/Libraries/ZO_ContextMenus/ZO_ContextMenus.lua:412: in function 'ZO_Menu_ClickItem'
8371350907706105899:4: in function '(main chunk)'

Does anyone have a tip for me in how to find out, which addon (if any) is actually causing this? I have way to many addons at the moment, to go by trial and error. Also when I reloadui, the bug isn't happening anymore for a certain amount of time.

Thanks for any help.

Edit: I'll just add all my addons here, so maybe anyone can have an educated guess.

Advanced Filters
Advanced Filters - Sous Chef Filters
AI Research Grid
AwesomeGuildStore
CDG Bank Stacker
Circonians ChatIt
Circonians EmoteIt
Circonians SortIt
Combat Cloud
Combat Log Statistics (CLS)
CurvyHud
Destinations
Dustman
FCO ItemSaver
Fully Customizable MultiQuest Tracker
Harven's Chat Completion
Harven's Improved Skills Window
Harven's Quest Journal
Harven's Subtitles
Harven's Trait and Style
HarvestMap (EsoheadMarkers)
Idle Animations
Inventory Item Borders (for Update 6)
Joviex's Addon Settings Transfer (for Update 4)
JPGScreenshot
LibMediaProvider
Librarian Book Manager
Lootdrop, Continued (All in One)
LoreBooks
MailR
MasterMerchant
MobileBank Extended
No, thank you!
pChat
PinKiller
Potion Maker
Rare Fish Tracker
Research Assistant
Runes Voices
Show Weapons While Mounted
Sous Chef - Provisioning Helper
SpentSkillPoints
Srendarr - Aura, Buff & Debuff Tracker (for Update 6)
TrueExploration
Votan's Fish Fillet
Votan's Fisherman
Votan's Rune Info
Votan's Search Box

Last edited by DerBombo : 04/16/15 at 01:43 AM.
  Reply With Quote
04/16/15, 01:56 AM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
You are not the only one with that issue. Maybe you can give us a list of addons that you are using.
%HOMEPATH%\Documents\Elder Scrolls Online\live\AddOnSettings.txt should contain a section for your character that shows them.

edit: thank you
  Reply With Quote
04/16/15, 02:41 AM   #3
Sideshow
 
Sideshow's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 36
If the problem is persistent, you can do a 'binary search'

First, disable the upper half of the addons
If the problem still occurs, you know it's probably not a problem with the upper half of the addons
Then, disable the upper half of the original lower half
Have fun
  Reply With Quote
04/16/15, 03:03 AM   #4
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by Sideshow View Post
If the problem is persistent, you can do a 'binary search'

First, disable the upper half of the addons
If the problem still occurs, you know it's probably not a problem with the upper half of the addons
Then, disable the upper half of the original lower half
Have fun
The problem is, it is a sporadic error. Without knowing what to do to cause it, you can not be sure.
I assume it is an general issue of ShowMenu, and the message is a misleading "always print this if any error occurs".
I think ZO_Menu_OnHide is not always called (in the right order) because the owning control gets invisible, but not hidden. (same problem as with tooltips not get closed)
And/Or some OnEffectivelyHidden handler get replaced by ShowMenu.

If I am right, you had another context-menu opened before and not closed before opening another window by key-bind.

But that's just a theory...
  Reply With Quote
04/16/15, 03:47 AM   #5
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
Two ideas that come to mind are 1) creating an addon that provokes this error in all sorts of ways that we can think of and 2) compare these code pieces with addons that are in the lists of people that have this problem from time to time.
Probably will be a lot of work to look through all of them though.
  Reply With Quote
04/16/15, 03:52 AM   #6
DerBombo
 
DerBombo's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 29
Thanks to all of you for your replies. Also great that each and every reply is coming from someone, whose addons I use and like pretty much. You guys are great!

Originally Posted by votan View Post
If I am right, you had another context-menu opened before and not closed before opening another window by key-bind.
That is definitely something I can look out for. Thanks Sideshow for suggesting the binary approach. I actually used that in the past to locate a different issue. The problem here is, I would have to go without half my addons for quite some time, and even then I won't be sure I caught the one messing up, because as I said the issue won't occur anymore, when I'd do a reloadui. But thanks anyway!
  Reply With Quote
04/16/15, 03:54 AM   #7
DerBombo
 
DerBombo's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 29
Also I guess I will log this as a bug with ZOS, if it's possible for them to do something about it or they are actually causing it.
  Reply With Quote
04/18/15, 04:46 PM   #8
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
How to cause the error

Do in chat window:
1. /reloadui
2. /script ClearMenu() AddMenuItem("") ShowMenu() ClearMenu()
3. Go and use an item of your inventory using context-menu

unsecure code?!?

Try this:
1. /reloadui
2. go and open journal and right-click a quest to open a context-menu. In fact any build-in context-menu would be ok. You could also open the context-menu of the inventory.
3. /script ClearMenu() AddMenuItem("") ShowMenu() ClearMenu()
4. Go and use an item of your inventory using context-menu

now the same code is secure

Any addon opening a context-menu before build-in code does it is unsecure.

If you add the code from above to startup code of an addon, you can not use/pickup/destory any item with context-menu anymore. But key-bind (E) would work.

ups!
  Reply With Quote
04/19/15, 05:23 AM   #9
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
How to cause the error - Part II

I moved the technical stuff here
If you are not an addon developer, just try the previous post.

Last edited by votan : 04/20/15 at 01:04 PM. Reason: Moved to new thread
  Reply With Quote
04/21/15, 09:39 PM   #10
Kevinmon
Join Date: Apr 2014
Posts: 17
I have this same bug every time I play.
  Reply With Quote
04/28/15, 08:44 AM   #11
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by Kevinmon View Post
I have this same bug every time I play.
This is, what you have to care of:
Once you open a context-menu the first time after (re-)load UI, remember the position of the first menu entry introduced by an add-on. Build-in menu enties using a "private" function at the same position will raise this "security feature" error message afterwards.
Typically "private" functions are in the position 1 to 3, sometimes 4 of the inventory context-menu. Once this positions were created by build-in menu entries first, the message will not occur anymore.
If, for example, the build-in context-menu normally has 2 menu entries only and an addon introduces a 3rd menu item first time ever after load, a "private" build-in menu item at position 3 will crash.

If you have that error so frequently, what context-menu do you normally use first very often?

Edit 1: I have to correct myself. I finally found a way to get an "insecure" 4th menu item, but it worked. But I'm still able to reproduce the error, if the 1st menu item was created by a full custom context-menu.
So it must have something to do with the first initialization.

Last edited by votan : 04/28/15 at 12:45 PM.
  Reply With Quote
04/28/15, 04:36 PM   #12
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
I looked into this and it's caused by the OnMouseUp closure being marked insecure if the control creation is triggered by an addon. I can pre-fill the pool with 10 controls so this isn't a problem anymore.
  Reply With Quote
04/28/15, 05:31 PM   #13
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,966
There are several addons adding items to the context menus so I guess 10 items (standard ESO context menu items included or excluded?) wouldn't be enough.
FCOItemSaver alone is able to add 12 labels (if all settings are enabled for this addon) to the mouse context menu of inventory items!

Isn't there maybe anther solution that "really" fixes this, or did I understand you wrong?
  Reply With Quote
04/28/15, 11:35 PM   #14
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by Baertram View Post
There are several addons adding items to the context menus so I guess 10 items (standard ESO context menu items included or excluded?) wouldn't be enough.
FCOItemSaver alone is able to add 12 labels (if all settings are enabled for this addon) to the mouse context menu of inventory items!

Isn't there maybe anther solution that "really" fixes this, or did I understand you wrong?
Originally Posted by ZOS_ChipHilseberg View Post
I looked into this and it's caused by the OnMouseUp closure being marked insecure if the control creation is triggered by an addon. I can pre-fill the pool with 10 controls so this isn't a problem anymore.
Thank You very much, Chip. That would at least help. But is it the creation of the first control only? As I mentioned I was able to create a 4th "insecure" control, but "Destroy Item" (at 4th pos) did not raise an error?!?

The only solution I found to "really" fix that, (depending on how this marking works) is: Strictly separating the controls of build-in menuitems and custom menuitems: Using own control pools and introducing AddCustomMenuItem. Like in the attached file.
For us add-on developers it would just be an find-and-replace-all.
Attached Files
File Type: lua LibCustomMenu.lua (3.5 KB, 2775 views)

Last edited by votan : 04/28/15 at 11:47 PM.
  Reply With Quote
04/28/15, 11:35 PM   #15
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
It should be okay if the entries are returned to the pool in the right order. Otherwise this will turn into a Russian roulette as soon as some addon adds an 11th entry.
A more permanent solution would be a separate pool and an AddCustomMenuItem function for addons. I haven't looked into the code too deeply though, so I could be wrong

edit: Well, seems that great minds thing alike

Last edited by sirinsidiator : 04/28/15 at 11:36 PM. Reason: got ninja'd
  Reply With Quote
05/07/15, 12:41 AM   #16
DerBombo
 
DerBombo's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 29
You guys seem to be pretty far ahead in this matter, but just to help reproduce this: On a hunch I disabled FCOItemSaver, because as Baertram said, it adds a bunch of menu items, and I didn't really come across this issue anymore. While adding support for FCOItemSaver to my own addon, I had to reactivate it for testing, and the issue was there again.

Just to make sure the issue is isolated correctly. I really like FCOItemSaver and would like to make use of it again.
  Reply With Quote
05/07/15, 01:19 AM   #17
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by DerBombo View Post
While adding support for FCOItemSaver to my own addon, I had to reactivate it for testing, and the issue was there again.

Just to make sure the issue is isolated correctly. I really like FCOItemSaver and would like to make use of it again.
If you like to, try the attached lib of my previous post and replace all AddMenuItem with AddCustomMenuItem.
I did it for all addons I use on my own.
I don't know if it is worth to release this lib, because Chip said, they will pre-init the pool.
  Reply With Quote
05/07/15, 01:44 AM   #18
DerBombo
 
DerBombo's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 29
Originally Posted by votan View Post
If you like to, try the attached lib of my previous post and replace all AddMenuItem with AddCustomMenuItem.
I did it for all addons I use on my own.
I don't know if it is worth to release this lib, because Chip said, they will pre-init the pool.
Sure, I will give it a try. Though I'll be on vacation starting tomorrow, so I won't be posting any news before May 15.
  Reply With Quote
05/07/15, 04:35 AM   #19
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,966
Thx for the update DerBombo, I'll check with Votan's librray as well to see if this helps.
(Unfortunately I never got this bug so far so I must see how I can reproduce it. Have to read this thread's posts all again )

EDIT:
I've prepared a version of FCOItemSaver with the libCustomMenu from Votan, you can download it here for testing.
Seems to work normally and I like the thing that the new custom made entries are located below the original ones!
https://dl.dropboxusercontent.com/u/...ver_0_6_4b.zip

Last edited by Baertram : 05/07/15 at 08:59 AM.
  Reply With Quote
05/07/15, 09:21 AM   #20
DerBombo
 
DerBombo's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 29
Thumbs up

That sounds great! Thanks! I'll give it a try as soon as possible. Could take some time though as I'll be on vacation, but I'm eager to test this!
  Reply With Quote

ESOUI » AddOns » AddOn Search/Requests » Looking for addon causing a bug


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