Using GTK4 OpenGL on MacOS problem in gdk _ macos _ gl _ context _ real _ realize() in particular CGLCreateContext()

Hi.

I am enthusiastic to use GTK4 for my OpenGL-based application. From a test application I see that the performance is substantially improved. Also, in gtk4-demos, the Shadertoy and the shader demos are nice and smooth.

However, when I try to run my program I get the message:
(coot-bin:43611): Core OpenGL-CRITICAL **: 01:27:46.885: …/gdk/macos/gdkmacosglcontext.c:406: invalid share context
OOPS:: on_glarea_realize() error on gtk_gl_area_make_current() [this error message is generate by my code]
and, in the application, a label “invalid share context” appears where the GtkGLArea widget should be.
I don’t know how to go about debugging this (Mac is not really my thing (but my users use it)) and I can’t follow what is happening in gdk_macos_gl_context_real_realize().
Any advice?
Thanks,
Paul.
(I had to word-split the title)

I’d delete this if I could. If you have the authority to do so, this should probably be deleted - it’s useless noise.

I somehow was starting up the GLArea widget in the incorrect order - that’s why the error message was so esoteric.