Freecad hangs while saving the document

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!
Post Reply
leoheck
Veteran
Posts: 1223
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Freecad hangs while saving the document

Post by leoheck »

There is something wrong with this current version of Freecad. It sometimes hangs when saving the document, (not always).

I am using the Ctrl+S shortcut to save continually my project. I am not sure if it is related to the Spreadsheet, but I am using it, and Freecad hangs when I have the Spreadsheet focused.

I attached a picture here but it is not useful since it does not have any extra info except by the name of the window that freezes Freecad.
Screenshot-20211020151207-852x476.png
Screenshot-20211020151207-852x476.png (10.66 KiB) Viewed 746 times
OS: Ubuntu 21.10 (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.20.
Build type: Release
Branch: unknown
Hash: 8fceac17628778bd0b2ba4c60bafd6494348ac08
Python version: 3.9.5
Qt version: 5.15.2
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)
Last edited by leoheck on Thu Oct 21, 2021 4:52 am, edited 1 time in total.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Freecad hangs while saving the document

Post by wmayer »

There is something wrong with this current version of Freecad. It sometimes hangs when saving the document, (not always).
Works fine for me here. Does it happen for you with rather big projects are also for very small projects?
I attached a picture here but it is not useful since it does not have any extra info except by the name of the window that freezes Freecad.
It's odd that it shows a message box with only a title but no error text. Now when searching for "Could not save document" in the source code there are two hits and they will be shown when a file exception is raised. And actually it should show this error message:
There was an issue trying to save the file.
This may be because some of the parent folders do not exist,
or you do not have sufficient permissions,
or for other reasons.
Error details:

Would you like to save the file with a different name?
Now the file exception is thrown when project file cannot be opened for write access, or not all data could be written successfully or (depending on user settings) the tmp. file cannot be renamed.

What happens further when FreeCAD freezes? Will it become responsive after a while or do you have to kill the process? And the message box does it show an error text at a later point?

Anyway, I will change the code to also print the file exception error to the output window and log file if activated. This may help to understand where the exception is thrown.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Freecad hangs while saving the document

Post by wmayer »

With git commit b93aa77a1c the error message should be written to the output window and the log file if you passed the option --write-log to the executable.
leoheck
Veteran
Posts: 1223
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Freecad hangs while saving the document

Post by leoheck »

wmayer wrote: Wed Oct 20, 2021 7:38 pm What happens further when FreeCAD freezes? Will it become responsive after a while or do you have to kill the process? And the message box does it show an error text at a later point?
It freezes forever... I mean, I did not have the patience to wait longer than 5 minutes.

After that window appear, it shows me this normal window saying something was taking too much time, asking if I would like to continue or kill the app. I remained saying that was ok to continue, for some 5 or 6 times as usual. And since nothing was about to change, then I killed the application.

It has happened 4 times in a row. After the second time having to recreate the whole spreadsheet, I created a method to change the Spreadsheet. Cell by cell, and saving the file, after each change. After I finished doing my job with the Spreadsheet, the app did not freeze anymore.

The file is kind of complex, with a bunch of Assembly bodies and Part Design Bodies too. Also, It has a lot of sub-shape binding objects.

wmayer wrote: Wed Oct 20, 2021 7:59 pm With git commit b93aa77a1c the error message should be written to the output window and the log file if you passed the option --write-log to the executable.
Awesome, thanks. I hope not to see this tho.
Post Reply