Fascinating. The following error is repeated dozens of times, and does not appear when the qt6 build is launched on my M1 Macbook:
❯ ~ [7m 38s] /Applications/Anki.app/Contents/MacOS/anki
Anki starting...
Initial setup...
Running with temporary Qt5 compatibility shims.
Run with DISABLE_QT5_COMPAT=1 to confirm compatibility with Qt6.
Preparing to run...
qt.webenginecontext:
GLImplementation: core_profile
Surface Type: OpenGL
Surface Profile: CoreProfile
Surface Version: 4.1
Using Default SG Backend: yes
Using Software Dynamic GL: no
Using Angle: no
Init Parameters:
* application-name Anki
* browser-subprocess-path /Applications/Anki.app/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess
* disable-features DnsOverHttpsUpgrade,ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture
* disable-speech-api
* enable-features TracingServiceInProcess
* enable-threaded-compositing
* gpu-preferences SAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAwAAAAAAABgDAAAAAAAACAEAACAAAAAAAQAAAAAAAAgBAAAAAAAAEAEAAAAAAAAYAQAAAAAAACABAAAAAAAAKAEAAAAAAAAwAQAAAAAAADgBAAAAAAAAQAEAAAAAAABIAQAAAAAAAFABAAAAAAAAWAEAAAAAAABgAQAAAAAAAGgBAAAAAAAAcAEAAAAAAAB4AQAAAAAAAIABAAAAAAAAiAEAAAAAAACQAQAAAAAAAJgBAAAAAAAAoAEAAAAAAACoAQAAAAAAALABAAAAAAAAuAEAAAAAAADAAQAAAAAAAMgBAAAAAAAA0AEAAAAAAADYAQAAAAAAAOABAAAAAAAA6AEAAAAAAADwAQAAAAAAAPgBAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAYAAAAQAAAAAAAAAAAAAAAHAAAAEAAAAAAAAAAAAAAACAAAABAAAAAAAAAAAAAAAAoAAAAQAAAAAAAAAAAAAAALAAAAEAAAAAAAAAAAAAAADQAAABAAAAAAAAAAAAAAAA4AAAAQAAAAAAAAAAEAAAAAAAAAEAAAAAAAAAABAAAABgAAABAAAAAAAAAAAQAAAAcAAAAQAAAAAAAAAAEAAAAIAAAAEAAAAAAAAAABAAAACgAAABAAAAAAAAAAAQAAAAsAAAAQAAAAAAAAAAEAAAANAAAAEAAAAAAAAAABAAAADgAAABAAAAAAAAAABAAAAAAAAAAQAAAAAAAAAAQAAAAGAAAAEAAAAAAAAAAEAAAABwAAABAAAAAAAAAABAAAAAgAAAAQAAAAAAAAAAQAAAAKAAAAEAAAAAAAAAAEAAAACwAAABAAAAAAAAAABAAAAA0AAAAQAAAAAAAAAAQAAAAOAAAAEAAAAAAAAAAHAAAAAAAAABAAAAAAAAAABwAAAAYAAAAQAAAAAAAAAAcAAAAHAAAAEAAAAAAAAAAHAAAACAAAABAAAAAAAAAABwAAAAoAAAAQAAAAAAAAAAcAAAALAAAAEAAAAAAAAAAHAAAADQAAABAAAAAAAAAABwAAAA4AAAAIAAAAAAAAAAgAAAAAAAAA
* in-process-gpu
* use-gl core_profile
Starting main loop...
[61126:48387:1202/084531.121265:ERROR:gl_context_cgl.cc(115)] Error creating context.
[61126:48387:1202/084531.123325:ERROR:gl_context_cgl.cc(115)] Error creating context.
[61126:48387:1202/084531.123344:ERROR:gpu_channel_manager.cc(771)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[61126:48387:1202/084531.123353:ERROR:shared_image_stub.cc(470)] SharedImageStub: unable to create context
[61126:48387:1202/084531.123366:ERROR:gpu_channel.cc(449)] GpuChannel: Failed to create SharedImageStub
[61126:48387:1202/084531.124454:ERROR:gl_context_cgl.cc(115)] Error creating context.
[61126:48387:1202/084531.125649:ERROR:gl_context_cgl.cc(115)] Error creating context.
[61126:48387:1202/084531.125670:ERROR:gpu_channel_manager.cc(771)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[61126:48387:1202/084531.125676:ERROR:shared_image_stub.cc(470)] SharedImageStub: unable to create context
[61126:48387:1202/084531.125684:ERROR:gpu_channel.cc(449)] GpuChannel: Failed to create SharedImageStub
[61126:48387:1202/084531.127800:ERROR:gl_context_cgl.cc(115)] Error creating context.
[61126:48387:1202/084531.129710:ERROR:gl_context_cgl.cc(115)] Error creating context.
[61126:48387:1202/084531.129726:ERROR:gpu_channel_manager.cc(771)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[61126:48387:1202/084531.129732:ERROR:shared_image_stub.cc(470)] SharedImageStub: unable to create context
[61126:48387:1202/084531.129739:ERROR:gpu_channel.cc(449)] GpuChannel: Failed to create SharedImageStub
This can be temporarily bypassed (as documented on this GitHub Issue for another qt-using project that fails to render on macOS) with the following invocation:
QTWEBENGINE_CHROMIUM_FLAGS="--disable-gpu" /Applications/Anki.app/Contents/MacOS/anki
I’m happy to provide extra debugging feedback when I can, although I won’t have access to this computer for some period of time … if anybody else runs across this issue, I adapted ahihi’s script to “patch” (… sort of) Anki so that you can successfully launch it from the Finder:
Download, set as executable, execute, and rebuild the LaunchServices database:
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister\
-kill -r -domain local -domain system -domain user