(solved) FreeCAD 0.18: Bug delete Part

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
user1234
Veteran
Posts: 3512
Joined: Mon Jul 11, 2016 5:08 pm

(solved) FreeCAD 0.18: Bug delete Part

Post by user1234 »

Hello!

I possibly found a very, very small bug.

When i delete the Part in this file (yes, PartDesign and Part mixed), the FreeCAD window freezes (but not the menu).

Code: Select all

FC++ exception thrown (basic_string::_M_construct null not valid)Traceback (most recent call last):
  File "<string>", line 1, in <module>
<class 'Base.FreeCADError'>: FC++ exception thrown (basic_string::_M_construct null not valid)
When i delete all bodies one by one, i only get errors that FreeCAD does not find the origins.

Version

Code: Select all

OS: Debian GNU/Linux buster/sid
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15640 (Git)
Build type: Release
Branch: master
Hash: d94fc4988e2d26ea9ef65b09cc84f1f287411181
Python version: 3.7.2
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Sorry for bad english
Greetings
user
Attachments
error.FCStd
(32.15 KiB) Downloaded 17 times
Last edited by user1234 on Wed Jan 16, 2019 6:30 am, edited 1 time in total.
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: FreeCAD 0.18: Bug delete Part

Post by wmayer »

I possibly found a very, very small bug.
I disagree that its a small bug, IMO it's a critical one.

The problem with the current implementation is that due to use of a std::set the order of removal can become arbitrary (the sort criterion is the memory address) and in case the Group object comes before the Helix objects we run into a double destruction. Especially if Undo/Redo is disabled the objects will be destroyed immediately and thus will create dangling pointers.

With git commit 6e5369da3 this should be fixed.
user1234
Veteran
Posts: 3512
Joined: Mon Jul 11, 2016 5:08 pm

Re: FreeCAD 0.18: Bug delete Part

Post by user1234 »

Hello!
wmayer wrote: Tue Jan 15, 2019 11:41 pm With git commit 6e5369da3 this should be fixed.
Thank you for the extreme fast fix! It works.

Greetings
user
Post Reply