solved - File works fine with appimage, but crashes with snap (unknown exception)

Report observations made with the new Toponaming branch.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
bambuko
Veteran
Posts: 2161
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

solved - File works fine with appimage, but crashes with snap (unknown exception)

Post by bambuko »

I have raised this topic on github (https://github.com/realthunder/FreeCAD/ ... 1235949638)
but... there is a possibility that it is me doing something stupid rather than genuine "issue",

so I am also sharing it here, in the hope that it can be tested by other Linkstage3 branch users, please:

File:
02_loco_base(TEST).FCStd
(368.46 KiB) Downloaded 33 times
Works perfectly fine with appimage version 2022.430.26244 +4758
but when I try to open it in snap version 2022.512.14555
it gives error message (below)
any attempts to open affected sketch (Sketch154) end up with FreeCAD crashing :oops:

Code: Select all

12:26:00  4.5e-08 <App> Document.cpp(3210): Failed to restore _02_loco_base_TEST_#Sketch154: unknown exception

I am using:

Code: Select all

OS: elementary OS 6.1 Jólnir (Pantheon/pantheon)
Word size of FreeCAD: 64-bit
Version: 2022.430.26244 +4758 (Git) AppImage
Build type: Release
Branch: LinkDaily
Hash: b024b876480a533018fdc702145e9e38f8c54ba6
Python version: 3.9.12
Qt version: 5.12.9
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United Kingdom (en_GB)
and:

Code: Select all

OS: Ubuntu Core 20 (Pantheon/pantheon)
Word size of FreeCAD: 64-bit
Version: 2022.512.14555 (Git shallow)
Build type: Release
Branch: (HEAD detached at 2022.05.12-edge)
Hash: 8f837b53c108a2444535be2604fdf31170dcf7f0
Python version: 3.8.10
Qt version: 5.15.3
Coin version: 4.0.1
OCC version: 7.6.2
Locale: English/United Kingdom (en_GB)


Help, please
Last edited by bambuko on Wed May 18, 2022 9:36 am, edited 1 time in total.
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
User avatar
bambuko
Veteran
Posts: 2161
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: File works fine with appimage, but crashes with snap (unknown exception)

Post by bambuko »

OK, found what the problem is ...
"empty" shapebinders.
Following the changes to "parent" these shapebinders didn't update for some reason...?
Screenshot from 2022-05-16 09.01.27.png
Screenshot from 2022-05-16 09.01.27.png (53.98 KiB) Viewed 1182 times
Screenshot from 2022-05-16 09.09.55.png
Screenshot from 2022-05-16 09.09.55.png (98.01 KiB) Viewed 1182 times

Easily solved, but why should it be perfectly fine in appimage version and not in the snap version?
My only guess is that snap being "edge package" has had some fixes that make it more likely to object to issues?

Interesting doing geometry and sketch validation doesn't show errors in either snap or appimage...
Plus - if I didn't have appimage version available I wouldn't be able to solve the problem (any attempts to do anything in snap just crashed FreeCAD)
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: File works fine with appimage, but crashes with snap (unknown exception)

Post by adrianinsaval »

is this involving links? snaps have limited permissions to access files so it possible it can't access the relevant files for the links, how are you opening the file? Do you know if you are using the desktop portal or the built-in freecad file dialog?
User avatar
bambuko
Veteran
Posts: 2161
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: File works fine with appimage, but crashes with snap (unknown exception)

Post by bambuko »

Whilst original large assembly involves links etc, this is not an issue.
I was able to narrow it down to a simple file consisting of few bodies bound using shapebinders (attached in my original post).
Design changes have corrupted shapebinders - not an uncommon thing,
but whilst it is easy to correct/modify in appimage,
in snap FreeCAD crashes complaining about unknown exception.

It doesn't make difference how I open this file (although for the record, I am using FreeCAD dialogue)
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: File works fine with appimage, but crashes with snap (unknown exception)

Post by adrianinsaval »

can you try using the desktop-portal dialog? Are the shapebinders pointing to other files or just objects within the same file? Can you check if the binders fail on master version snap and appimage?
User avatar
bambuko
Veteran
Posts: 2161
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: File works fine with appimage, but crashes with snap (unknown exception)

Post by bambuko »

Shapebinders point to objects within the same file.
Yes, like I have explained, shapebinders failed sometime in the past, but appimage version just ignored it,
and it wasn't untilI I opened the file in snap version that I had unknown exception.

It's trivial to repair it, but only in appimage version of FreeCAD.
It is not possible in snap version, because it crashed when I tried to do anything...

Like I said - I have solved the issue, by repairing shapebinders using appimage FreeCAD.
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
User avatar
bambuko
Veteran
Posts: 2161
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: File works fine with appimage, but crashes with snap (unknown exception)

Post by bambuko »

solved by @realthunder - thank you!
https://github.com/realthunder/FreeCAD/ ... e051daaa20
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
Post Reply