Skip to content

Julia crashes (Segmentation fault) when using tab completion with PythonCall #713

@truedichotomy

Description

@truedichotomy

Affects: PythonCall

Describe the bug
I'm running Julia 1.12.1 on macOS 26.1 and it will completely crash whenever I try to use tab completion on any loaded python library through PythonCall. I have Anaconda installed and tried both python 3.12 and 3.13 with the same result. I know it happens on both macOS 15.7 as well as macOS 26.1.

julia> using PythonCall

julia> sys = pyimport("sys")
Python: <module 'sys' (built-in)>

julia> sys.
[59054] signal 11 (2): Segmentation fault: 11
in expression starting at REPL[5]:1
	_PyObject_LookupSpecial at /opt/anaconda3/envs/ocean/lib/libpython3.12.dylib (unknown line)
PyObject_Dir at /opt/anaconda3/envs/ocean/lib/libpython3.12.dylib (unknown line)
PyObject_Dir at /Users/gong/.julia/packages/PythonCall/mkWc2/src/C/pointers.jl:300 [inlined]
macro expansion at /Users/gong/.julia/packages/PythonCall/mkWc2/src/Core/Py.jl:118 [inlined]
pydir at /Users/gong/.julia/packages/PythonCall/mkWc2/src/Core/builtins.jl:191
propertynames at /Users/gong/.julia/packages/PythonCall/mkWc2/src/Core/Py.jl:270
unknown function (ip: 0x137ae4353) at (unknown file)
#complete_symbol!#6 at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/REPL/src/REPLCompletions.jl:230
complete_symbol! at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/REPL/src/REPLCompletions.jl:184
unknown function (ip: 0x1379f407f) at (unknown file)
completions at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/REPL/src/REPLCompletions.jl:1150
#complete_line#66 at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/REPL/src/REPL.jl:809
complete_line at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/REPL/src/REPL.jl:807
unknown function (ip: 0x13773052f) at (unknown file)
#complete_line_named#17 at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/REPL/src/LineEdit.jl:401
complete_line_named at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/REPL/src/LineEdit.jl:400 [inlined]
macro expansion at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/REPL/src/LineEdit.jl:442 [inlined]
macro expansion at ./lock.jl:376 [inlined]
#check_show_hint##2 at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-12/usr/share/julia/stdlib/v1.12/REPL/src/LineEdit.jl:439
jfptr_YY.check_show_hintYY.YY.2_18133.1 at /Users/gong/.julia/juliaup/julia-1.12.1+0.aarch64.apple.darwin14/share/julia/compiled/v1.12/REPL/u0gqU_vMi9E.dylib (unknown line)
jl_apply at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-12/src/./julia.h:2391 [inlined]
start_task at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-XG3Q6T6R70.0/build/default-honeycrisp-XG3Q6T6R70-0/julialang/julia-release-1-dot-12/src/task.c:1249
Allocations: 74692492 (Pool: 74688757; Big: 3735); GC: 117
zsh: segmentation fault  julia
(base) gong@pluto ~ %   

Your system

julia> versioninfo()
Julia Version 1.12.1
Commit ba1e628ee49 (2025-10-17 13:02 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: macOS (arm64-apple-darwin24.0.0)
  CPU: 16 × Apple M3 Max
  WORD_SIZE: 64
  LLVM: libLLVM-18.1.7 (ORCJIT, apple-m3)
  GC: Built with stock GC
Threads: 12 default, 1 interactive, 12 GC (on 12 virtual cores)
Environment:
  JULIA_NUM_THREADS = 12
  JULIA_CONDAPKG_BACKEND = Null
  JULIA_PYTHONCALL_EXE = /opt/anaconda3/envs/ocean/bin/python

Additional context
I posted this issue to Julia's GitHub and it was suggested that this is a PythonCall bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions