[FIXED] Freecad crashes when revolving

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!
le_avion
Posts: 5
Joined: Mon Oct 12, 2020 4:09 am

[FIXED] Freecad crashes when revolving

Postby le_avion » Tue Oct 13, 2020 11:33 pm

I have run into a scenario that crashes FreeCAD very reliably..

In order to reproduce it all I have to do is create a simple sketch and try to revolve it by selecting any line or face in the sketch,
and then In the "Revolution parameters" dialog box, in the Axis drop-down, I select "Select reference...". This results in a crash every single time.

Can anyone else reproduce it? Note that while I tested V 0.18 in POP_OS and V 0.19 in Ubuntu, both are based on Ubuntu 20.04 LTS so I wonder if this can be reproduced in any other version, Ubuntu or otherwise. Also note that under POP_OS I installed from a flatpack while in Ubuntu I used the snap.

I tested it with POP_OS! 20.04 LTS (V0.18):

OS: KDE Flatpak runtime
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14555 (Git shallow)
Build type: Release
Branch: (HEAD detached at 783e134)
Hash: 783e1346c7a078f5265c3f0c6a927d09a8c1fe70
Python version: 3.7.4
Qt version: 5.14.2
Coin version: 4.0.0
OCC version: 7.3.0
Locale: English/United States (en_US)


And Ubuntu 20.04 LTS (V 0.19):

OS: Ubuntu Core 16 (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22133 (Git)
Build type: Unknown
Branch: master
Hash: a6df94e37fb4f6595b4674600c22a2e31a56e0a0
Python version: 3.5.2
Qt version: 5.5.1
Coin version: 4.0.0a
OCC version: 7.4.0
Locale: English/UnitedStates (en_US)
Last edited by Kunda1 on Sun Feb 07, 2021 1:22 pm, edited 1 time in total.
Reason: Added [Fixed] to thread title
jmaustpc
Posts: 11006
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Freecad crashes when revolving

Postby jmaustpc » Wed Oct 14, 2020 1:23 am

Your first post, welcome to FreeCAD. :)

I tired making a few random PartDesign workbench rotations. No crash here.
le_avion wrote: Tue Oct 13, 2020 11:33 pm In order to reproduce it all I have to do is create a simple sketch and try to revolve it by selecting any line or face in the sketch,
and then In the "Revolution parameters" dialog box, in the Axis drop-down, I select "Select reference...". This results in a crash every single time.
Can you provide more information about exactly what you did? Are you saying that you tried to select your Revolution axis reference from the same sketch that holds the profile?"

Jim


OS: Ubuntu 18.04.5 LTS (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22670 (Git)
Build type: Unknown
Branch: master
Hash: 12155f4aab09047c5697db0c1b3cf93b02edda03
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)

Also checked in FreeCAD from today's PPA.
le_avion
Posts: 5
Joined: Mon Oct 12, 2020 4:09 am

Re: Freecad crashes when revolving

Postby le_avion » Wed Oct 14, 2020 4:28 am

jmaustpc wrote: Wed Oct 14, 2020 1:23 am
Can you provide more information about exactly what you did? Are you saying that you tried to select your Revolution axis reference from the same sketch that holds the profile?"
That's exactly what I did. I selected an axis reference from the same sketch. Probably doesn't make sense, but I just started learning FreeCAD (or any CAD software for that matter) and I was just trying to find my way around when suddenly FreeCAD disapeared on me (i.e. crashed). Tried it few times to make sure I can repeat it.
chrisb
Posts: 34488
Joined: Tue Mar 17, 2015 9:14 am

Re: Freecad crashes when revolving

Postby chrisb » Wed Oct 14, 2020 5:36 am

Can you please upload the file?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
le_avion
Posts: 5
Joined: Mon Oct 12, 2020 4:09 am

Re: Freecad crashes when revolving

Postby le_avion » Wed Oct 14, 2020 5:53 am

chrisb wrote: Wed Oct 14, 2020 5:36 am Can you please upload the file?
Done.

The order is important. You have to select a line or a face and only then chose the "Select reference..." from the dropdown.
Attachments
simple sketch.FCStd
Sample file I used to recreate crashing.
(5.01 KiB) Downloaded 29 times
jmaustpc
Posts: 11006
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Freecad crashes when revolving

Postby jmaustpc » Wed Oct 14, 2020 11:21 am

le_avion wrote: Wed Oct 14, 2020 5:53 am a line or a face
I suspect you mean either an Axis or Plane? Lines and faces refer to geometry not the axis system.

Now that I have your file I can see that you are talking about a sketch ... within a Body... using PartDesign WB.

If I select your sketch in Treeview, then click on PartDesign "Revolve a sketch" then select any axis then select an axis ...no crash here. I tried all combinations and orders of selection even the non-valid ones...still no crashes here.

If you were on a standard Ubuntu 20.04 (your varieties may well work fine as well) then I would just install FreeCAD-Daily from the "daily PPA". If that works then it may well indicate a packaging issue with those other "less commonly used on Ubuntu" packages.
le_avion wrote: Tue Oct 13, 2020 11:33 pm while in Ubuntu I used the snap
Also, which snap from where? There were at least two attempts to get snap to work in the past and I could not get either to work when I first tried some months ago, although I think one does work now.

Jim

Today's daily from the PPA
OS: Ubuntu 18.04.5 LTS (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 5a07d7dd463861e0b35897883158e5078fa582a9
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
wmayer
Site Admin
Posts: 17301
Joined: Thu Feb 19, 2009 10:32 am

Re: Freecad crashes when revolving

Postby wmayer » Wed Oct 14, 2020 11:42 am

Confirmed!

The exact steps to reproduce the crash:
  • Load the project file
  • Invoke the revolution function. This already creates a solid from the sketch. By default it uses the vertical axis.
  • From the revolution object select an edge or face. In the combo box you already see that an empty item has been added.
  • Open the combo box and select the option to choose a reference
=> Crash.
jmaustpc
Posts: 11006
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Freecad crashes when revolving

Postby jmaustpc » Wed Oct 14, 2020 11:56 am

wmayer wrote: Wed Oct 14, 2020 11:42 am Confirmed!

The exact steps to reproduce the crash:
  • Load the project file
  • Invoke the revolution function. This already creates a solid from the sketch. By default it uses the vertical axis.
  • From the revolution object select an edge or face. In the combo box you already see that an empty item has been added.
  • Open the combo box and select the option to choose a reference
=> Crash.
Well done Werner! How on earth did you work out that crazy work flow from the limited descriptions above?! :shock: :D

I got the "is not a dag" error, and the invalid solid, etc.

Anyway if one does as you say it crashes here as well... :)


Jim

Today's daily from the PPA
OS: Ubuntu 18.04.5 LTS (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 5a07d7dd463861e0b35897883158e5078fa582a9
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
wmayer
Site Admin
Posts: 17301
Joined: Thu Feb 19, 2009 10:32 am

Re: Freecad crashes when revolving

Postby wmayer » Wed Oct 14, 2020 1:00 pm

How on earth did you work out that crazy work flow from the limited descriptions above?!
You have to read between the lines. ;)
wmayer
Site Admin
Posts: 17301
Joined: Thu Feb 19, 2009 10:32 am

Re: Freecad crashes when revolving

Postby wmayer » Wed Oct 14, 2020 1:21 pm

git commit b33f92898

It fixes the hard crash and disallows to add an empty entry to the combo box.