Ticket #4186: hang on union of objects

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
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Ticket #4186: hang on union of objects

Post by Kunda1 »

Discussion thread for issue #4186: hang on union of objects
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #4186: hang on union of objects

Post by Kunda1 »

I can reproduce by
loading the file
switching to Part WB
Highlighting 'array' and 'cut' in the tree
Running Part_Union
Result: FC just hangs. Also I can't exit the operation.
Starting FC from the terminal shows no errors or output that indicates FC is having issues.

OS: Manjaro Linux (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23237 (Git)
Build type: Release
Branch: master
Hash: 71726a11d0844f263dad636fb98bb996a479e007
Python version: 3.8.6
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Ticket #4186: hang on union of objects

Post by kisolre »

Those are 1600 unfused overlapping cylinders... Cut with a half sphere... What is a reasonable timeframe for that? If I set Number polar to 4 (16 copies) everything works as expected.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #4186: hang on union of objects

Post by Kunda1 »

kisolre wrote: Tue Dec 08, 2020 10:39 pm Those are 1600 unfused overlapping cylinders... Cut with a half sphere... What is a reasonable timeframe for that? If I set Number polar to 4 (16 copies) everything works as expected.
lol, good point. Nevertheless, it would be nice to know what's going on though and to be able to cancel the operation.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Ticket #4186: hang on union of objects

Post by kisolre »

1.1 GB of RAM and 1 core at 100%. Looks like OCC has control now and unless there is some mechanism there to check the outer world from time to time I don't see how can that be monitored/canceled.
I will wait to see if and when will that finish.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #4186: hang on union of objects

Post by Kunda1 »

kisolre wrote: Wed Dec 09, 2020 6:07 pm I will wait to see if and when will that finish.
Is it still running?? :lol: :lol: :lol:
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Ticket #4186: hang on union of objects

Post by kisolre »

Nah, 13h were enough. Since there was no notable change in used memory I had no way to distinguish if something was happening or it was stuck in some infinite loop. I thought to make an experiment and increase copies, record times for recalculation and make a prediction for the expected time but did not... yet :)
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #4186: hang on union of objects

Post by Kunda1 »

kisolre wrote: Fri Dec 11, 2020 1:17 pm Nah, 13h were enough. Since there was no notable change in used memory I had no way to distinguish if something was happening or it was stuck in some infinite loop. I thought to make an experiment and increase copies, record times for recalculation and make a prediction for the expected time but did not... yet :)
13h ?!? Jeebuz!
To you knoweldge, are there other OCC commands that FC monitors for this type of response and offers another solution for this type of behavior?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Ticket #4186: hang on union of objects

Post by kisolre »

Kunda1 wrote: Fri Dec 11, 2020 1:55 pm To you knoweldge, are there other OCC commands that FC monitors for this type of response and offers another solution for this type of behavior?
My knowledge is quite limited here :D But I hear that it is bad practice if some task is expected to take a lot of time to not provide a means to monitor/cancel it. Since OCC is at 7.5.0 now and is highly computation intensive one would expect such mechanism to exist and to be readily exposed in the docs.
FreeCAD has such mechanism to cancel the recompute, which I assume works between OCCT operation. Shouldn't there be also such mechanism in OCCT?
chrisb
Veteran
Posts: 54288
Joined: Tue Mar 17, 2015 9:14 am

Re: Ticket #4186: hang on union of objects

Post by chrisb »

The union would be invalid anyway, so I started with setting Fuse=true, alas, with a similar result. I forgot the running process, until my browser told me to close, because the system was running out of memory.

However, from what I see, this is not a bug, the task is simply too complex to be finished within a reasonable time and space frame.

So I would either close change the ticket to a feature request: "Implement a possibility to cancel long running tasks".

Perhaps such ticket exists already, at least it was discussed before.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply