Ticket #4020 - untrapped error starting FreeCAD

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!
User avatar
freman
Veteran
Posts: 2200
Joined: Tue Nov 27, 2018 10:30 pm

Ticket #4020 - untrapped error starting FreeCAD

Post by freman »

Hi,

I have an untrapped error reading "something" when I open FreeCAD.

I was moving stuff around a few days ago and think I changed permissions on something unintentionally/incorrectly.

To try to eliminate the problem I removed the build completely, got a now git clone an rebuilt in a new location. I'm still getting the same unspecified error.

How can I find out where the actual problem is. It seems there is a lack of error trapping when opening the file, at which point a more helpful msg could be produced.

TIA.

Code: Select all

FreeCAD 0.19, Libs: 0.19R16919 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

connect failed: No such file or directory
Unhandled std::exception caught in GUIApplication::notify.
The error message is: Permission denied

Code: Select all

FreeCAD 0.19, Libs: 0.19R16919 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

connect failed: No such file or directory
Unhandled std::exception caught in GUIApplication::notify.
The error message is: Permission denied

Code: Select all

OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15303 (Git)
Build type: Release
Branch: master
Hash: 6199c95fd71eacb9cc168426e55254aa79a42034
Python version: 2.7.15
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)
Last edited by Kunda1 on Fri Jun 14, 2019 4:07 pm, edited 3 times in total.
Reason: reformatted title
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: untrapped error starting FreeCAD

Post by chrisb »

How can we help without even knowing what OS you use? The message looks as if permissions in the filesystem are not properly set.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
freman
Veteran
Posts: 2200
Joined: Tue Nov 27, 2018 10:30 pm

Re: untrapped error starting FreeCAD

Post by freman »

Sorry, I've updated with FreeCAD info.

Yes, clearly there is one file which has the wrong permissions but which one. That its where proper error trapping when opening the file is important. This seems to have just bubbled up to the top level as general untrapped error.

Is it a read error, a write error, what file is giving the problem? There seems no way to know without debugging this at source level unless someone with knowledge of the source recognised the context. Should I open a bug report?
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: untrapped error starting FreeCAD

Post by chrisb »

All files here have the permissions

Code: Select all

-rw-r--r--
All directories here have the permissions

Code: Select all

drwxr-xr-x
they are all owned by root/root. Verify with ls -lR.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
freman
Veteran
Posts: 2200
Joined: Tue Nov 27, 2018 10:30 pm

Re: untrapped error starting FreeCAD

Post by freman »

Yes, I wondered how desirable that was and trying to chmod -R everything to a non priveledged user. I then chmod everything back and I think that was when something got upset.

It appears to be all root:root but it's a complex tree to check everything with certainly. In any case I don't see chmod -R run as root could fail to chmod all files.

That is why I thought it would be best to rm -rf and rebuild but sadly master seems broken at the moment.

I wonder if it is accessing a file in the user's homedir but I can't see anything. However, there's a ton of hidden and config files to go through.

This really should not be a guessing game. I'll open a bug request for more informative errors on this. #4020
wmayer
Founder
Posts: 20242
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: untrapped error starting FreeCAD #4020

Post by wmayer »

I have an untrapped error reading "something" when I open FreeCAD.
Does FreeCAD still start or does it terminate?
connect failed: No such file or directory
Unhandled std::exception caught in GUIApplication::notify.
The error message is: Permission denied
When looking for the error messages then I found similar reports for other applications:
https://bugs.launchpad.net/ubuntu/+sour ... ug/1216993
https://ubuntuforums.org/archive/index. ... 33621.html
https://github.com/anbox/anbox/issues/566
User avatar
freman
Veteran
Posts: 2200
Joined: Tue Nov 27, 2018 10:30 pm

Re: untrapped error starting FreeCAD #4020

Post by freman »

Does FreeCAD still start or does it terminate?
No, if there was a crash or anything more significant, I would have noted that. There is no obvious fallout but I can't tell what is happening or whether it may "matter" since I have no indication of what is affected. That is part of the problem.

If I find odd behaviour, I will not know whether this is the cause or something else.

I'm not sure what you searched for but those cases do not seem very similar. The Blender one did print the full path of the file giving problems, the others only seem to share "permission denied". Ultimately, if other software is failing to trap errors ( it won't be too hard to find cases of that on a google search ! ) does not mean it is a good idea for FreeCAD.

I'm guessing it is a config or prefs files that has got corrupted. But I don't see any counter argument to this being handled better.
User avatar
freman
Veteran
Posts: 2200
Joined: Tue Nov 27, 2018 10:30 pm

Re: untrapped error starting FreeCAD #4020

Post by freman »

"Unhandled std::exception caught in GUIApplication::notify"
If I google the exact error, I seem to get a high proportion of FreeCAD results. That may be Google breathing down my neck and spying on me but there are a number of results which do not seem related to this issue.

This comes from Qt.Application and is just the top level catch-all for untrapped exceptions.

I hope it will not cause offence or attract disparaging comments about my motivations for raising the issue but this confirms comments I have made elsewhere suggesting the need for some better error checking in FreeCAD. This would make for a more stable product and less and faster debugging.

The "dog-bone" crash I found was related to lack of error trapping memory allocations.
The failure of trying to pocket a 6mm hole with a 6mm tool , while determined to be "not an issue", was also caused by lack of error trapping.

Please note that I'm not trying to rip FreeCAD apart, I'm pushing to find weaknesses and hopefully make intelligent useful suggestions and report bugs. What you have so far is impressive but if you want to move to version 1.0, a few things will need improvement. I think this is one of them.
Last edited by freman on Fri Jun 14, 2019 9:07 am, edited 1 time in total.
wmayer
Founder
Posts: 20242
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: untrapped error starting FreeCAD #4020

Post by wmayer »

I searched for this term: "connect failed: No such file or directory"

It might be a socket problem. In case your start workbench is "Start" then change it to something else in the preferences and look if you still see the error. If no load the Start workbench manually and see what happens.
I'm guessing it is a config or prefs files that has got corrupted. But I don't see any counter argument to this being handled better.
Then delete/rename the user.cfg file under $HOME/.FreeCAD and see what happens.
User avatar
freman
Veteran
Posts: 2200
Joined: Tue Nov 27, 2018 10:30 pm

Re: untrapped error starting FreeCAD #4020

Post by freman »

I had got rid of start page on start up previous to this incident and it came back at about the same time as this occurred. If I edit prefs to select starting in Sketch WB , it still comes up with Start.

removing user.cfg and system.cfg does not fix it.

What does FreeCAD ( maybe via Qt deps ) try to connect to? dbus?
Last edited by freman on Fri Jun 14, 2019 9:31 am, edited 2 times in total.
Post Reply