FreeCAD crashes on startup MacOS, appears to be graphics issue

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
snapman
Posts: 4
Joined: Fri Oct 15, 2021 5:45 pm

FreeCAD crashes on startup MacOS, appears to be graphics issue

Post by snapman »

I have had FreeCAD installed on a 2012 MacBookPro running Catalina 10.15 for a long while, using the precompiled binary .dmg installer and it has worked very well. After a hiatus I went to open FreeCAD 0.19.24291 and it crashed on startup.

Following all the troubleshooting I started Blender, it worked fine. I tried safe-mode and again FreeCAD opened, but ran very slowly (it is safe-mode).

On reinstall FreeCAD runs very slow and if I can get to Preferences and check the Use OpenGL software checkbox, it opens in regular mode, but crashes as soon as you click on anything.

Totally removing FreeCAD and it's Preferences folder and reinstalling 0.19.24291 again but that didn't help. I tried installing the weekly build 0.19.25997, no change. It appears to be a graphics driver issue with OpenGL not loading or not loading properly.

Interestingly FreeCAD always crashes before it creates user.cfg and system.cfg when in normal mode, but will generate them in Safe Mode.

It is possible and even likely that I installed a MacOS update between FreeCAD working and it crashing. And while OpenGL is deprecated, there is no indication that an update would kneecap it.

Any help would be very much appreciated as I have been working on this for a couple of days without solution.

Thank you very much,

Alan
FreeCAD processes during freeze.rtf
(32 KiB) Downloaded 81 times
FreeCAD debug log during freeze.rtf
(7.12 KiB) Downloaded 68 times
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: FreeCAD crashes on startup MacOS, appears to be graphics issue

Post by chrisb »

Hi and welcome to the forum!

I'm not sure about OpenGL, it is the same version 4.1 that my old well running MacBook Air uses, see https://support.apple.com/en-us/HT202823.

First thing to do is to try current FreeCAD 0.20. If the problem persists, start from console and create log file with the additional parameter --write-log.

Don't attach rtf files. Attach the log by putting them in code tags directly in the post.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
snapman
Posts: 4
Joined: Fri Oct 15, 2021 5:45 pm

Re: FreeCAD crashes on startup MacOS, appears to be graphics issue

Post by snapman »

I have determined the cause of the crashing. Update 10.15.7 appears to break something that FreeCAD (and Eagle circuit board).

How I determined this is I command+ R reinstalled Catalina on my Mac from the recovery partition. Everything appears to work. Then it asks to install updates, I did so and now both crash on startup.

So I will reinstall again without the updates and report back in a couple of days.

Alan
snapman
Posts: 4
Joined: Fri Oct 15, 2021 5:45 pm

Re: FreeCAD crashes on startup MacOS, appears to be graphics issue

Post by snapman »

After re-installing I want to more specifically say it appears that the macOS Catalina Security Update Public Beta 2021-007 10.15.7 is causing the problem. Note this is a beta install, so most people likely won't install it.

The same install breaks Eagle circuit board design.

For now I have disabled automatic updates, hopefully Apple will fix this error before the next update. One might want to download the current 10.15.7 installer in the event one needs to reinstall the OS and Apple updates the default file to one which won't work with FreeCAD.

Alan
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCAD crashes on startup MacOS, appears to be graphics issue

Post by sgrogan »

snapman wrote: Sun Oct 17, 2021 6:08 pm After re-installing I want to more specifically say it appears that the macOS Catalina Security Update Public Beta 2021-007 10.15.7 is causing the problem. Note this is a beta install, so most people likely won't install it.

The same install breaks Eagle circuit board design.
Thanks snapman. Do you have a clue what the common dependency might be?
"fight the good fight"
snapman
Posts: 4
Joined: Fri Oct 15, 2021 5:45 pm

Re: FreeCAD crashes on startup MacOS, appears to be graphics issue

Post by snapman »

I haven't figured out what the specific dependency is, but it appears to be graphics driver related, maybe the AppleIntelHD4000GraphicsGLDriver or libGPUSupportMercury.dylib . If you Google libGPUSupportMercury.dylib it appears there is some discussion in Apple developer forums about this library causing a lot of crashes, so that might be the one.

The specific error reported is:

Code: Select all

* thread #22, name = 'Chrome_InProcGpuThread', stop reason = signal SIGABRT
  * frame #0: 0x00007fff6d54833a libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff6d608e60 libsystem_pthread.dylib`pthread_kill + 430
    frame #2: 0x00007fff6d4cf808 libsystem_c.dylib`abort + 120
    frame #3: 0x00007fff545e30a5 libGPUSupportMercury.dylib`gpusGenerateCrashLog.cold.1 + 95
    frame #4: 0x00007fff545da18f libGPUSupportMercury.dylib`gpusGenerateCrashLog + 89
    frame #5: 0x00007fff28eb1dd0 AppleIntelHD4000GraphicsGLDriver`gpusKillClientExt + 9
    frame #6: 0x00007fff545db55b libGPUSupportMercury.dylib`gpusSubmitDataBuffers + 164
    frame #7: 0x00007fff28a87c78 AppleIntelHD4000GraphicsGLDriver`IntelCommandBuffer::getNew(GLDContextRec*) + 48
    frame #8: 0x00007fff28a87aa6 AppleIntelHD4000GraphicsGLDriver`intelSubmitCommands + 187
The 2012 MBP I have supports both OpenGL (up to 4.1) and Metal Graphics drivers, both of which are installed, so it is possible the 2021-007 Security update is moving some default config toward metal instead of OpenGL or blocking some OpenGL feature/fibrary that was less secure.

I reported it to Apple, but have never heard back when I have made previous reports.

Hopefully the above and the previous posts will help someone at least get FreeCAD working again.

Alan
tomtom215
Posts: 7
Joined: Sat Nov 13, 2021 6:58 pm

Re: FreeCAD crashes on startup MacOS, appears to be graphics issue

Post by tomtom215 »

I have the exact same problem
yodashut
Posts: 1
Joined: Tue Nov 16, 2021 1:52 am

Re: FreeCAD crashes on startup MacOS, appears to be graphics issue

Post by yodashut »

This has ruined one of the main purposes of my old MacBook...very disappointed in apple breaking this. About the same time, I noticed with that same update a bunch of web pages no longer work on Safari (notably, homedepot.com).
Last edited by yodashut on Tue Nov 16, 2021 2:01 am, edited 1 time in total.
TheSebi
Posts: 2
Joined: Thu Dec 02, 2021 6:25 pm

Re: FreeCAD crashes on startup MacOS, appears to be graphics issue

Post by TheSebi »

I also have the same issue with my MBP 2012 running MacOS 10.15.7.
FreeCAD still worked two-three months ago and I get the same behavior as you described now.
I am certain that I installed an update for macOS in the time between.

Switching to safe mode also works for me and I am also quite sure it has something to do with the Intel Driver.
When starting FreeCAD from terminal in safe mode, I get two more lines of output than in normal mode:

Code: Select all

> Unable to create basic Accelerated OpenGL renderer.
> Core Image is now using the software OpenGL renderer. This will be slow. 
It then continues to successfully start.

When comparing the log files from a crashing start in normal mode and a successful start in safe mode the only difference is the OpenGL Version.
In normal mode when crashing the version is: 2.1 (2.1 INTEL-14.7.20)
In safe mode when starting successfully the version is: 2.1 (2.1 APPLE-17.10.22).
Is there maybe a way to force FreeCAD to use this OpenGL version?

I also tried installing and running Fusion360 after I couldn’t get FreeCAD to run, but interestingly I get the exact same behavior, the splash screen shows and then it immediately crashes.

This problem is really frustrating. I hope there will be some fix for this. Maybe I’ll also try reinstalling macOS and not updating, even if that isn’t a proper solution to the problem.

Update:
So I also reinstalled the OS using Recovery Mode to the version before the Security Update 7 and everything is back to working like before.
Last edited by TheSebi on Fri Dec 03, 2021 6:04 pm, edited 1 time in total.
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: FreeCAD crashes on startup MacOS, appears to be graphics issue

Post by chrisb »

It runs well on this machine:
Attachments
Bildschirmfoto 2021-12-03 um 03.20.38.png
Bildschirmfoto 2021-12-03 um 03.20.38.png (48.91 KiB) Viewed 4918 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply