Skip to content

Crash on 1.12 when showing diff(P).args[2] #143

@DanielVandH

Description

@DanielVandH

I'm not sure if this is just on my machine or not. On 1.12 in a fresh environment:

julia> using SemiclassicalOrthogonalPolynomials

julia> P = SemiclassicalJacobi(2, 0, 0, 0)
SemiclassicalJacobi with weight x^0.0 * (1-x)^0.0 * (2.0-x)^0.0 on 0..1

julia> diff(P); # works fine

julia> diff(P).args[2]
ℵ₀×ℵ₀ adjoint(::BandedMatrices.BandedMatrix{Float64, ApplyArray{Float64, 2, typeof(vcat), Tuple{LinearAlgebra.Adjoint{Float64, BroadcastVector{Float64, typeof(*), Tuple{InfiniteArrays.InfUnitRange{Int64}, Accumulate{Float64, 1, typeof(*), Vector{Float64}, AbstractVector{Float64}}}}}, LinearAlgebra.Adjoint{Float64, BroadcastVector{Float64, typeof(*), Tuple{BroadcastVector{Float64, typeof(-), Tuple{BroadcastVector{Float64, typeof(*), Tuple{InfiniteArrays.InfUnitRange{Int64}, BroadcastVector{Float64, typeof(+), Tuple{Cumsum{Float64, 1, AbstractVector{Float64}}, BroadcastVector{Float64, typeof(/), Tuple{BroadcastVector{Float64, typeof(-), Tuple{BroadcastVector{Float64, typeof(/), Tuple{SubArray{Float64, 1, ApplyArray{Float64, 1, typeof(vcat), Tuple{Float64, BroadcastVector{Float64, typeof(/), Tuple{BroadcastVector{Float64, typeof(-), Tuple{BroadcastVector{Float64, typeof(/), Tuple{Int64, BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfStepRange{Int64, Int64}}}}}, FillArrays.Fill{Float64, 1, Tuple{InfiniteArrays.OneToInf{Int64}}}}}, Float64}}}}, Tuple{InfiniteArrays.InfUnitRange{Int64}}, true}, BroadcastVector{Float64, typeof(sqrt), Tuple{BroadcastVector{Float64, typeof(*), Tuple{BroadcastVector{Float64, typeof(/), Tuple{BroadcastVector{Float64, typeof(/), Tuple{BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfUnitRange{Int64}}}, BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfStepRange{Int64, Int64}}}}}, Float64}}, SubArray{Float64, 1, ApplyArray{Float64, 1, typeof(vcat), Tuple{Float64, BroadcastVector{Float64, typeof(/), Tuple{BroadcastVector{Float64, typeof(/), Tuple{BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfUnitRange{Int64}}}, BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfStepRange{Int64, Int64}}}}}, Float64}}}}, Tuple{InfiniteArrays.InfUnitRange{Int64}}, true}}}}}}}}}, BroadcastVector{Float64, typeof(inv), Tuple{BroadcastVector{Float64, typeof(sqrt), Tuple{BroadcastVector{Float64, typeof(*), Tuple{BroadcastVector{Float64, typeof(/), Tuple{BroadcastVector{Float64, typeof(/), Tuple{BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfUnitRange{Int64}}}, BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfStepRange{Int64, Int64}}}}}, Float64}}, SubArray{Float64, 1, ApplyArray{Float64, 1, typeof(vcat), Tuple{Float64, BroadcastVector{Float64, typeof(/), Tuple{BroadcastVector{Float64, typeof(/), Tuple{BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfUnitRange{Int64}}}, BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfStepRange{Int64, Int64}}}}}, Float64}}}}, Tuple{InfiniteArrays.InfUnitRange{Int64}}, true}}}}}}}}}}}}}, BroadcastVector{Float64, typeof(*), Tuple{InfiniteArrays.InfUnitRange{Int64}, BroadcastVector{Float64, typeof(+), Tuple{BroadcastVector{Float64, typeof(*), Tuple{BroadcastVector{Float64, typeof(inv), Tuple{InfiniteLinearAlgebra.TridiagonalConjugationBand{Float64}}}, SemiclassicalOrthogonalPolynomials.MulAddAccumulate{Float64}}}, BroadcastVector{Float64, typeof(/), Tuple{BroadcastVector{Float64, typeof(-), Tuple{BroadcastVector{Float64, typeof(/), Tuple{InfiniteLinearAlgebra.TridiagonalConjugationBand{Float64}, InfiniteLinearAlgebra.TridiagonalConjugationBand{Float64}}}}}, BroadcastVector{Float64, typeof(inv), Tuple{InfiniteLinearAlgebra.TridiagonalConjugationBand{Float64}}}}}}}}}}}, Accumulate{Float64, 1, typeof(*), Vector{Float64}, AbstractVector{Float64}}}}}}}, InfiniteArrays.OneToInf{Int64}}) with eltype Float64 with indices OneToInf()×OneToInf():

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x7ffaa078e720 -- gc_mark_outrefs at C:/workdir/src\gc-stock.c:2362 [inlined]
gc_mark_loop_serial_ at C:/workdir/src\gc-stock.c:2517
in expression starting at REPL[7]:1
gc_mark_outrefs at C:/workdir/src\gc-stock.c:2362 [inlined]
gc_mark_loop_serial_ at C:/workdir/src\gc-stock.c:2517
gc_mark_loop_serial at C:/workdir/src\gc-stock.c:2540
gc_mark_loop at C:/workdir/src\gc-stock.c:2728 [inlined]
_jl_gc_collect at C:/workdir/src\gc-stock.c:3073
ijl_gc_collect at C:/workdir/src\gc-stock.c:3461
maybe_collect at C:/workdir/src\gc-stock.c:349 [inlined]
jl_gc_small_alloc_inner at C:/workdir/src\gc-stock.c:725 [inlined]
jl_gc_small_alloc_noinline at C:/workdir/src\gc-stock.c:783 [inlined]
jl_gc_alloc_ at C:/workdir/src\gc-stock.c:797
jl_alloc_genericmemory_unchecked at C:/workdir/src\genericmemory.c:41
GenericMemory at .\boot.jl:588 [inlined]
array_new_memory at .\array.jl:1067 [inlined]
#_growend!##0 at .\array.jl:1148
jfptr_YY._growendNOT.YY.YY.0_15739.1 at C:\Users\djv23\.julia\juliaup\julia-1.12.1+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
tojlinvoke85464.1 at C:\Users\djv23\.julia\juliaup\julia-1.12.1+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
j_YY._growendNOT.YY.YY.0_80409.1 at C:\Users\djv23\.julia\juliaup\julia-1.12.1+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
_growend! at .\array.jl:1131 [inlined]
_push! at .\array.jl:1289 [inlined]
push! at .\array.jl:1286 [inlined]
cfg_inline_item! at .\../usr/share/julia/Compiler/src/ssair\inlining.jl:164
batch_inline! at .\../usr/share/julia/Compiler/src/ssair\inlining.jl:630
ssa_inlining_pass! at .\../usr/share/julia/Compiler/src/ssair\inlining.jl:79 [inlined]
run_passes_ipo_safe at .\../usr/share/julia/Compiler/src\optimize.jl:1013
run_passes_ipo_safe at .\../usr/share/julia/Compiler/src\optimize.jl:1027 [inlined]
optimize at .\../usr/share/julia/Compiler/src\optimize.jl:1002
jfptr_optimize_83077.1 at C:\Users\djv23\.julia\juliaup\julia-1.12.1+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
finish_nocycle at .\../usr/share/julia/Compiler/src\typeinfer.jl:202
jfptr_finish_nocycle_84273.1 at C:\Users\djv23\.julia\juliaup\julia-1.12.1+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
typeinf at .\../usr/share/julia/Compiler/src\abstractinterpretation.jl:4507
typeinf_ext at .\../usr/share/julia/Compiler/src\typeinfer.jl:1259
typeinf_ext_toplevel at .\../usr/share/julia/Compiler/src\typeinfer.jl:1442 [inlined]
typeinf_ext_toplevel at .\../usr/share/julia/Compiler/src\typeinfer.jl:1451
jfptr_typeinf_ext_toplevel_84114.1 at C:\Users\djv23\.julia\juliaup\julia-1.12.1+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:2391 [inlined]
jl_type_infer at C:/workdir/src\gf.c:462
jl_compile_method_internal at C:/workdir/src\gf.c:3512
_jl_invoke at C:/workdir/src\gf.c:4002 [inlined]
ijl_apply_generic at C:/workdir/src\gf.c:4210
getindex at .\broadcast.jl:616 [inlined]
getindex at C:\Users\djv23\.julia\packages\LazyArrays\gHXdm\src\lazybroadcasting.jl:113
unknown function (ip: 0000018afccb9814) at (unknown file)
getindex at C:\workdir\usr\share\julia\stdlib\v1.12\LinearAlgebra\src\adjtrans.jl:342
unknown function (ip: 0000018afccb9314) at (unknown file)
_getindex at .\abstractarray.jl:1371 [inlined]
getindex at .\abstractarray.jl:1342 [inlined]
vcat_getindex_recursive at C:\Users\djv23\.julia\packages\LazyArrays\gHXdm\src\lazyconcat.jl:70 [inlined]
vcat_getindex_recursive at C:\Users\djv23\.julia\packages\LazyArrays\gHXdm\src\lazyconcat.jl:71 [inlined]
vcat_getindex at C:\Users\djv23\.julia\packages\LazyArrays\gHXdm\src\lazyconcat.jl:53 [inlined]
getindex at C:\Users\djv23\.julia\packages\LazyArrays\gHXdm\src\lazyconcat.jl:86 [inlined]
inbands_getindex at C:\Users\djv23\.julia\packages\BandedMatrices\Vz6Ql\src\banded\BandedMatrix.jl:396 [inlined]
banded_getindex at C:\Users\djv23\.julia\packages\BandedMatrices\Vz6Ql\src\banded\BandedMatrix.jl:414 [inlined]
getindex at C:\Users\djv23\.julia\packages\BandedMatrices\Vz6Ql\src\banded\BandedMatrix.jl:424 [inlined]
isassigned at .\multidimensional.jl:1653 [inlined]
isassigned at C:\workdir\usr\share\julia\stdlib\v1.12\LinearAlgebra\src\adjtrans.jl:341
unknown function (ip: 0000018afccb4304) at (unknown file)
alignment at .\arrayshow.jl:68
_print_matrix at .\arrayshow.jl:207
unknown function (ip: 0000018afccb1b9e) at (unknown file)
print_matrix at .\arrayshow.jl:171
print_matrix at .\arrayshow.jl:171 [inlined]
print_array at .\arrayshow.jl:358 [inlined]
show at .\arrayshow.jl:399
unknown function (ip: 0000018afccaeeb1) at (unknown file)
show_repl at C:\workdir\usr\share\julia\stdlib\v1.12\REPL\src\REPL.jl:548
show_limited at C:\workdir\usr\share\julia\stdlib\v1.12\REPL\src\REPL.jl:517
#display##0 at C:\workdir\usr\share\julia\stdlib\v1.12\REPL\src\REPL.jl:540
jfptr_YY.displayYY.YY.0_18749.1 at C:\Users\djv23\.julia\juliaup\julia-1.12.1+0.x64.w64.mingw32\share\julia\compiled\v1.12\REPL\u0gqU_hz07T.dll (unknown line)
with_repl_linfo at C:\workdir\usr\share\julia\stdlib\v1.12\REPL\src\REPL.jl:833
jfptr_with_repl_linfo_18330.1 at C:\Users\djv23\.julia\juliaup\julia-1.12.1+0.x64.w64.mingw32\share\julia\compiled\v1.12\REPL\u0gqU_hz07T.dll (unknown line)
display at C:\workdir\usr\share\julia\stdlib\v1.12\REPL\src\REPL.jl:526
display at C:\workdir\usr\share\julia\stdlib\v1.12\REPL\src\REPL.jl:546 [inlined]
display at .\multimedia.jl:340
jfptr_display_15715.1 at C:\Users\djv23\.julia\juliaup\julia-1.12.1+0.x64.w64.mingw32\share\julia\compiled\v1.12\REPL\u0gqU_hz07T.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:2391 [inlined]
jl_f_invokelatest at C:/workdir/src\builtins.c:881
#print_response##2 at C:\workdir\usr\share\julia\stdlib\v1.12\REPL\src\REPL.jl:590
jfptr_YY.print_responseYY.YY.2_19630.1 at C:\Users\djv23\.julia\juliaup\julia-1.12.1+0.x64.w64.mingw32\share\julia\compiled\v1.12\REPL\u0gqU_hz07T.dll (unknown line)
repl_backend_loop at C:\workdir\usr\share\julia\stdlib\v1.12\REPL\src\REPL.jl:445
#start_repl_backend#41 at C:\workdir\usr\share\julia\stdlib\v1.12\REPL\src\REPL.jl:427
start_repl_backend at C:\workdir\usr\share\julia\stdlib\v1.12\REPL\src\REPL.jl:424 [inlined]
#run_repl#50 at C:\workdir\usr\share\julia\stdlib\v1.12\REPL\src\REPL.jl:653
run_repl at C:\workdir\usr\share\julia\stdlib\v1.12\REPL\src\REPL.jl:639
jfptr_run_repl_19573.1 at C:\Users\djv23\.julia\juliaup\julia-1.12.1+0.x64.w64.mingw32\share\julia\compiled\v1.12\REPL\u0gqU_hz07T.dll (unknown line)
run_std_repl at .\client.jl:478
jfptr_run_std_repl_59774.1 at C:\Users\djv23\.julia\juliaup\julia-1.12.1+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:2391 [inlined]
jl_f_invokelatest at C:/workdir/src\builtins.c:881
run_main_repl at .\client.jl:499
repl_main at .\client.jl:586 [inlined]
_start at .\client.jl:561
jfptr__start_40651.1 at C:\Users\djv23\.julia\juliaup\julia-1.12.1+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:2391 [inlined]
true_main at C:/workdir/src\jlapi.c:971
jl_repl_entrypoint at C:/workdir/src\jlapi.c:1139
mainCRTStartup at C:/workdir/cli\loader_exe.c:58
BaseThreadInitThunk at C:\Windows\System32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
Allocations: 56831860 (Pool: 56828717; Big: 3143); GC: 32

If I instead go on 1.11, it's fine:

julia> using SemiclassicalOrthogonalPolynomials

julia> P = SemiclassicalJacobi(2, 0, 0, 0);

julia> diff(P).args[2]
ℵ₀×ℵ₀ adjoint(::BandedMatrices.BandedMatrix{Float64, LazyArrays.ApplyArray{Float64, 2, typeof(vcat), Tuple{LinearAlgebra.Adjoint{Float64, LazyArrays.BroadcastVector{Float64, typeof(*), Tuple{InfiniteArrays.InfUnitRange{Int64}, LazyArrays.Accumulate{Float64, 1, typeof(*), Vector{Float64}, AbstractVector{Float64}}}}}, LinearAlgebra.Adjoint{Float64, LazyArrays.BroadcastVector{Float64, typeof(*), Tuple{LazyArrays.BroadcastVector{Float64, typeof(-), Tuple{LazyArrays.BroadcastVector{Float64, typeof(*), Tuple{InfiniteArrays.InfUnitRange{Int64}, LazyArrays.BroadcastVector{Float64, typeof(+), Tuple{LazyArrays.Cumsum{Float64, 1, AbstractVector{Float64}}, LazyArrays.BroadcastVector{Float64, typeof(/), Tuple{LazyArrays.BroadcastVector{Float64, typeof(-), Tuple{LazyArrays.BroadcastVector{Float64, typeof(/), Tuple{SubArray{Float64, 1, LazyArrays.ApplyArray{Float64, 1, typeof(vcat), Tuple{Float64, LazyArrays.BroadcastVector{Float64, typeof(/), Tuple{LazyArrays.BroadcastVector{Float64, typeof(-), Tuple{LazyArrays.BroadcastVector{Float64, typeof(/), Tuple{Int64, LazyArrays.BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfStepRange{Int64, Int64}}}}}, FillArrays.Fill{Float64, 1, Tuple{InfiniteArrays.OneToInf{Int64}}}}}, Float64}}}}, Tuple{InfiniteArrays.InfUnitRange{Int64}}, true}, LazyArrays.BroadcastVector{Float64, typeof(sqrt), Tuple{LazyArrays.BroadcastVector{Float64, typeof(*), Tuple{LazyArrays.BroadcastVector{Float64, typeof(/), Tuple{LazyArrays.BroadcastVector{Float64, typeof(/), Tuple{LazyArrays.BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfUnitRange{Int64}}}, LazyArrays.BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfStepRange{Int64, Int64}}}}}, Float64}}, SubArray{Float64, 1, LazyArrays.ApplyArray{Float64, 1, typeof(vcat), Tuple{Float64, LazyArrays.BroadcastVector{Float64, typeof(/), Tuple{LazyArrays.BroadcastVector{Float64, typeof(/), Tuple{LazyArrays.BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfUnitRange{Int64}}}, LazyArrays.BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfStepRange{Int64, Int64}}}}}, Float64}}}}, Tuple{InfiniteArrays.InfUnitRange{Int64}}, true}}}}}}}}}, LazyArrays.BroadcastVector{Float64, typeof(inv), Tuple{LazyArrays.BroadcastVector{Float64, typeof(sqrt), Tuple{LazyArrays.BroadcastVector{Float64, typeof(*), Tuple{LazyArrays.BroadcastVector{Float64, typeof(/), Tuple{LazyArrays.BroadcastVector{Float64, typeof(/), Tuple{LazyArrays.BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfUnitRange{Int64}}}, LazyArrays.BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfStepRange{Int64, Int64}}}}}, Float64}}, SubArray{Float64, 1, LazyArrays.ApplyArray{Float64, 1, typeof(vcat), Tuple{Float64, LazyArrays.BroadcastVector{Float64, typeof(/), Tuple{LazyArrays.BroadcastVector{Float64, typeof(/), Tuple{LazyArrays.BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfUnitRange{Int64}}}, LazyArrays.BroadcastVector{Int64, typeof(*), Tuple{InfiniteArrays.InfStepRange{Int64, Int64}, InfiniteArrays.InfStepRange{Int64, Int64}}}}}, Float64}}}}, Tuple{InfiniteArrays.InfUnitRange{Int64}}, true}}}}}}}}}}}}}, LazyArrays.BroadcastVector{Float64, typeof(*), Tuple{InfiniteArrays.InfUnitRange{Int64}, LazyArrays.BroadcastVector{Float64, typeof(+), Tuple{LazyArrays.BroadcastVector{Float64, typeof(*), Tuple{LazyArrays.BroadcastVector{Float64, typeof(inv), Tuple{InfiniteLinearAlgebra.TridiagonalConjugationBand{Float64}}}, SemiclassicalOrthogonalPolynomials.MulAddAccumulate{Float64}}}, LazyArrays.BroadcastVector{Float64, typeof(/), Tuple{LazyArrays.BroadcastVector{Float64, typeof(-), Tuple{LazyArrays.BroadcastVector{Float64, typeof(/), Tuple{InfiniteLinearAlgebra.TridiagonalConjugationBand{Float64}, InfiniteLinearAlgebra.TridiagonalConjugationBand{Float64}}}}}, LazyArrays.BroadcastVector{Float64, typeof(inv), Tuple{InfiniteLinearAlgebra.TridiagonalConjugationBand{Float64}}}}}}}}}}}, LazyArrays.Accumulate{Float64, 1, typeof(*), Vector{Float64}, AbstractVector{Float64}}}}}}}, InfiniteArrays.OneToInf{Int64}}) with eltype Float64 with indices OneToInf()×OneToInf():
  ⋅   3.4641  -0.894427    ⋅         ⋅         ⋅       …
  ⋅    ⋅       5.93296   -1.36753    ⋅         ⋅
  ⋅    ⋅        ⋅         8.37436  -1.80534    ⋅
  ⋅    ⋅        ⋅          ⋅       10.8047   -2.23245
  ⋅    ⋅        ⋅          ⋅         ⋅       13.2294
  ⋅    ⋅        ⋅          ⋅         ⋅         ⋅       …
  ⋅    ⋅        ⋅          ⋅         ⋅         ⋅
  ⋅    ⋅        ⋅          ⋅         ⋅         ⋅
  ⋅    ⋅        ⋅          ⋅         ⋅         ⋅
  ⋅    ⋅        ⋅          ⋅         ⋅         ⋅
  ⋅    ⋅        ⋅          ⋅         ⋅         ⋅       …
  ⋅    ⋅        ⋅          ⋅         ⋅         ⋅
  ⋅    ⋅        ⋅          ⋅         ⋅         ⋅
 ⋮                                            ⋮        ⋱

The tests on 1.12 have a versioninfo():

julia> versioninfo()
Julia Version 1.12.1
Commit ba1e628ee4 (2025-10-17 13:02 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 24 × AMD Ryzen Threadripper PRO 7945WX 12-Cores
  WORD_SIZE: 64
  LLVM: libLLVM-18.1.7 (ORCJIT, znver4)
  GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 24 virtual cores)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions