Addon Manager hangs Freecad

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!
NuriEv
Posts: 31
Joined: Thu Jun 18, 2020 10:02 pm

Addon Manager hangs Freecad

Post by NuriEv »

I tend to think that it's likely a result of some weirdness in my setup. Yet I'd like to know if anyone has run into this condition.

Addon manager hangs before it gets done checking the repository, i.e., it becomes unresponsive. Clicking on "Close" for example, crashes and terminates Freecad altogether.

At the point where it hangs, the last message would be
"Getting metadata from macro" ... Dxf to Shape. ... Compund Plus... etc.

This is repeatable every time I try.

Thanks to all for looking at this.

Code: Select all

OS: Debian GNU/Linux 11 (bullseye) (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.21.30988 (Git) AppImage
Build type: Release
Branch: master
Hash: 0679c40d26ab2f48ca0f8cd0c34ac3bdbdacec54
Python 3.10.6, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * Curves 0.5.11
  * Manipulator 1.4.9
  * Silk 1.0.0
  * BIM 2021.12.0
  * Help 1.0.3
  * workfeature
  * CADExchanger
  * parts_library
  * ose-piping
  * Render.backup1663790588.0453942 2022.2.0 (Disabled)
  * Estimate 0.1.2
  * slic3r-tools
  * Ship 2022.4.11
  * Marz 0.0.26-alpha
  * ArchTextures
  * CurvedShapes 1.0.4
  * POV-Ray-Rendering
  * nurbs
  * MeshRemodel 1.8919.0
  * FEMbyGEN 1.1.0
  * workfeature-macro
  * Render 2022.2.0
User avatar
chennes
Veteran
Posts: 3879
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager hangs Freecad

Post by chennes »

Can you tell FreeCAD to show log messages in Report View and post the output here?
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
NuriEv
Posts: 31
Joined: Thu Jun 18, 2020 10:02 pm

Re: Addon Manager hangs Freecad

Post by NuriEv »

Thanks for looking

Booting Freecad after an "Addon manager" crash, the report view displays:

Code: Select all

10:54:24  NOTICE: Addon "/home/ev/.local/share/FreeCAD/Mod/Render.backup1663790588.0453942" disabled by presence of ADDON_DISABLED stopfile
10:54:40  Recent macros : keyboard shortcut 1 disabled because conflicting with Std_ViewFront
10:54:40  Recent macros : keyboard shortcut 2 disabled because conflicting with Std_ViewTop
10:54:40  Recent macros : keyboard shortcut 3 disabled because conflicting with Std_ViewRight
The contents of the ADDON_DISABLED stopfile is:

Code: Select all

This is a backup of an addon that failed to update cleanly so was re-cloned. It was disabled by the Addon Manager's git update facility and can be safely deleted if the addon is working properly.
Please let me know how to get other possibly useful info when necessary.
User avatar
chennes
Veteran
Posts: 3879
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager hangs Freecad

Post by chennes »

That output is normal: can you launch the Addon Manager and screenshot the last few lines?
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
NuriEv
Posts: 31
Joined: Thu Jun 18, 2020 10:02 pm

Re: Addon Manager hangs Freecad

Post by NuriEv »

The first shot is the frozen state after about 20min. of wait.
Addon_Freeze_20221126_180925.jpeg
Addon_Freeze_20221126_180925.jpeg (455.44 KiB) Viewed 1144 times
The second shot has some info about the status of the addon manager.
Process_Status_20221126_181156.jpeg
Process_Status_20221126_181156.jpeg (185.28 KiB) Viewed 1144 times
Thirrd is the crash message after closing via the app ui.
Addon_Crash_20221126_180925.jpeg
Addon_Crash_20221126_180925.jpeg (432.82 KiB) Viewed 1144 times
Thanks again.
User avatar
chennes
Veteran
Posts: 3879
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager hangs Freecad

Post by chennes »

It doesn’t look like log messages are showing in Report View: the Addon Manager is very verbose :). I am not at a computer right now so I can’t tell you the exact path to the setting. No need to wait 20 minutes, the process that is hanging should have gotten killed after 30 seconds of inactivity.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
NuriEv
Posts: 31
Joined: Thu Jun 18, 2020 10:02 pm

Re: Addon Manager hangs Freecad

Post by NuriEv »

Waiting could have addressed possible latency issues on the git side, and/or elsewhere. Just to cover a probability to some degree.

Anyway the state of hang here, seems to be an endless loop, and it doesn't seem to trigger a kill. I don't know whether there are any error checking for this sort of thing (connection latencies, timeout, whatever) in the code. Unfortunately I probably don't have the skills to track down such particulars in the source.

I'll try earlier appimage builds that have the newer addon manager version. I'll also try different Linux installs.

Thanks for looking, Chris.
NuriEv
Posts: 31
Joined: Thu Jun 18, 2020 10:02 pm

Re: Addon Manager hangs Freecad

Post by NuriEv »

Results are identical for the last few builds of 0.2.1.

Command line start and output:

Code: Select all

FreeCAD 0.21, Libs: 0.21R31097 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre and others 2001-2022
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.
FreeCAD wouldn't be possible without FreeCAD community.
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

During initialization the error "[Errno 13] Permission denied: ''" occurred in /home/ev/.local/share/FreeCAD/Mod/CADExchanger/Init.py
Please look into the log file for further information
NOTICE: Addon "/home/ev/.local/share/FreeCAD/Mod/Render.backup1663790588.0453942" disabled by presence of ADDON_DISABLED stopfile
FEMbyGEN Workbench loaded
/home/runner/work/FreeCAD-Bundle/FreeCAD-Bundle/conda/linux/AppDir/usr/share/libdrm/amdgpu.ids: No such file or directory
NOTICE: Addon "/home/ev/.local/share/FreeCAD/Mod/Render.backup1663790588.0453942" disabled by presence of ADDON_DISABLED stopfile
Recent macros : keyboard shortcut 1 disabled because conflicting with Std_ViewFront
Recent macros : keyboard shortcut 2 disabled because conflicting with Std_ViewTop
Recent macros : keyboard shortcut 3 disabled because conflicting with Std_ViewRight
Addon Manager: Unexpected 0 response from server
Traceback (most recent call last):
  File "/tmp/.mount_FreeCAEX7Xse/usr/Mod/AddonManager/addonmanager_workers_startup.py", line 902, in run
    self.macro.fill_details_from_wiki(url)
  File "/tmp/.mount_FreeCAEX7Xse/usr/Mod/AddonManager/addonmanager_macro.py", line 274, in fill_details_from_wiki
    code = self._fetch_raw_code(p)
  File "/tmp/.mount_FreeCAEX7Xse/usr/Mod/AddonManager/addonmanager_macro.py", line 328, in _fetch_raw_code
    ).format(self.raw_code_url)
KeyError: 'rawcodeurl'
After Killing Freecad following the crash:

Code: Select all

/tmp/.mount_FreeCAEX7Xse/AppRun: line 43: 327525 Killed                  ${MAIN} "$@"
User avatar
chennes
Veteran
Posts: 3879
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Addon Manager hangs Freecad

Post by chennes »

Oh, that helps a lot, thanks. It looks like one of the macros being fetched has a bad URL in it, and then my error-handling code has a bug that is crashing the process when that happens. I'll push a fix to the error handling in a minute here, and then we can track down which macro has the bad URL.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
NuriEv
Posts: 31
Joined: Thu Jun 18, 2020 10:02 pm

Re: Addon Manager hangs Freecad

Post by NuriEv »

Thank you Chris.
You guys rock, and much appreciated.
Post Reply