Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal error in Julia 1.8-rc1 #249

Open
rikhuijzer opened this issue Jun 15, 2022 · 1 comment
Open

Internal error in Julia 1.8-rc1 #249

rikhuijzer opened this issue Jun 15, 2022 · 1 comment
Labels

Comments

@rikhuijzer
Copy link

An Julia internal error occurs during precompilation. More specifically, after disabling include("precompile.jl") the following is a way to reproduce the error

juliaa> using ImageFiltering, OffsetArrays

julia> A = OffsetArray([1.625, 2.5, 3.5, 4.5, 5.5, 6.5, 7.375, 7.875, 8.0, 8.0], 0:9);

julia> A  A
Internal error: encountered unexpected error in runtime:
TypeError(func=:isdefined, context="", expected=Symbol, got=Tuple{typeof(Base.in), Symbol, Base.Set{Symbol}})
ijl_type_error_rt at /buildworker/worker/package_linux64/build/src/rtutils.c:119
ijl_type_error at /buildworker/worker/package_linux64/build/src/rtutils.c:127
jl_f_isdefined at /buildworker/worker/package_linux64/build/src/builtins.c:1157
abstract_eval_global at ./compiler/abstractinterpretation.jl:2035 [inlined]
argextype at ./compiler/optimize.jl:366
argextype at ./compiler/optimize.jl:340 [inlined]
argextype at ./compiler/optimize.jl:339 [inlined]
is_known_call at ./compiler/ssair/passes.jl:5
[...]
Stacktrace:
  [1] -
    @ ./float.jl:384 [inlined]
  [2] _broadcast_getindex_evalf(::typeof(-), ::Float64, ::Float64)
    @ Base.Broadcast ./broadcast.jl:670
  [3] _broadcast_getindex(bc::Base.Broadcast.Broadcasted{<:Any, <:Any, <:Any, <:Any}, I::Any)
    @ Base.Broadcast ./broadcast.jl:643
  [4] getindex(bc::Base.Broadcast.Broadcasted, I::Union{Integer, CartesianIndex})
    @ Base.Broadcast ./broadcast.jl:597
  [5] macro expansion
    @ ./broadcast.jl:961 [inlined]
  [6] macro expansion
    @ ./simdloop.jl:77 [inlined]
[...]
SYSTEM (REPL): showing an error caused an error
ERROR: TypeError: in typeassert, expected Symbol, got Type{Tuple{typeof(in), Symbol, Set{Symbol}}}
Stacktrace:
  [1] string(::String, ::Symbol, ::Vararg{Union{Char, SubString{String}, String, Symbol}})
    @ Base ./strings/substring.jl:231
  [2] showerror
    @ ./errorshow.jl:163 [inlined]
  [3] showerror(io::IOContext{Base.TTY}, ex::UndefVarError, bt::Vector{Base.StackTraces.StackFrame}; backtrace::Bool)
    @ Base ./errorshow.jl:88
  [4] show_exception_stack(io::IOContext{Base.TTY}, stack::Base.ExceptionStack)
    @ Base ./errorshow.jl:878
  [5] display_error(io::IOContext{Base.TTY}, stack::Base.ExceptionStack)
    @ Base ./client.jl:103
  [6] #invokelatest#2
    @ ./essentials.jl:729 [inlined]

this is caused by an override in ImageFiltering because

julia> using OffsetArrays

julia> A = OffsetArray([1.625, 2.5, 3.5, 4.5, 5.5, 6.5, 7.375, 7.875, 8.0, 8.0], 0:9);

julia> A  A
true

Both with OffsetArrays v1.12.6.

@johnnychen94
Copy link
Member

johnnychen94 commented Jun 15, 2022

Sorry, I can't reproduce this on Ubuntu(WSL). 😕

julia> versioninfo()
Julia Version 1.8.0-rc1
Commit 6368fdc656 (2022-05-27 18:33 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: 24 × 12th Gen Intel(R) Core(TM) i9-12900K
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, goldmont)
  Threads: 16 on 24 virtual cores

(ImageFiltering) pkg> st
Project ImageFiltering v0.7.1
Status `~/Documents/Julia/ImageFiltering.jl/Project.toml`
  [aafaddc9] CatIndices v0.2.2
  [ed09eef8] ComputationalResources v0.3.2
  [864edb3b] DataStructures v0.18.13
  [4f61f5a4] FFTViews v0.3.2
  [7a1cc6ca] FFTW v1.4.6
  [c817782e] ImageBase v0.1.5
  [a09fc81d] ImageCore v0.9.3
  [6fe1bfb0] OffsetArrays v1.12.6
  [189a3867] Reexport v1.2.2
  [90137ffa] StaticArrays v1.4.7
  [06e1c1a7] TiledIteration v0.3.1
  [37e2e46d] LinearAlgebra
  [2f01184e] SparseArrays
  [10745b16] Statistics

julia> using ImageFiltering, OffsetArrays

julia> A = OffsetArray([1.625, 2.5, 3.5, 4.5, 5.5, 6.5, 7.375, 7.875, 8.0, 8.0], 0:9);

julia> A  A
true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants