Skip to content

COMP: Do not use ITK_AUTOLOAD_PATH when ITK_WRAP_PYTHON is set#3331

Merged
thewtex merged 1 commit into
InsightSoftwareConsortium:masterfrom
thewtex:slicer-loading
Mar 28, 2022
Merged

COMP: Do not use ITK_AUTOLOAD_PATH when ITK_WRAP_PYTHON is set#3331
thewtex merged 1 commit into
InsightSoftwareConsortium:masterfrom
thewtex:slicer-loading

Conversation

@thewtex

@thewtex thewtex commented Mar 24, 2022

Copy link
Copy Markdown
Member

For the use case of Slicer using ITK Python wheels, ITK_AUTOLOAD_PATH
is set, and the Python wheel binaries will load the Slicer ITK binaries,
which will cause a crash.

Dynamic loading in Python is unnecessary and can be performed in a more
explicit and controlled manner by Python scripting, so disable this
feature by default when ITK_WRAP_PYTHON is set.

@github-actions github-actions Bot added area:Core Issues affecting the Core module type:Compiler Compiler support or related warnings labels Mar 24, 2022
@thewtex
thewtex requested review from jcfr and tbirdso March 24, 2022 03:39
Comment thread Modules/Core/Common/src/itkObjectFactoryBase.cxx Outdated
For the use case of Slicer using ITK Python wheels, ITK_AUTOLOAD_PATH
is set, and the Python wheel binaries will load the Slicer ITK binaries,
which will cause a crash.

Dynamic loading in Python is unnecessary and can be performed in a more
explicit and controlled manner by Python scripting, so disable this
feature by default when ITK_WRAP_PYTHON is set.
@thewtex

thewtex commented Mar 24, 2022

Copy link
Copy Markdown
Member Author

Addresses #3332

@thewtex
thewtex merged commit 9f00f9d into InsightSoftwareConsortium:master Mar 28, 2022
@thewtex
thewtex deleted the slicer-loading branch March 28, 2022 18:44
hjmjohnson pushed a commit to hjmjohnson/ITK that referenced this pull request May 6, 2026
…-loading

COMP: Do not use ITK_AUTOLOAD_PATH when ITK_WRAP_PYTHON is set
hjmjohnson pushed a commit to hjmjohnson/ITK that referenced this pull request May 12, 2026
…-loading

COMP: Do not use ITK_AUTOLOAD_PATH when ITK_WRAP_PYTHON is set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Core Issues affecting the Core module type:Compiler Compiler support or related warnings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Attempt to instantiate a factory from Slicer python interactor after install itk wheels lead to a segfault due to ITK_AUTOLOAD_PATH

3 participants