[Bug] Addon manager caches pictures based on filenames

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
suzanne.soy
Posts: 54
Joined: Sat Dec 19, 2020 11:55 pm

[Bug] Addon manager caches pictures based on filenames

Post by suzanne.soy »

If two addons have a README.md which embed images with the same name, then the first image to be loaded will be

Screenshot of the SearchBar addon viewed after CADExchanger was previously viewed, it shows the screenshot.png from CADExchanger but should show the screenshot.png from SearchBar.

To reproduce this, click on CADExchange, then add https://github.com/SuzanneSoy/SearchBar as a repository as shown in this screenshot, then click on SearchBar.

Can someone confirm this bug so that I may report it on the official bug tracker? Thanks :)
TheMarkster wrote: Sun Oct 17, 2021 12:53 am Image
:?: Please mark your posts as [solved] :!:
:idea: If the answer you got is a good fit for the wiki, you can edit it!
FreeCAD modelling & coding workbenches+macros: twitch GitHub
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: [Bug] Addon manager caches pictures based on filenames

Post by kisolre »

Since you did not post your version info I assume 0.19.3? In the dev versions the addon manager has a complete redesign so things look quite different. Not sure if someone would tackle that for an eventual 0.19.4 bugfix build if it is too much work.

Addon Manager Redesign 2021
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: [Bug] Addon manager caches pictures based on filenames

Post by kisolre »

Now it looks like this:
.
SearchBar.JPG
SearchBar.JPG (165.75 KiB) Viewed 1315 times
User avatar
chennes
Veteran
Posts: 3906
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [Bug] Addon manager caches pictures based on filenames

Post by chennes »

Actually, that's sort of strange: the original code is still used in the new AddonManager, and the line in question is here: https://github.com/FreeCAD/FreeCAD/blob ... rs.py#L624

It should be adding the workbench name to the filename, so you shouldn't have any name collisions.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
aapo
Posts: 620
Joined: Mon Oct 29, 2018 6:41 pm

Re: [Bug] Addon manager caches pictures based on filenames

Post by aapo »

I don't know if this is related or not, but immediately after updating 7 addons with the button on bottom, the list grew to 8 addons (but there are only 7), and most of them are "ThreadProfile" with icons from other workbenches. Oddly, triggering an update or restarting FreeCAD did not help, and I continued to have several "ThreadProfile" workbenches, and other addons (e.g. Assembly4) were not available in the FreeCAD workbench selection even though they were installed. I also got errors about that in the Report View:

Code: Select all

09:36:59  During initialization the error ""'ThreadProfileWorkbench' already exists."" occurred in C:\Users\aapol\AppData\Roaming\FreeCAD\Mod\Assembly4\.\InitGui.py
09:36:59  Please look into the log file for further information
09:37:00  During initialization the error ""'ThreadProfileWorkbench' already exists."" occurred in C:\Users\aapol\AppData\Roaming\FreeCAD\Mod\Curves\.\InitGui.py
09:37:00  Please look into the log file for further information
09:37:00  During initialization the error ""'ThreadProfileWorkbench' already exists."" occurred in C:\Users\aapol\AppData\Roaming\FreeCAD\Mod\Render\.\InitGui.py
09:37:00  Please look into the log file for further information
09:37:01  During initialization the error ""'ThreadProfileWorkbench' already exists."" occurred in C:\Users\aapol\AppData\Roaming\FreeCAD\Mod\sheetmetal\.\InitGui.py
09:37:01  Please look into the log file for further information
20220215 Addon Manager Oddity pic01.png
20220215 Addon Manager Oddity pic01.png (55.79 KiB) Viewed 1095 times
20220215 Addon Manager Oddity pic02.png
20220215 Addon Manager Oddity pic02.png (55.07 KiB) Viewed 1095 times

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.27518 (Git)
Build type: Release
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: English/United Kingdom (en_GB)
aapo
Posts: 620
Joined: Mon Oct 29, 2018 6:41 pm

Re: [Bug] Addon manager caches pictures based on filenames

Post by aapo »

Hmm, this does not seem to be simply a picture caching problem, as the Addon Manageer now claims it has installed the ThreadProfile workbench into Assembly4 directory (see picture).

20220215 Addon Manager Oddity pic03.png
20220215 Addon Manager Oddity pic03.png (12.24 KiB) Viewed 1090 times
User avatar
chennes
Veteran
Posts: 3906
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [Bug] Addon manager caches pictures based on filenames

Post by chennes »

Yeah, it looks more like a rendering bug, where it's showing the info for a different addon. I'll look into it.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Post Reply