[SOLVED] Segmentation fault

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
mconsidine
Posts: 125
Joined: Wed Jan 18, 2023 10:41 pm
Location: Randolph, VT USA

[SOLVED] Segmentation fault

Post by mconsidine »

I had been getting a segmentation fault trying to run the latest git code.

Firstly:

Code: Select all

OS: Linux Mint 21 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.0.31700 (Git)
Build type: Debug
Branch: master
Hash: 0a8ea55509c2a03c18ec7d95100b765c59b19560
Python 3.10.6, Qt 5.15.3, Coin 4.0.1, Vtk 9.1.0, OCC 7.5.1
Locale: English/United States (en_US)
The result of running the debug version with gdb and using its "up" command (hat tip again to @wmayer for that. Thanks ...) is

Code: Select all

Thread 1 "FreeCAD" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) up
#1  0x00007ffff1e82707 in SoAction::traverse(SoNode*) ()
   from /usr/local/lib/libCoin.so.80
As part of an earlier effort to resolve an issue with pivy, I had recompiled coin, soqt and quarter. Suspecting now that I had different copies of libCoin being seen, I found in fact that the newly compiled copies were in /usr/local/lib as well as in /usr/lib/x86_64-linux-gnu. By removing the former FC now seems to run without a problem.

I didn't see a flag that would allow compiliation against Coin, et al in other directories - if so, that could be a better approach. Or maybe I overlooked such a flag in the .cmake file. In any event this issue is solved for me and I hope it helps someone else.

TIA,
mconsidine
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: [SOLVED] Segmentation fault

Post by wmayer »

As part of an earlier effort to resolve an issue with pivy, I had recompiled coin, soqt and quarter.
To fix issues with pivy you usually don't have to rebuild neither coin nor soqt nor quarter. It should still be possible to use the system versions.
Btw, for FreeCAD we only use coin and a modified copy of quarter. soqt is the old Qt binding and not used any more.
I didn't see a flag that would allow compiliation against Coin, et al in other directories
When preparing FreeCAD for building then in CMake you can define the paths for COIN3D_INCLUDE_DIRS and COIN3D_LIBRARIES.
mconsidine
Posts: 125
Joined: Wed Jan 18, 2023 10:41 pm
Location: Randolph, VT USA

Re: [SOLVED] Segmentation fault

Post by mconsidine »

@wmayer: Thank you again for the info. In hindsight I've got a better understanding I think. It looks like I can get an updated version of pivy installed on my machine via a debian package - trying to compile from source seems to just generate more issues.

And thanks for pointing out the COIN flags.
mconsidine

EDIT TO SUMMARIZE: Just to wrap this up. I finally got the git pull of FC to compile using Python 3.10 and Linux Mint 21 by
- making sure that the path to PySide2.QtWebEngineWidgets as shown in the cmake output was correct. In my case ensuring it was *not* pointing to an install of a /.local folder off of my home folder. This was creating an issue with AddonManager
- making sure that I deleted any versions of coin, quarter and soqt that I had compiled on my own and which got installed in /usr/local/lib. These were conflicting with what was in /usr/lib/x86_64-linux-gnu and generating a segmentation fault. Bad doggie ...
- finding a way to update pivy from 0.6.5 to 0.6.8, which meant getting a Debian package and installing that, which seemed to go fine.

So I can now start 0.21 of FC without getting a message about QtWebEngineWidgets and AddonManager, not get a core dump on exit, not get a segmentation fault and I can use Draft WB without any error messages showing up in Report View when I pull up the spline test program.

Now I just need to figure out how to create a spline on a datum plane. Whew ...

Thanks for everyone's help.
Post Reply