Alchemist (Seeking Help) @Garkin?
Hello Everyone, Maybe Garkin? You're one of the top I've seen in the forums :)
I've been debugging Alchemist Addon Escape bug for like 5 days now, I've lost so much sleep. I read Garkin said the Unicorn "List" with "self" was causing the "escape or keyboard bug"... I removed that library and used a simple chat for display.. This didn't help. I've gone line for line in the code and commenting out each line, crafting an item in game.. and then testing the lockup... it's locking up no matter what??? As far as I can tell... Its locking up on local combinations = Alchemist.Algorithm.get_optimal_combinations(inventory, num_reagent_slots) if I have num_reagent_slots return 1 instead of 2... it doesn't lock up after crafting. Inside get_optimal_combinations it locks up if we provide "2" Full function below (please see under this function)_ Lua Code:
Here are the combinations .. I've stepped through each code and it either hands the UI in game (force close) or nothing.... commenting out doesn't help. Lua Code:
To be honest, I only have a few more days of testing this.. attempting fixes before I get completely burnt out on this Addon. I'm out of herbs to test with....so its really annoying, lol If anyone has time.. please feel free to debug this, I'm more than happy to add additional devs to the Addon. Thanks, AB |
I've tested it too several times and tried to fix it but no chance so far.
@Awesomebilly You should format the code inside your posting using the LUA (small blue bubble above the chat text window) so one can better read it.If youe dit your post you need to use the "Go advanced" button to see the extra formatting functions like CODE and LUA |
My absolut sorry. I misunderstood the type of lock up. sorry sorry sorry :( :( :(
But the good news is, I have the lock up even without craftng. Edit 1000: Ok. First lock up found. It was big, empty and unused: Alchemist.xml But not I know what you mean. Finally. I'm still sorry. Edit 1001: I found something: local config = { addonName = "Alchemist", anchorTargetControl = nil, width = 450, height = 400, } local alchemistControl = LL:init(config) Alchemist = { version = "1.6.5.0", } LL:Init calls WINDOW_MANAGER:CreateTopLevelWindow(self.config.addonName) Afterwards this window is replaced with a table. I have not issue now (After changing the name in the config), but no unknown traits also. |
Narrowed down better steps to reproduce
I'll be posted what I've tested so far .. after I get to work:
Steps to reproduce: Open the Alchemy crafting table (don't need to craft anything) Have the addon show your available traits to learn Press escape (It currently works) Open Inventory with I Split any item into two stacks Result: Escape bug Few things I've tested (I'll post more) 1. Its not the UI (I have it completely disabled) 2. Its for sure inside: local combinations = Alchemist.Algorithm.get_optimal_combinations(inventory, num_reagent_slots) --- I've debugged in the Algorithm quite a bit, but I need to dig deeper. I believe the bug happens with Alchemist once you've crafted and the item is being removed from your inventory (Hence the stack split bug). I'll update more when I have time, Thanks so much guys! |
Confirmed.
Try to change Code:
local function combinations(lst, n) |
Quote:
I seen the global newthing = {} and changed that to local earlier, I can't believe I have a global 'i' that is so lame. I'll report back after I update it. TYVM again! |
Quote:
Lua Code:
but still able to reproduce, I'll keep looking later tonight... ill refactor this area. |
Well, I did more. Maybe that was important, too.
Alchmist.xml is unused and I removed it from manifest. I used "AlchemistWindow" for LL config. I made setupAdditionalUI and combinations local and I removed unused global variable newthing. Afterwards the ESC lock you descripted was reproducable by adding/removing the local keyword. |
I tried this, but I don't get it, what is the "escape bug" that your trying to find?
What does it do? |
Quote:
Load up Alchemist Addon Have a low level toon (Or something that can discover new traits from alchemy) Put a bunch of herbs and flasks into your inventory. Open up the alchemy crafting table Craft 1 new item (Something that will discover a new trait) After a few seconds (Wait for the animations to complete) e.g. the tooltips/popups Close the "New trait popup alert" BAM... your keyboard is broken... you can press escape.. can't access the main escape options menu.. etc etc. Another Scenario: Load up Alchemist Addon Have a low level toon (Or something that can discover new traits from alchemy) Put a bunch of herbs and flasks into your inventory. Open up the alchemy crafting table DONT Craft anything Close the Alchemy table Open your inventory split any stack BAM Escape bug. This only happens once my above method is run. I'm off work, at the park with my girl... after we're done and I put them to bed I'm going to try the fixes mentioned above. -AB |
Quote:
You're fricken awesome... THANK YOU VERY MUCH!!! It's a combination of the globals, and the local i. Changing to local i alone didn't fix it, but once I moved all the external classes into 1 file and took it out of the global scope it DID FIX IT. So tonight, I'm grabbing the old build (Before the chat window implementation, with unicorn/list) and going to refactor. After I get the build stable again... I'll re-introduce removing unicorn and having a more stable scroll menu with better UI. Thank you everyone for the support, this was driving me nuts!!! |
All times are GMT -6. The time now is 08:05 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI