Lastest macos x vis problem, solved

Hi all:
I got vis problem after upgrade to the lastest mac os x 13.2.1
whether vis sys(qt \ x11) crash my vis.
could anyone help?

/vis/open OGL 600x600-0+0
/vis/sceneHandler/create OGL
/vis/viewer/create ! ! 600x600-0+0
error: dlsym(0xad3aeee0, CGLSetCurrentContext): symbol not found

### CAUGHT SIGNAL: 6 ### address: 0x1aa146868,  signal =  SIGABRT, value =    6, description = abort program (formerly SIGIOT).

Backtrace:
[PID=21447, TID=-1][ 0/34]> 0   libsystem_pthread.dylib             0x00000001aa17dcec pthread_kill + 288
[PID=21447, TID=-1][ 1/34]> 1   libsystem_c.dylib                   0x00000001aa0b62c8 abort + 180
[PID=21447, TID=-1][ 2/34]> 2   libGL.1.dylib                       0x0000000105630b5c apple_get_dri_event_base.cold.1 + 0
[PID=21447, TID=-1][ 3/34]> 3   libGL.1.dylib                       0x000000010562d22c apple_cgl_get_dl_handle + 0
[PID=21447, TID=-1][ 4/34]> 4   libGL.1.dylib                       0x000000010562d15c apple_cgl_init + 364
[PID=21447, TID=-1][ 5/34]> 5   libGL.1.dylib                       0x000000010562dfac apple_init_glx + 132
[PID=21447, TID=-1][ 6/34]> 6   libGL.1.dylib                       0x000000010561d158 applegl_create_display + 16
[PID=21447, TID=-1][ 7/34]> 7   libGL.1.dylib                       0x0000000105615214 __glXInitialize + 396
[PID=21447, TID=-1][ 8/34]> 8   libGL.1.dylib                       0x0000000105613148 GetGLXPrivScreenConfig + 40
[PID=21447, TID=-1][ 9/34]> 9   libGL.1.dylib                       0x00000001056131e0 glXChooseVisual + 56
[PID=21447, TID=-1][10/34]> 10  libG4OpenGL.dylib                   0x0000000105022c5c _ZN15G4OpenGLXViewerC2ER20G4OpenGLSceneHandler + 180
[PID=21447, TID=-1][11/34]> 11  libG4OpenGL.dylib                   0x0000000105020590 _ZN21G4OpenGLStoredXViewerC1ER26G4OpenGLStoredSceneHandlerRK8G4String + 104
[PID=21447, TID=-1][12/34]> 12  libG4OpenGL.dylib                   0x00000001050202e0 _ZN15G4OpenGLStoredX12CreateViewerER15G4VSceneHandlerRK8G4String + 52
[PID=21447, TID=-1][13/34]> 13  libG4vis_management.dylib           0x00000001051ccc2c _ZN12G4VisManager12CreateViewerERK8G4StringS2_ + 72
[PID=21447, TID=-1][14/34]> 14  libG4vis_management.dylib           0x00000001051a1fc8 _ZN24G4VisCommandViewerCreate11SetNewValueEP11G4UIcommand8G4String + 2820
[PID=21447, TID=-1][15/34]> 15  libG4intercoms.dylib                0x0000000105a9230c _ZN11G4UIcommand4DoItE8G4String + 2120
[PID=21447, TID=-1][16/34]> 16  libG4intercoms.dylib                0x0000000105aaa40c _ZN11G4UImanager12ApplyCommandEPKc + 2024
[PID=21447, TID=-1][17/34]> 17  libG4vis_management.dylib           0x000000010516eec8 _ZN16G4VisCommandOpen11SetNewValueEP11G4UIcommand8G4String + 516
[PID=21447, TID=-1][18/34]> 18  libG4intercoms.dylib                0x0000000105a9230c _ZN11G4UIcommand4DoItE8G4String + 2120
[PID=21447, TID=-1][19/34]> 19  libG4intercoms.dylib                0x0000000105aaa40c _ZN11G4UImanager12ApplyCommandEPKc + 2024
[PID=21447, TID=-1][20/34]> 20  libG4intercoms.dylib                0x0000000105a8c31c _ZN9G4UIbatch11ExecCommandERK8G4String + 36
[PID=21447, TID=-1][21/34]> 21  libG4intercoms.dylib                0x0000000105a8c68c _ZN9G4UIbatch12SessionStartEv + 336
[PID=21447, TID=-1][22/34]> 22  libG4intercoms.dylib                0x0000000105aa7710 _ZN11G4UImanager16ExecuteMacroFileEPKc + 72
[PID=21447, TID=-1][23/34]> 23  libG4intercoms.dylib                0x0000000105aa2ca4 _ZN20G4UIcontrolMessenger11SetNewValueEP11G4UIcommand8G4String + 192
[PID=21447, TID=-1][24/34]> 24  libG4intercoms.dylib                0x0000000105a9230c _ZN11G4UIcommand4DoItE8G4String + 2120
[PID=21447, TID=-1][25/34]> 25  libG4intercoms.dylib                0x0000000105aaa40c _ZN11G4UImanager12ApplyCommandEPKc + 2024
[PID=21447, TID=-1][26/34]> 26  libG4intercoms.dylib                0x0000000105a8c31c _ZN9G4UIbatch11ExecCommandERK8G4String + 36
[PID=21447, TID=-1][27/34]> 27  libG4intercoms.dylib                0x0000000105a8c68c _ZN9G4UIbatch12SessionStartEv + 336
[PID=21447, TID=-1][28/34]> 28  libG4intercoms.dylib                0x0000000105aa7710 _ZN11G4UImanager16ExecuteMacroFileEPKc + 72
[PID=21447, TID=-1][29/34]> 29  libG4intercoms.dylib                0x0000000105aa2ca4 _ZN20G4UIcontrolMessenger11SetNewValueEP11G4UIcommand8G4String + 192
[PID=21447, TID=-1][30/34]> 30  libG4intercoms.dylib                0x0000000105a9230c _ZN11G4UIcommand4DoItE8G4String + 2120
[PID=21447, TID=-1][31/34]> 31  libG4intercoms.dylib                0x0000000105aaa40c _ZN11G4UImanager12ApplyCommandEPKc + 2024
[PID=21447, TID=-1][32/34]> 32  exampleB2a                          0x0000000104db71d4 main + 480
[PID=21447, TID=-1][33/34]> 33  dyld                                0x00000001a9e53e50 start + 2544

zsh: abort      ./exampleB2a

it seems it’s the macos permission problem, without admin permission cannot mapped object cause problem

CAUGHT SIGNAL: 11 ### address: 0xbad4007, signal = SIGSEGV, value = 11, description = segmentation violation. Invalid permissions for mapped object.

some library installed by homebrew in /opt/homebrew/lib cause the permission problem?
but I don’t now how to check it

Are you linking against Homebrew X11/OpenGL, or to Xquartz? Did you rebuild/reinstall homebrew/xquartz/Geant4 after the upgrade to macOS 13?

I’ve upgrade to macos 13.3.1 now, and building with QT=ON and X11=OFF,
If i remove /opt/homebrew/lib from env DYLD_LIBRARY_PATH, nothing wrong.
but if I set DYLD_LIBRARY_PATH with /opt/homebrew/lib, cause permissions error

I’ve tried to install G4 with QT=ON X11=ON,
the gui can be opened but nothing display on VIS.

the difference output between the bad and good run is below

Unrecognized OpenGL version
Unrecognized OpenGL version

I’ve install Xquartz and others libx11

not sure why it cause the permission errors

I would not set DYLD_LIBRARY_PATH here, it should never be needed to point to Homebrews’s own install directory. It could well be this that’s interfering as it might be overriding a system path, hence the permissions error.

It’s a known issue that Xquartz/Homebrew X11 can interfere with each other, or rather, CMake can pick up a mixture of the two. This can be checked by looking for variables containing “X11” in the CMakeCache.txt file in the build area. For best behaviour, these should all point at the Xquartz install location(s).

Whilst X11 on macOS is still currently supported, my personal suggestion would be that unless you 100% require X11 for your use case, the pure Qt drivers (QtOpenGL, Qt3D, ToolsSG) give an easier/better experience on macOS.