HaarigerHarald / geant4_pybind

Alternative Python bindings for Geant4
The Unlicense
35 stars 6 forks source link

Segfault on UI initialization with conda geant4 instalation #24

Closed davo417 closed 9 months ago

davo417 commented 9 months ago

Installing geant4 from conda and this library fails on the examples when trying to open a visualization window. Batch mode works ok. Compiling a geant4 example runs ok so I don't think there is anything wrong with geant4 instalation.

I get:

...
/vis/open OGL 600x600-0+0
/vis/sceneHandler/create OGL
/vis/viewer/create ! ! 600x600-0+0
Segmentation fault
HaarigerHarald commented 9 months ago

Could this be a duplicate of #13 ?

davo417 commented 9 months ago

Don't think so, my installation runs ok in batch mode and the segfault doesn't occurs until I call ui.SessionStart(). Even the mimial example from the README throws this error. C++ examples works fine with UI tho.

davo417 commented 9 months ago

It took reinstalling geant4 and building geant4_pybind from source. After reinstalling geant4 it wasn't working still, so maybe there was a conflict with the pip package.

carlgval commented 8 months ago

I am having the exact same issue. Simulations work fine with geant4 and conda, but the bindings cause a Segmentation Fault, the moment I call ui.SessionStart().

@davo417 did you manage to solve it using geant4 from conda or it took a brand new installation?

Thanks

HaarigerHarald commented 8 months ago

Which OS and architecture is exhibiting this problem?

davo417 commented 8 months ago

Unfortunately it took a source installation of geant making sure to set GEANT4_BUILD_TLS_MODEL=global-dynamic and use a c++17 compatible compiler.

Conda based geant installation shares this properties tho, and -X faulthandler didn't throw useful information either.

carlgval commented 8 months ago

Which OS and architecture is exhibiting this problem?

We have replicated the issue in an Ubuntu 22.04 and Kubuntu 22.04 with x86_64 architecture. What baffles me is that the same simulations run just fine a year ago in a different Ubuntu machine also using a conda based geant.

Unfortunately it took a source installation of geant making sure to set GEANT4_BUILD_TLS_MODEL=global-dynamic and use a c++17 compatible compiler.

Thanks davo417! I will give that a try as well.