Bug 25558 - FreeCAD Arch workbench fails - dictionary changed size during iteration. Possibly pivy problem.
Summary: FreeCAD Arch workbench fails - dictionary changed size during iteration. Poss...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: x86_64 Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA7-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2019-10-13 12:25 CEST by Martin Morris
Modified: 2019-10-17 00:23 CEST (History)
7 users (show)

See Also:
Source RPM: python-pivy-0.6.4-1.mga7.src.rpm
CVE:
Status comment:


Attachments

Description Martin Morris 2019-10-13 12:25:59 CEST
Description of problem:

Selecting Arch Workbench gives "Workbench failure" dialog with text "dictionary changed size during iteration"

Terminal shows:

dictionary changed size during iteration
Traceback (most recent call last):
  File "<string>", line 32, in Initialize
  File "/usr/lib64/freecad/Mod/Draft/DraftTools.py", line 44, in <module>
    from DraftGui import todo, translate, utf8_decode
  File "/usr/lib64/freecad/Mod/Draft/DraftGui.py", line 2563, in <module>
    import DraftSnap
  File "/usr/lib64/freecad/Mod/Draft/DraftSnap.py", line 36, in <module>
    import FreeCAD, FreeCADGui, math, Draft, DraftGui, DraftTrackers, DraftVecUtils, itertools
  File "/usr/lib64/freecad/Mod/Draft/DraftTrackers.py", line 38, in <module>
    from pivy import coin
  File "/usr/lib64/python3.7/site-packages/pivy/__init__.py", line 30, in <module>
    from .coin import SoDB, SoNodeKit, SoInteraction
  File "/usr/lib64/python3.7/site-packages/pivy/coin.py", line 67214, in <module>
    for x in locals().values():

Version-Release number of selected component (if applicable):

freecad-0.18.2-1.mga7

How reproducible:

Every time

Steps to Reproduce:
1. Start FreeCAD from GUI or in a terminal
2. Select Arch Workbench from dropdown menu
3. Observe error messages

Additional information:

In the Python console, importing pivy gives:

>>> import pivy
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/usr/lib64/python3.7/site-packages/pivy/__init__.py", line 30, in <module>
    from .coin import SoDB, SoNodeKit, SoInteraction
  File "/usr/lib64/python3.7/site-packages/pivy/coin.py", line 67214, in <module>
    for x in locals().values():
RuntimeError: dictionary changed size during iteration
>>>
Comment 1 David GEIGER 2019-10-13 18:24:00 CEST
Please test new updated python-pivy-0.6.5a2-1.mga7 in Core/Updates_testing repo!

CC: (none) => geiger.david68210

Comment 2 Martin Morris 2019-10-13 22:18:15 CEST
Thank you for your quick response.

New package installed from Core Updates Testing. Verified:

$ rpm -qif /usr/lib64/python3.7/site-packages/pivy/
Name        : python3-pivy
Version     : 0.6.5a2
Release     : 1.mga7
Architecture: x86_64
Install Date: Sun 13 Oct 2019 20:46:11 BST
Group       : Development/Python
Size        : 26228284
License     : BSD
Signature   : RSA/SHA256, Sun 13 Oct 2019 13:58:55 BST, Key ID b742fa8b80420f66
Source RPM  : python-pivy-0.6.5a2-1.mga7.src.rpm
Build Date  : Sun 13 Oct 2019 12:23:03 BST
Build Host  : localhost
Relocations : (not relocatable)
Packager    : daviddavid <daviddavid>
Vendor      : Mageia.Org
URL         : https://github.com/FreeCAD/pivy
Summary     : Pivy is a Coin binding for Python 3
Description :
Pivy is a Coin binding for Python3. Coin is a high-level 3D graphics
library with a C++ Application Programming Interface. Coin uses
scene-graph data structures to render real-time graphics suitable for
mostly all kinds of scientific and engineering visualization applications.

Bug in FreeCAD remains the same. Still get dictionary changed size error when selecting Arch Workbench, and the Python console gives:

>>> import pivy
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/usr/lib64/python3.7/site-packages/pivy/__init__.py", line 30, in <module>
    from .coin import SoDB, SoNodeKit, SoInteraction
  File "/usr/lib64/python3.7/site-packages/pivy/coin.py", line 67214, in <module>
    for x in locals().values():
RuntimeError: dictionary changed size during iteration
>>>
Comment 3 David GEIGER 2019-10-14 04:54:12 CEST
ok, and now with python-pivy-0.6.5a2-1.1.mga7?
Comment 4 Martin Morris 2019-10-14 11:04:51 CEST
That seems to have fixed it.

import pivy now works without errors, both in a standalone Python 3 console and the FreeCAD Python console.

All FreeCAD built-in workbenches load without errors.

I also tried the external A2plus workbench which uses pivy and that now loads successfully.
Comment 5 Lewis Smith 2019-10-14 11:53:18 CEST
Thank you Martin for the report, and so quickly testing the solution.

@David, once again a problem solved as soon as reported!
Is this good for a regular update, being already in core/updates_testing ? Assigning to QA (see c3), but it needs an advisory please.

Confused by the package nomenclature:
 $ urpmq -i python-pivy        no such package
 $ urpmq -i python3-pivy       shows it
 Name        : python3-pivy
Note that it seems intimately related to FreeCAD:
 Source RPM  : python-pivy-0.6.4-1.mga7.src.rpm
 URL         : https://github.com/FreeCAD/pivy

CC'ing for info Shlomi as the python-pivy SRPM maintainer.

Source RPM: freecad-0.18.2-1.mga7.src.rpm => python-pivy-0.6.4-1.mga7.src.rpm
Assignee: bugsquad => qa-bugs
CC: (none) => lewyssmith, shlomif

Comment 6 David GEIGER 2019-10-14 12:04:44 CEST

Advisory:
========================

Our current python3-pivy is a quite old and also not compatible with current freecad package and with Python3.
So this updates python3-pivy to a more recent and supported upstream release.

Note that the python2-pivy package is no more provided as it is not required by anything and also due to a collision between py2 and py3.

========================

Packages in 7/core/updates_testing:
========================
python3-pivy-0.6.5a2-1.1.mga7.i586.rpm
python3-pivy-0.6.5a2-1.1.mga7.x86_64.rpm

Source RPM: 
========================
python-pivy-0.6.5a2-1.1.mga7.src.rpm
Comment 7 Morgan Leijström 2019-10-15 10:29:54 CEST
Thank you Martin and David :)

I confirm seeing the same problem, and after installing python-pivy-0.6.5a2-1.mga7 workbench load OK.

( First i got stumped to see the "Complete" workbench show *no* tools, but that is by design now in later versions: https://www.freecadweb.org/wiki/Complete_Workbench )

Whiteboard: (none) => MGA7-64-OK
CC: (none) => fri

Comment 8 Thomas Andrews 2019-10-16 21:51:11 CEST
Well then, looks like enough tests for validation to me. Advisory in Comment 6.

CC: (none) => andrewsfarm, sysadmin-bugs
Keywords: (none) => validated_update

Thomas Backlund 2019-10-16 23:40:34 CEST

Keywords: (none) => advisory
CC: (none) => tmb

Comment 9 Mageia Robot 2019-10-17 00:23:51 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2019-0164.html

Resolution: (none) => FIXED
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.