API Data Corruption Under Specific Cases

Reorx_Holybeard
Reorx_Holybeard
✭✭✭✭✭
I've been encountering some "random" data corruption issues with strings returned from the Lua API since the live patch. Can confirm it also happens on the current PTS and that it didn't occur in the previous Live version but I don't know exactly which PTS patch it started. This is without using any addons other than the one being tested.

The cases it occurs with are "semi-random" but I've finally been able to narrow it down to a small(ish) code that demonstrates the issue (see attached file). To replicate:
  • Copy code into an addon.
  • Run the MineTest() function: /script MineTest()
  • Observe the "bad trait" error message.

The description string returned from GetItemLinkTraitInfo() appears to be corrupted with binary characters:
When you gain Ultimate you have a |cffffff12|r% chance to gain \0菺\v\0\0\t\0\0\0\0\0\0\0\0\0\0\0

or the bad data in hex:
5C30E80F3A5C7615025C305C305C745C305C305C305C305C305C305C30025C305C305C305C30

If you replace the GetItemLinkInfo() function on line 26 with GetItemLinkIcon() the issue goes away. It also goes away if you comment out the IsItemLinkCrafted() on line 21, GetItemLinkEnchantInfo() on line 4, and GetItemLinkSetBonusInfo() on line 17. I don't necessarily think the issue is with those API functions specifically but whatever memory corruption is occurring merely impacts those functions or combination of functions in some way.

As another repeatable example:
  • Replace the GetItemLinkInfo() function with GetItemLinkIcon() on line 26.
  • Replace all 80046 with 114426.
  • Run MineTest() and observe corruption.
  • Comment out GetItemLinkEnchantInfo() on line 4 and IsItemLinkCrafted() on line 21.
  • Run MineTest() and observe *no* issues.

I believe this issue occurs in a lot of other cases but these are the only 2 I've been able to narrow down and those took me the past 2 days to do. If anyone happens to test this and gets different results please let me know!

Edited by Reorx_Holybeard on March 1, 2019 9:37PM
Reorx Holybeard -- NA/PC
Founder/Admin of www.uesp.net -- UESP ESO Guilds
Creator of the "Best" ESO Build Editor
I'm on a quest to build the world's toughest USB drive!
test.txt 120.5K
Sign In or Register to comment.