[ Bug ] Addon Manager: problem if multiple WBs are updated

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

[ Bug ] Addon Manager: problem if multiple WBs are updated

Post by Roy_043 »

If the Addon Manager automatically updates multiple workbenches the same package is used for all workbenches. So f.e. if the Curves WB and The Fasteners WB are updated, the Fasteners package is installed for both.

To test:
Install the Curves WB and the Fasteners WB.
Exit FreeCAD.
Edit:
C:\Users\name\AppData\Local\Temp\FreeCAD\Cache\AddonManager\PackageMetadata\Curves\package.xml
C:\Users\name\AppData\Local\Temp\FreeCAD\Cache\AddonManager\PackageMetadata\fasteners\package.xml

Change the version numbers to a lower version.
Restart FC.
In the AM press "Check for updates".
Press "Apply 2 update(s)".
Restart FC.
Result: warning:
During initialization the error ""'FastenersWorkbench' already exists."" occurred in C:\Users\name\AppData\Roaming\FreeCAD\Mod\fasteners\.\InitGui.py

Side note: the package.xml files are not updated after the operation.

@chennes can you have a look?

Code: Select all

OS: Windows 8.1 (6.3)
Word size of FreeCAD: 64-bit
Version: 0.20.28918 (Git)
Build type: Release
Branch: master
Hash: e1f2685734
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: Dutch/Netherlands (nl_NL)
Installed mods: 
kisolre
Veteran
Posts: 4162
Joined: Wed Nov 21, 2018 1:13 pm

Re: [ Bug ] Addon Manager: problem if multiple WBs are updated

Post by kisolre »

@chennes any ideas about that? I have several (8 WB + 1 macro) updates available and dont want to waste traffic sorting such issue later. Or should I just update them one by one as a workaround?

I also noticed that the item list is not properly updated? I have "Workbenches/update available" configuration and see the count on the Apply button rising but the list is not updated until I change its state to something else and back.
From the VM:

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.28936 (Git)
Build type: Release
Branch: master
Hash: b02705d79f2e1adc7773f0c845e0acc5ae8fde4b
Python 3.8.6+, Qt 5.15.2, Coin 4.0.1, OCC 7.5.3
Locale: Bulgarian/Bulgaria (bg_BG)
Attachments
UpdatesListDoesNotUpdateWhileChecking.JPG
UpdatesListDoesNotUpdateWhileChecking.JPG (107.24 KiB) Viewed 1019 times
User avatar
chennes
Veteran
Posts: 3877
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [ Bug ] Addon Manager: problem if multiple WBs are updated

Post by chennes »

(Sorry for the delay, I was traveling.)

Thanks for the detailed report, that was very helpful. I think I've isolated the multiple-WB update issue, and have a workaround for it:
https://github.com/FreeCAD/FreeCAD/comm ... ae8a03b803

I'm still chasing a couple of minor AM bugs, but I think that commit will fix the issues with trying to update multiple WBs at the same time, I was not appropriately handling some multi-threading issues. The current workaround is to just use a single thread for the updates, so they can't conflict with one another.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
chennes
Veteran
Posts: 3877
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [ Bug ] Addon Manager: problem if multiple WBs are updated

Post by chennes »

kisolre wrote: Fri May 27, 2022 7:22 pm I also noticed that the item list is not properly updated?
I am not seeing that (keep in mind that you are only showing WBs, and some of the available updates may be for macros) -- I'll take a look at the code to make sure there is a refresh implemented after the update check, though.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
kisolre
Veteran
Posts: 4162
Joined: Wed Nov 21, 2018 1:13 pm

Re: [ Bug ] Addon Manager: problem if multiple WBs are updated

Post by kisolre »

chennes wrote: Fri May 27, 2022 8:29 pm keep in mind that you are only showing WBs, and some of the available updates may be for macros)
kisolre wrote: Fri May 27, 2022 7:22 pm (8 WB + 1 macro)
Only 3 WB are shown.
User avatar
chennes
Veteran
Posts: 3877
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [ Bug ] Addon Manager: problem if multiple WBs are updated

Post by chennes »

kisolre wrote: Sat May 28, 2022 1:17 am Only 3 WB are shown.
Do you actually have to click something to get the others to show, or does moving the mouse over the window trigger it?
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
kisolre
Veteran
Posts: 4162
Joined: Wed Nov 21, 2018 1:13 pm

Re: [ Bug ] Addon Manager: problem if multiple WBs are updated

Post by kisolre »

chennes wrote: Sat May 28, 2022 1:21 am Do you actually have to click something to get the others to show,
I tried now moving the window, resizing the window, clicking in list area - no updates in the list. When Addon manager was started it was in Workbenches/Any state, properly displayed all workbenches. While the check was going I switched to Workbenches/Update available and the list emptied (no updates were found until then). Then tried above mentioned actions - list stayed empty until all check were finished and then updated.

Code: Select all

OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.20.28939 (Git)
Build type: Release
Branch: master
Hash: 4c2972cb2391ecad30f1015be8b67cae8a03b803
Python 3.8.6+, Qt 5.15.2, Coin 4.0.1, OCC 7.5.3
Locale: Bulgarian/Bulgaria (bg_BG)
Installed mods: 
  * 3DfindIT 1.2.0
  * A2plus 0.4.56
  * AirPlaneDesign 0.4.0
  * AnimationFreeCAD 1.0.0
  * ArchTextures
  * Assembly3 0.11.3
  * Assembly4 0.11.12
  * BIM 2021.12.0
  * BOLTSFC
  * CfdOF 1.16.4
  * CubeMenu
  * CurvedShapes 1.0.3
  * Curves 0.3.0
  * CycloidGearBox
  * Defeaturing
  * Design456
  * DesignSPHysics 0.6.1-2201-31-01
  * dodo
  * DynamicData 2.46.0
  * ExplodedAssembly
  * fasteners 0.3.41
  * FCGear 1.0.0
  * FCPDWorkbench 0.2.0
  * FEM_FrontISTR 0.1.0
  * frame
  * freecad.xray 2022.4.17
  * FreeCAD_mcm_addon
  * Help 1.0.0-alpha
  * InvGears 0.1.2
  * kicadStepUpMod 10.12.4
  * lattice2 1.0.0
  * Launcher
  * MakerWorkbench
  * Manipulator 1.4.3
  * Mechatronic
  * MeshRemodel 1.8919.0
  * MnesarcoUtils 0.1.0
  * Nikra-DAP
  * nurbs
  * OpticsWorkbench 1.0.8
  * ose-piping
  * parts_library
  * PlacementTools
  * Plot 2022.4.17
  * Pyramids-and-Polyhedrons
  * Reinforcement
  * Render 2022.1.0
  * Rocket 2.4.1
  * SearchBar 1.0.1
  * SelectorToolbar
  * sheetmetal 0.2.49
  * Ship 2022.4.11
  * Silk
  * SlopedPlanesMacro
  * StemfieWB
  * symbols_library
  * ThreadProfile 1.81.0
  * toSketch
  * Woodworking 1.0.0
  * workfeature
  * workfeature-macro
User avatar
chennes
Veteran
Posts: 3877
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [ Bug ] Addon Manager: problem if multiple WBs are updated

Post by chennes »

kisolre wrote: Sat May 28, 2022 10:03 am list stayed empty until all check were finished and then updated.
Oh, I must have misunderstood -- this sounds like the correct behavior. I am explicitly not refreshing that list on each individual update, if I do so it constantly recalculates and flickers, which is very annoying. There should be one single refresh at the end of the update. Is that what you are seeing?
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
kisolre
Veteran
Posts: 4162
Joined: Wed Nov 21, 2018 1:13 pm

Re: [ Bug ] Addon Manager: problem if multiple WBs are updated

Post by kisolre »

Yes, exactly. Maybe because of slow connection I was waiting too long and expecting the list to update.... If this is by design - no problem. I was just expecting different.
Post Reply