Log in to ZYGOR
Log in with social media
OR
Log in with Zygor account

Announcement

Collapse
No announcement yet.

Memory leak with Zygor and Bagnon

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Memory leak with Zygor and Bagnon

    There is a memory leak and WTF SavedVariable leak with Zygor Retail and Bagnon.
    It only happens if the gear suggestion module is loaded. What is happening is that Zygor is writing all bag changes in the WTF file for Zygor. I was able to find this out by debugging Zygor with Bagnon loaded. I cleared WTF file as it was 3 gb on 10/28 and after one day it was already up to 1.5gb.
    SS of Zygor WTF File:
    ZygorWTFVarSize.JPG
    WTF SavedVar without Bagnon: https://drive.google.com/file/d/12y9...LOZR-bgay/view
    7zip file of the 1.5gb WTF SavedVar with Bagnon (even .zip was 50+ mb, but 7zip is a small 1MB): https://drive.google.com/file/d/1SrV...RAz9zjhkT/view
    Last edited by pandabear41; October 30, 2022, 12:00 AM.

    #2
    If you disable Bagnon do you get the memory leak with only Zygor enabled?
    Become a Fan of Zygor Guides on Facebook:
    http://www.facebook.com/pages/Zygor-...04933799556988

    Follow Zygor Guides on Twitter:
    http://twitter.com/zygorguides

    Comment


      #3
      No.
      Memory leak is only present with Zygor and Bagnon. Bagnon SavedVar is super small. The only large file and addon that has huge memory usage is ZygorGuidesViewer.

      All the Scenarios I tested.
      • Zygor enabled, Bagnon disabled: No leak, Zygor SavedVar is about 6mb.
      • Zygor enabled, Bagnon enabled: Leak, Zygor SavedVar 1-4gb in size.
      • Zygor enabled, Zygor setting gear advisor disabled, Bagnon enabled: No leak, Zygor SavedVar is about 4-10mb.
      • Zygor diabled, Bagnon enabled: No leak.
      Last edited by pandabear41; October 29, 2022, 11:56 PM.

      Comment


        #4
        Got the same issue. Every time I exit the WoW client it creates a 21GB file. I saw this as I were doing a backup of my WTF dir.


        This has to be addressed post haste.
        Last edited by mxrender; October 30, 2022, 12:28 PM.

        Comment


          #5
          If there is no memory leak when it is Zygor only there is nothing for us to fix. Bagnon is obviously still having some issues as can be seen by simply looking at the posts on the Bagnon curseforge page.
          Become a Fan of Zygor Guides on Facebook:
          http://www.facebook.com/pages/Zygor-...04933799556988

          Follow Zygor Guides on Twitter:
          http://twitter.com/zygorguides

          Comment


            #6
            This is 100% a problem with Zygor due to poor code reviews or QA. There is still a memory leak with other addons too and vanilla WOW. I have fixed and even non addon it saves tons of space in SavedVariables and speeds up addon on reload.
            I would normally submit via ticket, but the email ticket submission is broken. I know yall are probably pissed for me analyzing code as I have seen in discord, but I don't care. I want the highest quality plugin, because I pay for it and others should get it too.

            Biggest problem is you store a whole UI frame into SavedVariables for no reason whatsoever. So changing a db.lastParent to a local var. Saves about 800MB per character with Bagnon and 2-5MB per character with no addons.
            File InventoryManager.lua
            New Lines
            L19
            Code:
            local lastParent
            Update Lines
            L137
            Code:
            lastParent = ContainerFrame1
            L382
            Code:
            lastParent = parent
            L387
            Code:
            lastParent = nil
            L449
            Code:
            lastParent = ZGV.Frame
            L460
            Code:
            lastParent = ContainerFrame1
            L475
            Code:
            lastParent = ARKINV_Frame1
            L507
            Code:
            lastParent = OneBagFrame
            L685
            Code:
            if frame and lastParent == frame then
            L695
            Code:
            if db.isSnapped and lastParent == frame then
            Second problem is you save UIParent to DB and never clear it out, this wastes many MBs of memory and SavedVariables (about 400MB per character with bagnon)
            We will add some_frame_anchor[2]=nil to clear out UIParent out of db.
            File Options.lua

            On L3784 change to
            Code:
            local fPos = ZGV.db.profile.frame_anchor
            fPos[2] = UIParent
            ZGV.Frame:GetParent():SetPoint(unpack(fPos))
            Few lines down to L3803 there is a syntax error and you saving UI Parent to DB.
            Change whole set of lines to
            Code:
            local fPos = ZGV.db.profile.gold_anchor
            fPos[2] = UIParent
            ZGV.Gold.FUI:SetPoint(unpack(fPos))
            File ZygorGuidesViewer.lua
            On L497 change to
            Code:
            local fPos = self.db.profile.frame_anchor
            fPos[2] = UIParent
            self.Frame:GetParent():SetPoint(unpack(fPos))
            File Goal.lua
            On L2330 change to
            Code:
            local fPos = ZGV.db.profile.goalpopup_frame_anchor
            fPos[2] = UIParent
            ZGV.GoalPopupImageFrame:SetPoint(unpack(fPos))
            File InventoryManager.lua
            On L66 change to
            Code:
            local fPos = ZGV.db.profile.frame_anchor_prevendor
            fPos[2] = UIParent
            ZGV.Frame:GetParent():SetPoint(unpack(fPos))

            EDIT: Actually you should never store UIParent in db. In some cases it doesn't erase if the SetPoint fails or client crashes. Just put into a local var.
            EDIT 2: Found another frame_anchor in InventoryManager.lua
            Last edited by pandabear41; October 30, 2022, 07:09 PM.

            Comment


              #7
              Still waiting for some movement on this issue because this is getting ridiculous at this point. If nothing is done soon I'm going to vote with my wallet and unsubscribe until this has been fixed.

              Work with the Bagnon dev(s) and resolve this, please.

              zygor hyper-large file.png

              Comment


                #8
                The dev team are looking at this but I do not have an ETA.
                Become a Fan of Zygor Guides on Facebook:
                http://www.facebook.com/pages/Zygor-...04933799556988

                Follow Zygor Guides on Twitter:
                http://twitter.com/zygorguides

                Comment


                  #9
                  Originally posted by mxrender View Post
                  Still waiting for some movement on this issue because this is getting ridiculous at this point. If nothing is done soon I'm going to vote with my wallet and unsubscribe until this has been fixed.

                  Work with the Bagnon dev(s) and resolve this, please.

                  zygor hyper-large file.png

                  It's not a bagnon problem though. Zygor client saves some worthless data. Zygor should never save certain data structures to a SavedVariable. Zygor should still fix.
                  It works fine for my local modified code with the fixes I identified, but not everyone wants to change. After my changes Zygor's has been the fastest it has ever been, 100-400mb of game memory, 10mb top for SavedVariables, /reloads super fast, and guide viewer doesn't have any lag anymore.

                  Comment


                    #10
                    Originally posted by ZG Support 1 View Post
                    The dev team are looking at this but I do not have an ETA.
                    Why is this taking so long?

                    pandabear41 has provided a very detailed explanation and a fix. Release a BETA build to be tested by the community as the current QA process doesn't seem to work.

                    Side note: The creation of this absurdly huge and unnecessary TMP file also seems to be crashing the WoW client when used with MerathilisUI. And before you ask, yes, I have deleted the Zygor files from the WTF folders and reinstalled.

                    Comment


                      #11
                      I can confirm this issue, the combination from Zygor and my ElvUI_MerathilisUI (plugin for ElvUI) causes also an game freeze which results in a crash on log out.

                      Comment


                        #12
                        I do believe this issue is happening with multiple addons since pre-patch came out. The game will lag, freeze & even crash sometimes when attempting to log out. It only happens when I have Zygor enabled, disable it & there are no issues.
                        Last edited by jneumann1; November 2, 2022, 08:47 AM.

                        Comment


                          #13
                          I can also confirm this issue with Merathilis UI Which i use on a daily basis,after the prepatch went live,i was also experiencing the game crashes that merathilis has mentioned also the other users here as well,i was wondering what it could be,but it seems to be found it is actually zygor guides at fault here,which they must address and get fixed,as we all pay for zygor guides,so we expect a complete working product,zygor guides are also Very memory intensive indeed,but thats another issue.Please Zygor address the issues with merathilisui as we now know what is causing the desktop crashes with the wow client for retail wow.

                          Comment


                            #14
                            This is fixed in the code and will be in the next update we send out.
                            Become a Fan of Zygor Guides on Facebook:
                            http://www.facebook.com/pages/Zygor-...04933799556988

                            Follow Zygor Guides on Twitter:
                            http://twitter.com/zygorguides

                            Comment


                              #15
                              Originally posted by ZG Support 1 View Post
                              This is fixed in the code and will be in the next update we send out.
                              On first testing this seems to have been resolved in version 8.1.27896 for now.
                              Last edited by kodewulf; November 3, 2022, 04:55 AM.

                              Comment

                              Working...
                              X