Well that was a rabbit hole I never wish to see again. How I got in there initially I'll never know.
This is a long one, but the process may be helpful to others.
2 months plus later, hours wasted downloading and recompiling and still the crashes continued - always involving SoType bad assert. Nothing I could find online pointed to any specific error, just general information. Very hard to determine any fault cause from debugging, FC log, backtracing.
Finally a glimmer of light in this post
https://forum.freecadweb.org/viewtopic.php?f=4&t=46740, particularly a comment by wmayer re duplicated installs of Coin libraries. Apparently loading the library the second time dumps associated variables and causes the bad assert.
Not really understanding what was going on, using ps -A and lsof - p <pid> I did manage to find that indeed I had the problem of duplicated Coin libraries. The problem one eventually appeared to be libCoin.so.80c. So as suggested elsewhere, I attempted remove all Coin bits and bobs. Then I started from scratch.
Manually rebuilt pivy, coin, quarter, SoQt all sourced from github Coin3d, without failure this time around. I'd had many errors along the learning curve, spent hours trying to understand readme and install instructions. Finally I rebuilt FC for the umpteenth time (both Release and Debug versions many times) and it finally works without SoType() crashing.
One of the main takeaways is re the compiling and building process when you encounter such a fault as I'll detail below.
(I've used pivy as the example, but this applies equally to any package )
Create a coin3d folder
Create a pivy folder below
While you're there, create the quarter, soqt and coin folders you'll need for those package compiles.
Clone pivy from github Coin3d/pivy into a source folder: coin3d/pivy/pivy_src
Create a build folder: coin3d/pivy/pivy_build
Always, always, always compile and build out-of-source.
(note that SoQt had a raft of errors reported to github re compiling at various folder levels earlier this year (2022) - this was another rabbit hole I tried to follow when trying to get a fix)
Change directory into pivy_build folder. Recheck you're in the correct folder.
Now do a cmake command as below. It's the same format every compile for any package.
(the -j8 just tells the processor to multithread using all 8x available processors on my machine)
Adjust the -j8 to suit your machine's number of processors whilst you have multiple cups of coffee, particularly during the later make processing)
cmake -j8 -DCMAKE_BUILD_TYPE=Release ../pivy_src
or cmake -j8 -DCMAKE_BUILD_TYPE=Debug ../pivy_src if you're going to use debug for fault finding
Whilst compiling and making, do not attempt to do other things, you'll eventually freeze your machine. Keep drinking coffee.
Ok, compile completes, hopefully without errors.
Next you'll need to make and from there, install your package. You'll definitely need a lot of coffee here.
Still in pivy_build directory, the commands are:
make -j8
And optionally, a full install.
sudo make -j8 install
(needs sudo admin rights to do installs under /usr folders)
The format of the commands always seems to remain the same for all packages. Always do a clean / hard reset of the source ex github, followed by a final git pull to remain current. Often the best option is to gut the build folder content into the trash bin, start again afresh, do your cmake, then the make command. Drink yet more coffee as you await completion of make.
I got there in the end, learnt heaps along the way. Hope this helps someone in the future.